mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2024-11-23 04:12:12 +00:00
@ Floor/Ceiling align modes pretty much complete
This commit is contained in:
parent
865ebefa3f
commit
da1f4a76ce
2 changed files with 28 additions and 0 deletions
|
@ -53,6 +53,8 @@ namespace CodeImp.DoomBuilder.GZDoomEditing
|
|||
|
||||
#region ================== Variables
|
||||
|
||||
private ViewMode prevviewmode;
|
||||
|
||||
#endregion
|
||||
|
||||
#region ================== Properties
|
||||
|
@ -89,12 +91,24 @@ namespace CodeImp.DoomBuilder.GZDoomEditing
|
|||
// Mode engages
|
||||
public override void OnEngage()
|
||||
{
|
||||
prevviewmode = General.Map.Renderer2D.ViewMode;
|
||||
|
||||
base.OnEngage();
|
||||
|
||||
General.Actions.InvokeAction("builder_viewmodeceilings");
|
||||
}
|
||||
|
||||
// Mode disengages
|
||||
public override void OnDisengage()
|
||||
{
|
||||
switch(prevviewmode)
|
||||
{
|
||||
case ViewMode.Normal: General.Actions.InvokeAction("builder_viewmodenormal"); break;
|
||||
case ViewMode.FloorTextures: General.Actions.InvokeAction("builder_viewmodefloors"); break;
|
||||
case ViewMode.CeilingTextures: General.Actions.InvokeAction("builder_viewmodeceilings"); break;
|
||||
case ViewMode.Brightness: General.Actions.InvokeAction("builder_viewmodebrightness"); break;
|
||||
}
|
||||
|
||||
base.OnDisengage();
|
||||
}
|
||||
|
||||
|
|
|
@ -53,6 +53,8 @@ namespace CodeImp.DoomBuilder.GZDoomEditing
|
|||
|
||||
#region ================== Variables
|
||||
|
||||
private ViewMode prevviewmode;
|
||||
|
||||
#endregion
|
||||
|
||||
#region ================== Properties
|
||||
|
@ -89,12 +91,24 @@ namespace CodeImp.DoomBuilder.GZDoomEditing
|
|||
// Mode engages
|
||||
public override void OnEngage()
|
||||
{
|
||||
prevviewmode = General.Map.Renderer2D.ViewMode;
|
||||
|
||||
base.OnEngage();
|
||||
|
||||
General.Actions.InvokeAction("builder_viewmodefloors");
|
||||
}
|
||||
|
||||
// Mode disengages
|
||||
public override void OnDisengage()
|
||||
{
|
||||
switch(prevviewmode)
|
||||
{
|
||||
case ViewMode.Normal: General.Actions.InvokeAction("builder_viewmodenormal"); break;
|
||||
case ViewMode.FloorTextures: General.Actions.InvokeAction("builder_viewmodefloors"); break;
|
||||
case ViewMode.CeilingTextures: General.Actions.InvokeAction("builder_viewmodeceilings"); break;
|
||||
case ViewMode.Brightness: General.Actions.InvokeAction("builder_viewmodebrightness"); break;
|
||||
}
|
||||
|
||||
base.OnDisengage();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue