@ Floor/Ceiling align modes pretty much complete

This commit is contained in:
codeimp 2011-12-13 06:52:21 +00:00
parent 865ebefa3f
commit da1f4a76ce
2 changed files with 28 additions and 0 deletions

View file

@ -53,6 +53,8 @@ namespace CodeImp.DoomBuilder.GZDoomEditing
#region ================== Variables #region ================== Variables
private ViewMode prevviewmode;
#endregion #endregion
#region ================== Properties #region ================== Properties
@ -89,12 +91,24 @@ namespace CodeImp.DoomBuilder.GZDoomEditing
// Mode engages // Mode engages
public override void OnEngage() public override void OnEngage()
{ {
prevviewmode = General.Map.Renderer2D.ViewMode;
base.OnEngage(); base.OnEngage();
General.Actions.InvokeAction("builder_viewmodeceilings");
} }
// Mode disengages // Mode disengages
public override void OnDisengage() 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(); base.OnDisengage();
} }

View file

@ -53,6 +53,8 @@ namespace CodeImp.DoomBuilder.GZDoomEditing
#region ================== Variables #region ================== Variables
private ViewMode prevviewmode;
#endregion #endregion
#region ================== Properties #region ================== Properties
@ -89,12 +91,24 @@ namespace CodeImp.DoomBuilder.GZDoomEditing
// Mode engages // Mode engages
public override void OnEngage() public override void OnEngage()
{ {
prevviewmode = General.Map.Renderer2D.ViewMode;
base.OnEngage(); base.OnEngage();
General.Actions.InvokeAction("builder_viewmodefloors");
} }
// Mode disengages // Mode disengages
public override void OnDisengage() 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(); base.OnDisengage();
} }