mirror of
https://git.do.srb2.org/STJr/ZoneBuilder.git
synced 2024-11-10 06:41:49 +00:00
Improve and add some selection actions for Visual Mode.
This commit is contained in:
parent
b9c5f33ec2
commit
29d900da32
2 changed files with 62 additions and 14 deletions
|
@ -373,6 +373,26 @@ selectdoublesided
|
|||
default = 65586;
|
||||
}
|
||||
|
||||
selectfloors
|
||||
{
|
||||
title = "Select floors";
|
||||
category = "visual";
|
||||
description = "This keeps only the sector floors in your selection selected.";
|
||||
allowkeys = true;
|
||||
allowmouse = true;
|
||||
allowscroll = true;
|
||||
}
|
||||
|
||||
selectceilings
|
||||
{
|
||||
title = "Select ceilings";
|
||||
category = "visual";
|
||||
description = "This keeps only the sector ceilings in your selection selected.";
|
||||
allowkeys = true;
|
||||
allowmouse = true;
|
||||
allowscroll = true;
|
||||
}
|
||||
|
||||
fliplinedefs
|
||||
{
|
||||
title = "Flip Linedefs";
|
||||
|
|
|
@ -4105,13 +4105,10 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
int counter = 0;
|
||||
List<VisualGeometry> selected = GetSelectedSurfaces();
|
||||
foreach (VisualGeometry vg in selected)
|
||||
if (vg is BaseVisualGeometrySidedef)
|
||||
{
|
||||
if (vg.Sidedef.Other != null)
|
||||
vg.Selected = false;
|
||||
else
|
||||
counter++;
|
||||
}
|
||||
if (vg is BaseVisualGeometrySidedef && vg.Sidedef.Other == null)
|
||||
counter++;
|
||||
else
|
||||
vg.Selected = false;
|
||||
|
||||
General.Interface.DisplayStatus(StatusType.Action, "Selected only single-sided linedefs (" + counter + ")");
|
||||
General.Interface.RedrawDisplay();
|
||||
|
@ -4126,13 +4123,10 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
int counter = 0;
|
||||
List<VisualGeometry> selected = GetSelectedSurfaces();
|
||||
foreach (VisualGeometry vg in selected)
|
||||
if (vg is BaseVisualGeometrySidedef)
|
||||
{
|
||||
if (vg.Sidedef.Other == null)
|
||||
vg.Selected = false;
|
||||
else
|
||||
counter++;
|
||||
}
|
||||
if (vg is BaseVisualGeometrySidedef && vg.Sidedef.Other != null)
|
||||
counter++;
|
||||
else
|
||||
vg.Selected = false;
|
||||
|
||||
General.Interface.DisplayStatus(StatusType.Action, "Selected only double-sided linedefs (" + counter + ")");
|
||||
General.Interface.RedrawDisplay();
|
||||
|
@ -4140,6 +4134,40 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
UpdateChangedObjects();
|
||||
}
|
||||
|
||||
[BeginAction("selectfloors")]
|
||||
public void SelectFloors()
|
||||
{
|
||||
int counter = 0;
|
||||
List<VisualGeometry> selected = GetSelectedSurfaces();
|
||||
foreach (VisualGeometry vg in selected)
|
||||
if (vg is VisualFloor)
|
||||
counter++;
|
||||
else
|
||||
vg.Selected = false;
|
||||
|
||||
General.Interface.DisplayStatus(StatusType.Action, "Selected only floors (" + counter + ")");
|
||||
General.Interface.RedrawDisplay();
|
||||
UpdateSelectionInfo();
|
||||
UpdateChangedObjects();
|
||||
}
|
||||
|
||||
[BeginAction("selectceilings")]
|
||||
public void SelectCeilings()
|
||||
{
|
||||
int counter = 0;
|
||||
List<VisualGeometry> selected = GetSelectedSurfaces();
|
||||
foreach (VisualGeometry vg in selected)
|
||||
if (vg is VisualCeiling)
|
||||
counter++;
|
||||
else
|
||||
vg.Selected = false;
|
||||
|
||||
General.Interface.DisplayStatus(StatusType.Action, "Selected only ceilings (" + counter + ")");
|
||||
General.Interface.RedrawDisplay();
|
||||
UpdateSelectionInfo();
|
||||
UpdateChangedObjects();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region ================== Texture Alignment
|
||||
|
|
Loading…
Reference in a new issue