mirror of
https://git.do.srb2.org/STJr/ZoneBuilder.git
synced 2024-11-10 06:41:49 +00:00
Add action for removing FOF planes from Visual Mode selection
This commit is contained in:
parent
c76ff0aab9
commit
f8c313abaa
3 changed files with 51 additions and 1 deletions
|
@ -1376,6 +1376,16 @@ alphabasedtexturehighlighting
|
|||
allowscroll = true;
|
||||
}
|
||||
|
||||
deselectfofplanes
|
||||
{
|
||||
title = "Deselect FOF planes";
|
||||
category = "visual";
|
||||
description = "Deselects all FOF planes from your selection in Visual Mode.";
|
||||
allowkeys = true;
|
||||
allowmouse = true;
|
||||
allowscroll = true;
|
||||
}
|
||||
|
||||
placevisualstart
|
||||
{
|
||||
title = "Place Visual Mode Camera";
|
||||
|
|
|
@ -1058,6 +1058,20 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
}
|
||||
}
|
||||
|
||||
public void OnRemoveFOFSelection()
|
||||
{
|
||||
if (level != null)
|
||||
{
|
||||
// This plane is part of a 3D-floor/FOF
|
||||
if (level.sector != Sector.Sector)
|
||||
{
|
||||
BaseVisualSector vs = (BaseVisualSector)mode.GetVisualSector(level.sector);
|
||||
selected = false;
|
||||
mode.RemoveSelectedObject(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4460,6 +4460,32 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
General.Interface.DisplayStatus(StatusType.Info, "Alpha-based textures highlighting is " + (BuilderPlug.Me.AlphaBasedTextureHighlighting ? "ENABLED" : "DISABLED"));
|
||||
}
|
||||
|
||||
[BeginAction("deselectfofplanes")]
|
||||
public void DeselectFOFPlanes()
|
||||
{
|
||||
PreAction(UndoGroup.None);
|
||||
List<IVisualEventReceiver> objs = GetSelectedObjects(true, false, false, false);
|
||||
|
||||
foreach (IVisualEventReceiver i in objs)
|
||||
{
|
||||
if (i is VisualFloor)
|
||||
{
|
||||
VisualFloor vf = i as VisualFloor;
|
||||
vf.OnRemoveFOFSelection();
|
||||
}
|
||||
|
||||
if (i is VisualCeiling)
|
||||
{
|
||||
VisualCeiling vc = i as VisualCeiling;
|
||||
vc.OnRemoveFOFSelection();
|
||||
}
|
||||
}
|
||||
|
||||
General.Interface.DisplayStatus(StatusType.Action, "Deselected FOF planes.");
|
||||
General.Interface.RedrawDisplay();
|
||||
UpdateSelectionInfo();
|
||||
UpdateChangedObjects();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region ================== Texture Alignment
|
||||
|
|
Loading…
Reference in a new issue