mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2025-01-18 14:31:50 +00:00
made 2 more events for the plugins
This commit is contained in:
parent
6b2ba4f2d6
commit
9ba3fa93a3
4 changed files with 31 additions and 4 deletions
|
@ -1002,6 +1002,9 @@ namespace CodeImp.DoomBuilder
|
|||
|
||||
// Create required lumps if they don't exist yet
|
||||
CreateRequiredLumps(tempwad, TEMP_MAP_HEADER);
|
||||
|
||||
// Let the plugins know
|
||||
General.Plugins.MapReconfigure();
|
||||
|
||||
// Reload resources
|
||||
ReloadResources();
|
||||
|
|
|
@ -1237,6 +1237,9 @@ namespace CodeImp.DoomBuilder.Interface
|
|||
{
|
||||
// Update interface
|
||||
UpdateInterface();
|
||||
|
||||
// Let the plugins know
|
||||
General.Plugins.ProgramReconfigure();
|
||||
|
||||
// Reload resources if a map is open
|
||||
if(General.Map != null) General.Map.ReloadResources();
|
||||
|
@ -1259,6 +1262,9 @@ namespace CodeImp.DoomBuilder.Interface
|
|||
{
|
||||
// Update shortcut keys in menus
|
||||
ApplyShortcutKeys();
|
||||
|
||||
// Let the plugins know
|
||||
General.Plugins.ProgramReconfigure();
|
||||
|
||||
// Map opened?
|
||||
if(General.Map != null)
|
||||
|
|
|
@ -107,7 +107,7 @@ namespace CodeImp.DoomBuilder.Plugins
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// This is called by the Doom Builder core when the user chose to reload the resources.
|
||||
/// This is called when the user chose to reload the resources.
|
||||
/// </summary>
|
||||
public virtual void OnReloadResources()
|
||||
{
|
||||
|
@ -135,7 +135,7 @@ namespace CodeImp.DoomBuilder.Plugins
|
|||
public virtual void OnMapReconfigure()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
@ -187,19 +187,37 @@ namespace CodeImp.DoomBuilder.Plugins
|
|||
return null;
|
||||
}
|
||||
|
||||
// This calls ReloadResources on all plugins
|
||||
#endregion
|
||||
|
||||
#region ================== Events
|
||||
|
||||
// This calls OnReloadResources on all plugins
|
||||
public void ReloadResources()
|
||||
{
|
||||
foreach(Plugin p in plugins)
|
||||
p.Plug.OnReloadResources();
|
||||
}
|
||||
|
||||
// This calls ModeChanges on all plugins
|
||||
// This calls OnModeChange on all plugins
|
||||
public void ModeChanges(EditMode oldmode, EditMode newmode)
|
||||
{
|
||||
foreach(Plugin p in plugins)
|
||||
p.Plug.OnModeChange(oldmode, newmode);
|
||||
}
|
||||
|
||||
// This calls OnProgramReconfigure on all plugins
|
||||
public void ProgramReconfigure()
|
||||
{
|
||||
foreach(Plugin p in plugins)
|
||||
p.Plug.OnProgramReconfigure();
|
||||
}
|
||||
|
||||
// This calls OnMapReconfigure on all plugins
|
||||
public void MapReconfigure()
|
||||
{
|
||||
foreach(Plugin p in plugins)
|
||||
p.Plug.OnMapReconfigure();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue