Sectors mode: things inside of selected sectors can be moved when dragging sectors. This behavior can be toggled by the new button on Sectors mode's toolbar.

Sectors mode: changed Alt-key handling. Now it only enables "snap to grid increment" mode.
Things mode: "snap to grid increment" mode now works in this mode.
Updated documentation.
This commit is contained in:
MaxED 2014-07-18 15:11:37 +00:00
parent 3d7cceaae4
commit 9c17aa4fe8
15 changed files with 253 additions and 179 deletions

View file

@ -136,6 +136,7 @@
<li><a href="classic_modes/mode_drawbridge.html">Bridge mode</a>.</li>
<li><a href="classic_modes/mode_snapelements.html">Snap map elements mode</a>.</li>
<li><span class="style5"><strong>[new]</strong></span> Selected things are now dragged while dragging vertices, linedefs and sectors.</li>
<li><span class="style5"><strong>[new]</strong></span> You can hold the <strong>Alt</strong> key while dragging map elements to snap them to grid increments relative to their initial position.</li>
<li><span class="style5">[new]</span> You can place things on top of selected vertices in Vertices and Linedefs modes and inside of selected sectors in Sectors mode using &quot;<strong>Place Things</strong>&quot; action.</li>
<li><span class="style5">[new]</span> You can view all loaded thing types and some additional info using Thing Statistics form (<strong>Edit -&gt; View Thing Types...</strong>).
<input class="spoilerbutton" type="button" onclick="ToggleSpoiler(this);" href="javascript:void(0);" value="Show image"/>
@ -161,7 +162,7 @@
<li>
<h3><a name="sectors" id="sectors"></a>Sectors mode:</h3>
<ul>
<li><span class="style1"><strong>[new]</strong></span> Hold <strong>Alt</strong> while (de)selecting sectors to (de)select things inside of them.</li>
<li><span class="style1"><strong>[new]</strong></span> Things inside of selected Sectors can be moved when dragging Sectors. This toolbar button toggles this mode: <img src="sectors_mode/drag_things.jpg"/>. When enabled, all things inside of selected sectors will be dragged when dragging sectors. Otherwise, selected things will be dragged.</li>
<li><span class="style1"><strong>[new]</strong></span> Sector Tag and Effect can now be shown on top of sectors. You can use &quot;<strong>View Tags and Effects</strong>&quot; button to toggle this overlay.
<input class="spoilerbutton" type="button" onclick="ToggleSpoiler(this);" href="javascript:void(0);" value="Show image"/>
<div style="display: none; margin: 0px; padding: 6px; border: 1px inset;"><img src="sectors_mode/toggle_effect_overlay.jpg" alt="" /></div>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

View file

@ -514,6 +514,9 @@
<ItemGroup>
<None Include="Resources\Similar.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\MoveThingsInSectors.png" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.

View file

@ -59,6 +59,9 @@ namespace CodeImp.DoomBuilder.BuilderModes
protected ICollection<Vertex> unselectedverts;
protected ICollection<Thing> unselectedthings; //mxd
// List of things, which should be moved
protected ICollection<Thing> thingstodrag; //mxd
//mxd. List of sectors
private List<Sector> selectedSectors;
@ -127,6 +130,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
// Make list of selected vertices and things
selectedverts = General.Map.Map.GetMarkedVertices(true);
selectedthings = General.Map.Map.GetSelectedThings(true); //mxd
thingstodrag = GetThingsToDrag(); //mxd
// Make list of non-selected vertices and things
// Non-selected vertices will be used for snapping to nearest items
@ -149,8 +153,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
foreach(Vertex v in selectedverts) oldpositions.Add(v.Position);
//mxd
oldthingpositions = new List<Vector2D>(selectedthings.Count);
foreach(Thing t in selectedthings) oldthingpositions.Add(t.Position);
oldthingpositions = new List<Vector2D>(thingstodrag.Count);
foreach(Thing t in thingstodrag) oldthingpositions.Add(t.Position);
// Also keep old position of the dragged item
dragitemposition = dragitem.Position;
@ -207,6 +211,12 @@ namespace CodeImp.DoomBuilder.BuilderModes
Cursor.Current = Cursors.Default;
}
//mxd
protected virtual ICollection<Thing> GetThingsToDrag()
{
return selectedthings;
}
// This moves the selected geometry relatively
// Returns true when geometry has actually moved
private bool MoveGeometryRelative(Vector2D offset, bool snapgrid, bool snapgridincrement, bool snapnearest)
@ -252,7 +262,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
if(nl != null)
{
// Snap to grid?
if(snaptogrid || snapgridincrement)
if(snapgrid || snapgridincrement)
{
// Get grid intersection coordinates
List<Vector2D> coords = nl.GetGridIntersections(snapgridincrement ? dragstartoffset : new Vector2D());
@ -332,7 +342,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
//mxd. Move selected things
i = 0;
foreach(Thing t in selectedthings)
foreach(Thing t in thingstodrag)
{
t.Move(oldthingpositions[i++] + offset);
}

View file

@ -186,6 +186,25 @@ namespace CodeImp.DoomBuilder.BuilderModes
}
}
//mxd
protected override ICollection<Thing> GetThingsToDrag()
{
if (BuilderPlug.Me.DragThingsInSectorsMode)
{
thingstodrag = new List<Thing>();
foreach (Thing t in General.Map.ThingsFilter.VisibleThings)
{
t.DetermineSector();
if (selectedsectors.Contains(t.Sector)) thingstodrag.Add(t);
}
return thingstodrag;
}
return base.GetThingsToDrag();
}
#endregion
}
}

View file

@ -48,17 +48,20 @@ namespace CodeImp.DoomBuilder.BuilderModes
#region ================== Variables
// Mode to return to
private EditMode basemode;
private readonly EditMode basemode;
// Mouse position on map where dragging started
private Vector2D dragstartmappos;
private readonly Vector2D dragstartmappos;
//mxd. Offset from nearest grid intersection to dragstartmappos
private Vector2D dragstartoffset;
// Item used as reference for snapping to the grid
private Thing dragitem;
private Vector2D dragitemposition;
private readonly Thing dragitem;
private readonly Vector2D dragitemposition;
// List of old thing positions
private List<Vector2D> oldpositions;
private readonly List<Vector2D> oldpositions;
//mxd
private class AlignData
@ -79,10 +82,10 @@ namespace CodeImp.DoomBuilder.BuilderModes
private AlignData alignData;
// List of selected items
private ICollection<Thing> selectedthings;
private readonly ICollection<Thing> selectedthings;
// List of non-selected items
private ICollection<Thing> unselectedthings;
private readonly ICollection<Thing> unselectedthings;
// Keep track of view changes
private float lastoffsetx;
@ -92,6 +95,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
// Options
private bool snaptogrid; // SHIFT to toggle
private bool snaptonearest; // CTRL to enable
private bool snaptogridincrement; //mxd. ALT to toggle
#endregion
@ -135,6 +139,9 @@ namespace CodeImp.DoomBuilder.BuilderModes
// Also keep old position of the dragged item
dragitemposition = dragitem.Position;
//mxd. Get drag offset
dragstartoffset = dragitemposition - General.Map.Grid.SnappedToGrid(dragitem.Position);
// Keep view information
lastoffsetx = renderer.OffsetX;
lastoffsety = renderer.OffsetY;
@ -165,7 +172,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
// This moves the selected things relatively
// Returns true when things has actually moved
private bool MoveThingsRelative(Vector2D offset, bool snapgrid, bool snapnearest)
private bool MoveThingsRelative(Vector2D offset, bool snapgrid, bool snapgridincrement, bool snapnearest)
{
Vector2D oldpos = dragitem.Position;
Thing nearest;
@ -199,17 +206,25 @@ namespace CodeImp.DoomBuilder.BuilderModes
// Do not snap to grid!
snapgrid = false;
snapgridincrement = false; //mxd
}
}
// Snap to grid?
if(snapgrid)
if(snapgrid || snapgridincrement)
{
// Move the dragged item
dragitem.Move(dragitemposition + offset);
// Snap item to grid
dragitem.SnapToGrid();
// Snap item to grid increment
if(snapgridincrement) //mxd
{
dragitem.Move(General.Map.Grid.SnappedToGrid(dragitemposition + offset + dragstartoffset) - dragstartoffset);
}
else // Or to the grid itself
{
dragitem.SnapToGrid();
}
// Adjust the offset
offset += (Vector2D)dragitem.Position - (dragitemposition + offset);
@ -222,7 +237,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
if (offset.y + br.y < General.Map.Config.BottomBoundary) offset.y = General.Map.Config.BottomBoundary - br.y;
// Drag item moved?
if(!snapgrid || ((Vector2D)dragitem.Position != oldpos))
if((!snapgrid && !snapgridincrement) || ((Vector2D)dragitem.Position != oldpos))
{
int i = 0;
@ -305,7 +320,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
public override void OnCancel()
{
// Move geometry back to original position
MoveThingsRelative(new Vector2D(0f, 0f), false, false);
MoveThingsRelative(new Vector2D(0f, 0f), false, false, false);
// If only a single vertex was selected, deselect it now
if(selectedthings.Count == 1) General.Map.Map.ClearSelectedThings();
@ -337,7 +352,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
if(!cancelled)
{
// Move geometry back to original position
MoveThingsRelative(new Vector2D(0f, 0f), false, false);
MoveThingsRelative(new Vector2D(0f, 0f), false, false, false);
if(alignData != null && alignData.Active){
alignData.CurrentAngle = dragitem.AngleDoom; //mxd
@ -357,7 +372,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
dragitem.Move(dragitem.Position.x, dragitem.Position.y, alignData.CurrentHeight);
dragitem.Rotate(alignData.CurrentAngle);
} else {
MoveThingsRelative(mousemappos - dragstartmappos, snaptogrid, snaptonearest);
MoveThingsRelative(mousemappos - dragstartmappos, snaptogrid, snaptogridincrement, snaptonearest);
}
// Snap to map format accuracy
@ -397,9 +412,10 @@ namespace CodeImp.DoomBuilder.BuilderModes
{
snaptogrid = General.Interface.ShiftState ^ General.Interface.SnapToGrid;
snaptonearest = General.Interface.CtrlState;
snaptogridincrement = General.Interface.AltState; //mxd
//mxd. Snap to nearest linedef
if(selectedthings.Count == 1 && dragitem.IsModel && snaptonearest && MoveThingsRelative(mousemappos - dragstartmappos, snaptogrid, false)) {
if(selectedthings.Count == 1 && dragitem.IsModel && snaptonearest && MoveThingsRelative(mousemappos - dragstartmappos, snaptogrid, snaptogridincrement, false)) {
Linedef l = General.Map.Map.NearestLinedefRange(oldpositions[0] + mousemappos - dragstartmappos, BuilderPlug.Me.StitchRange / renderer.Scale);
bool restoreSettings = false;
@ -433,7 +449,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
}
// Move selected geometry
if(MoveThingsRelative(mousemappos - dragstartmappos, snaptogrid, snaptonearest))
if(MoveThingsRelative(mousemappos - dragstartmappos, snaptogrid, snaptogridincrement, snaptonearest))
{
// Update cached values
General.Map.Map.Update();
@ -464,16 +480,18 @@ namespace CodeImp.DoomBuilder.BuilderModes
public override void OnKeyUp(KeyEventArgs e)
{
base.OnKeyUp(e);
if(snaptogrid != General.Interface.ShiftState ^ General.Interface.SnapToGrid) Update();
if(snaptonearest != General.Interface.CtrlState) Update();
if(snaptogrid != General.Interface.ShiftState ^ General.Interface.SnapToGrid ||
snaptonearest != General.Interface.CtrlState ||
snaptogridincrement != General.Interface.AltState) Update();
}
// When a key is pressed
public override void OnKeyDown(KeyEventArgs e)
{
base.OnKeyDown(e);
if(snaptogrid != General.Interface.ShiftState ^ General.Interface.SnapToGrid) Update();
if(snaptonearest != General.Interface.CtrlState) Update();
if(snaptogrid != General.Interface.ShiftState ^ General.Interface.SnapToGrid ||
snaptonearest != General.Interface.CtrlState ||
snaptogridincrement != General.Interface.AltState) Update();
}
#endregion

View file

@ -587,6 +587,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
General.Interface.AddButton(BuilderPlug.Me.MenusForm.MakeGradientFloors);
General.Interface.AddButton(BuilderPlug.Me.MenusForm.MakeGradientCeilings);
General.Interface.AddButton(BuilderPlug.Me.MenusForm.MarqueSelectTouching); //mxd
General.Interface.AddButton(BuilderPlug.Me.MenusForm.DragThingsInSelectedSectors); //mxd
if(General.Map.UDMF) General.Interface.AddButton(BuilderPlug.Me.MenusForm.TextureOffsetLock, ToolbarSection.Geometry); //mxd
// Convert geometry selection to sectors only
@ -621,6 +622,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.MakeGradientFloors);
General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.MakeGradientCeilings);
General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.MarqueSelectTouching); //mxd
General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.DragThingsInSelectedSectors); //mxd
if(General.Map.UDMF) General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.TextureOffsetLock); //mxd
// Keep only sectors selected
@ -718,22 +720,6 @@ namespace CodeImp.DoomBuilder.BuilderModes
//mxd. Flip selection
SelectSector(highlighted, !highlighted.Selected, true);
//mxd. Also (de)select things inside of this sector
if (General.Interface.AltState) {
foreach(Thing t in General.Map.ThingsFilter.VisibleThings) {
t.DetermineSector();
if(t.Sector != highlighted) continue;
t.Selected = highlighted.Selected;
}
// Render things
if(renderer.StartThings(true)) {
renderer.RenderThingSet(General.Map.ThingsFilter.HiddenThings, Presentation.THINGS_HIDDEN_ALPHA);
renderer.RenderThingSet(General.Map.ThingsFilter.VisibleThings, 1.0f);
renderer.Finish();
}
}
// Update display
if(renderer.StartPlotter(false))
{

View file

@ -108,6 +108,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
private bool marqueSelectTouching; //mxd. Select elements partially/fully inside of marque selection?
private bool syncSelection; //mxd. Sync selection between Visual and Classic modes.
private bool lockSectorTextureOffsetsWhileDragging; //mxd
private bool dragThingsInSectorsMode; //mxd
#endregion
@ -167,6 +168,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
public bool MarqueSelectTouching { get { return marqueSelectTouching; } set { marqueSelectTouching = value; } } //mxd
public bool SyncSelection { get { return syncSelection; } set { syncSelection = value; } } //mxd
public bool LockSectorTextureOffsetsWhileDragging { get { return lockSectorTextureOffsetsWhileDragging; } internal set { lockSectorTextureOffsetsWhileDragging = value; } } //mxd
public bool DragThingsInSectorsMode { get { return dragThingsInSectorsMode; } internal set { dragThingsInSectorsMode = value; } } //mxd
#endregion
@ -188,6 +190,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
menusform = new MenusForm();
menusform.Register();
menusform.TextureOffsetLock.Checked = lockSectorTextureOffsetsWhileDragging; //mxd
menusform.DragThingsInSelectedSectors.Checked = dragThingsInSectorsMode; //mxd
// Load Undo\Redo docker
undoredopanel = new UndoRedoPanel();
@ -249,6 +252,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
dontMoveGeometryOutsideMapBoundary = General.Settings.ReadPluginSetting("dontmovegeometryoutsidemapboundary", false); //mxd
syncSelection = General.Settings.ReadPluginSetting("syncselection", false); //mxd
lockSectorTextureOffsetsWhileDragging = General.Settings.ReadPluginSetting("locktextureoffsets", false); //mxd
dragThingsInSectorsMode = General.Settings.ReadPluginSetting("dragthingsinsectorsmode", true); //mxd
}
//mxd. Save settings, which can be changed via UI
@ -256,6 +260,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
General.Settings.WritePluginSetting("locktextureoffsets", lockSectorTextureOffsetsWhileDragging);
General.Settings.WritePluginSetting("viewselectionnumbers", viewselectionnumbers);
General.Settings.WritePluginSetting("viewselectioneffects", viewselectioneffects);
General.Settings.WritePluginSetting("dragthingsinsectorsmode", dragThingsInSectorsMode);
}
#endregion

View file

@ -48,7 +48,6 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.alignCeilingToFrontItem = new System.Windows.Forms.ToolStripMenuItem();
this.alignCeilingToBackItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator();
this.selectSimilarLinesItem = new System.Windows.Forms.ToolStripMenuItem();
this.sectorsmenu = new System.Windows.Forms.ToolStripMenuItem();
this.placethingss = new System.Windows.Forms.ToolStripMenuItem();
this.selectInSectorsItem2 = new System.Windows.Forms.ToolStripMenuItem();
@ -56,46 +55,48 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.joinsectorsitem = new System.Windows.Forms.ToolStripMenuItem();
this.mergesectorsitem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem2 = new System.Windows.Forms.ToolStripSeparator();
this.makedooritem = new System.Windows.Forms.ToolStripMenuItem();
this.flipsectorlinedefsitem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator8 = new System.Windows.Forms.ToolStripSeparator();
this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator();
this.selectSimilarSectors = new System.Windows.Forms.ToolStripMenuItem();
this.thingsmenu = new System.Windows.Forms.ToolStripMenuItem();
this.selectInSectorsItem = new System.Windows.Forms.ToolStripMenuItem();
this.filterSelectionItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator();
this.alignToWallItem = new System.Windows.Forms.ToolStripMenuItem();
this.pointAtCursorItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator6 = new System.Windows.Forms.ToolStripSeparator();
this.selectSimilarThingsItem = new System.Windows.Forms.ToolStripMenuItem();
this.vertsmenu = new System.Windows.Forms.ToolStripMenuItem();
this.placethingsv = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator7 = new System.Windows.Forms.ToolStripSeparator();
this.selectSimilarVertsItem = new System.Windows.Forms.ToolStripMenuItem();
this.globalstrip = new System.Windows.Forms.ToolStrip();
this.manualstrip = new System.Windows.Forms.ToolStrip();
this.seperatorcopypaste = new System.Windows.Forms.ToolStripSeparator();
this.separatorsectors1 = new System.Windows.Forms.ToolStripSeparator();
this.brightnessGradientMode = new System.Windows.Forms.ToolStripComboBox();
this.fileMenuStrip = new System.Windows.Forms.MenuStrip();
this.exportStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem5 = new System.Windows.Forms.ToolStripMenuItem();
this.buttoncopyproperties = new System.Windows.Forms.ToolStripButton();
this.buttonpasteproperties = new System.Windows.Forms.ToolStripButton();
this.buttonpastepropertiesoptions = new System.Windows.Forms.ToolStripButton();
this.seperatorcopypaste = new System.Windows.Forms.ToolStripSeparator();
this.buttonselectionnumbers = new System.Windows.Forms.ToolStripButton();
this.buttonselectioneffects = new System.Windows.Forms.ToolStripButton();
this.separatorsectors1 = new System.Windows.Forms.ToolStripSeparator();
this.buttonbrightnessgradient = new System.Windows.Forms.ToolStripButton();
this.buttonfloorgradient = new System.Windows.Forms.ToolStripButton();
this.buttonceilinggradient = new System.Windows.Forms.ToolStripButton();
this.buttonflipselectionh = new System.Windows.Forms.ToolStripButton();
this.buttonflipselectionv = new System.Windows.Forms.ToolStripButton();
this.buttoncurvelinedefs = new System.Windows.Forms.ToolStripButton();
this.brightnessGradientMode = new System.Windows.Forms.ToolStripComboBox();
this.buttonMarqueSelectTouching = new System.Windows.Forms.ToolStripButton();
this.buttonDragThingsInSelectedSectors = new System.Windows.Forms.ToolStripButton();
this.buttonAlignThingsToWall = new System.Windows.Forms.ToolStripButton();
this.buttonTextureOffsetLock = new System.Windows.Forms.ToolStripButton();
this.buttonMakeDoor = new System.Windows.Forms.ToolStripButton();
this.fileMenuStrip = new System.Windows.Forms.MenuStrip();
this.exportStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem5 = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator8 = new System.Windows.Forms.ToolStripSeparator();
this.flipsectorlinedefsitem = new System.Windows.Forms.ToolStripMenuItem();
this.selectSimilarLinesItem = new System.Windows.Forms.ToolStripMenuItem();
this.makedooritem = new System.Windows.Forms.ToolStripMenuItem();
this.selectSimilarSectors = new System.Windows.Forms.ToolStripMenuItem();
this.filterSelectionItem = new System.Windows.Forms.ToolStripMenuItem();
this.alignToWallItem = new System.Windows.Forms.ToolStripMenuItem();
this.pointAtCursorItem = new System.Windows.Forms.ToolStripMenuItem();
this.selectSimilarThingsItem = new System.Windows.Forms.ToolStripMenuItem();
this.selectSimilarVertsItem = new System.Windows.Forms.ToolStripMenuItem();
this.menustrip.SuspendLayout();
this.manualstrip.SuspendLayout();
this.fileMenuStrip.SuspendLayout();
@ -269,15 +270,6 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.toolStripSeparator5.Name = "toolStripSeparator5";
this.toolStripSeparator5.Size = new System.Drawing.Size(242, 6);
//
// selectSimilarLinesItem
//
this.selectSimilarLinesItem.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.Similar;
this.selectSimilarLinesItem.Name = "selectSimilarLinesItem";
this.selectSimilarLinesItem.Size = new System.Drawing.Size(245, 22);
this.selectSimilarLinesItem.Tag = "selectsimilar";
this.selectSimilarLinesItem.Text = "Select Similar...";
this.selectSimilarLinesItem.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// sectorsmenu
//
this.sectorsmenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
@ -338,14 +330,18 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.toolStripMenuItem2.Name = "toolStripMenuItem2";
this.toolStripMenuItem2.Size = new System.Drawing.Size(242, 6);
//
// makedooritem
// flipsectorlinedefsitem
//
this.makedooritem.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.Door;
this.makedooritem.Name = "makedooritem";
this.makedooritem.Size = new System.Drawing.Size(245, 22);
this.makedooritem.Tag = "makedoor";
this.makedooritem.Text = "Make &Door";
this.makedooritem.Click += new System.EventHandler(this.InvokeTaggedAction);
this.flipsectorlinedefsitem.Name = "flipsectorlinedefsitem";
this.flipsectorlinedefsitem.Size = new System.Drawing.Size(245, 22);
this.flipsectorlinedefsitem.Tag = "fliplinedefs";
this.flipsectorlinedefsitem.Text = "&Flip Linedefs";
this.flipsectorlinedefsitem.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// toolStripSeparator8
//
this.toolStripSeparator8.Name = "toolStripSeparator8";
this.toolStripSeparator8.Size = new System.Drawing.Size(242, 6);
//
// toolStripSeparator4
//
@ -353,15 +349,6 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.toolStripSeparator4.Size = new System.Drawing.Size(242, 6);
this.toolStripSeparator4.Visible = false;
//
// selectSimilarSectors
//
this.selectSimilarSectors.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.Similar;
this.selectSimilarSectors.Name = "selectSimilarSectors";
this.selectSimilarSectors.Size = new System.Drawing.Size(245, 22);
this.selectSimilarSectors.Tag = "selectsimilar";
this.selectSimilarSectors.Text = "Select Similar...";
this.selectSimilarSectors.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// thingsmenu
//
this.thingsmenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
@ -385,52 +372,16 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.selectInSectorsItem.Text = "&Select Things in Selected Sectors";
this.selectInSectorsItem.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// filterSelectionItem
//
this.filterSelectionItem.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.FilterThings;
this.filterSelectionItem.Name = "filterSelectionItem";
this.filterSelectionItem.Size = new System.Drawing.Size(245, 22);
this.filterSelectionItem.Tag = "filterselectedthings";
this.filterSelectionItem.Text = "Filter Selection...";
this.filterSelectionItem.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// toolStripSeparator3
//
this.toolStripSeparator3.Name = "toolStripSeparator3";
this.toolStripSeparator3.Size = new System.Drawing.Size(242, 6);
//
// alignToWallItem
//
this.alignToWallItem.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.AlignThings;
this.alignToWallItem.Name = "alignToWallItem";
this.alignToWallItem.Size = new System.Drawing.Size(245, 22);
this.alignToWallItem.Tag = "thingaligntowall";
this.alignToWallItem.Text = "&Align To Closest Linedef";
this.alignToWallItem.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// pointAtCursorItem
//
this.pointAtCursorItem.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.ThingPointAtCursor;
this.pointAtCursorItem.Name = "pointAtCursorItem";
this.pointAtCursorItem.Size = new System.Drawing.Size(245, 22);
this.pointAtCursorItem.Tag = "thinglookatcursor";
this.pointAtCursorItem.Text = "&Point at Cursor";
this.pointAtCursorItem.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// toolStripSeparator6
//
this.toolStripSeparator6.Name = "toolStripSeparator6";
this.toolStripSeparator6.Size = new System.Drawing.Size(242, 6);
//
// selectSimilarThingsItem
//
this.selectSimilarThingsItem.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.Similar;
this.selectSimilarThingsItem.Name = "selectSimilarThingsItem";
this.selectSimilarThingsItem.Size = new System.Drawing.Size(245, 22);
this.selectSimilarThingsItem.Tag = "selectsimilar";
this.selectSimilarThingsItem.Text = "Select Similar...";
this.selectSimilarThingsItem.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// vertsmenu
//
this.vertsmenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
@ -455,15 +406,6 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.toolStripSeparator7.Name = "toolStripSeparator7";
this.toolStripSeparator7.Size = new System.Drawing.Size(150, 6);
//
// selectSimilarVertsItem
//
this.selectSimilarVertsItem.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.Similar;
this.selectSimilarVertsItem.Name = "selectSimilarVertsItem";
this.selectSimilarVertsItem.Size = new System.Drawing.Size(153, 22);
this.selectSimilarVertsItem.Tag = "selectsimilar";
this.selectSimilarVertsItem.Text = "Select Similar...";
this.selectSimilarVertsItem.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// globalstrip
//
this.globalstrip.Location = new System.Drawing.Point(0, 48);
@ -490,6 +432,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.buttoncurvelinedefs,
this.brightnessGradientMode,
this.buttonMarqueSelectTouching,
this.buttonDragThingsInSelectedSectors,
this.buttonAlignThingsToWall,
this.buttonTextureOffsetLock,
this.buttonMakeDoor});
@ -499,6 +442,52 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.manualstrip.TabIndex = 2;
this.manualstrip.Text = "toolStrip1";
//
// seperatorcopypaste
//
this.seperatorcopypaste.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
this.seperatorcopypaste.Name = "seperatorcopypaste";
this.seperatorcopypaste.Size = new System.Drawing.Size(6, 25);
//
// separatorsectors1
//
this.separatorsectors1.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
this.separatorsectors1.Name = "separatorsectors1";
this.separatorsectors1.Size = new System.Drawing.Size(6, 25);
//
// brightnessGradientMode
//
this.brightnessGradientMode.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.brightnessGradientMode.Name = "brightnessGradientMode";
this.brightnessGradientMode.Size = new System.Drawing.Size(75, 25);
this.brightnessGradientMode.ToolTipText = "Brightness Gradient affects:";
this.brightnessGradientMode.DropDownClosed += new System.EventHandler(this.brightnessGradientMode_DropDownClosed);
//
// fileMenuStrip
//
this.fileMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.exportStripMenuItem});
this.fileMenuStrip.Location = new System.Drawing.Point(0, 0);
this.fileMenuStrip.Name = "fileMenuStrip";
this.fileMenuStrip.Size = new System.Drawing.Size(588, 24);
this.fileMenuStrip.TabIndex = 3;
this.fileMenuStrip.Text = "menuStrip1";
//
// exportStripMenuItem
//
this.exportStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStripMenuItem5});
this.exportStripMenuItem.Name = "exportStripMenuItem";
this.exportStripMenuItem.Size = new System.Drawing.Size(52, 20);
this.exportStripMenuItem.Text = "Export";
//
// toolStripMenuItem5
//
this.toolStripMenuItem5.Name = "toolStripMenuItem5";
this.toolStripMenuItem5.Size = new System.Drawing.Size(229, 22);
this.toolStripMenuItem5.Tag = "exporttoobj";
this.toolStripMenuItem5.Text = "Selection To Wavefront .obj...";
this.toolStripMenuItem5.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// buttoncopyproperties
//
this.buttoncopyproperties.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
@ -532,12 +521,6 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.buttonpastepropertiesoptions.Text = "Choose Properties to Paste";
this.buttonpastepropertiesoptions.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// seperatorcopypaste
//
this.seperatorcopypaste.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
this.seperatorcopypaste.Name = "seperatorcopypaste";
this.seperatorcopypaste.Size = new System.Drawing.Size(6, 25);
//
// buttonselectionnumbers
//
this.buttonselectionnumbers.CheckOnClick = true;
@ -560,12 +543,6 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.buttonselectioneffects.Text = "View Tags and Effects";
this.buttonselectioneffects.Click += new System.EventHandler(this.buttonselectioneffects_Click);
//
// separatorsectors1
//
this.separatorsectors1.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
this.separatorsectors1.Name = "separatorsectors1";
this.separatorsectors1.Size = new System.Drawing.Size(6, 25);
//
// buttonbrightnessgradient
//
this.buttonbrightnessgradient.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
@ -633,14 +610,6 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.buttoncurvelinedefs.Text = "Curve Linedefs";
this.buttoncurvelinedefs.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// brightnessGradientMode
//
this.brightnessGradientMode.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.brightnessGradientMode.Name = "brightnessGradientMode";
this.brightnessGradientMode.Size = new System.Drawing.Size(75, 25);
this.brightnessGradientMode.ToolTipText = "Brightness Gradient affects:";
this.brightnessGradientMode.DropDownClosed += new System.EventHandler(this.brightnessGradientMode_DropDownClosed);
//
// buttonMarqueSelectTouching
//
this.buttonMarqueSelectTouching.CheckOnClick = true;
@ -654,6 +623,19 @@ namespace CodeImp.DoomBuilder.BuilderModes
"";
this.buttonMarqueSelectTouching.Click += new System.EventHandler(this.buttonMarqueSelectTouching_Click);
//
// buttonDragThingsInSelectedSectors
//
this.buttonDragThingsInSelectedSectors.CheckOnClick = true;
this.buttonDragThingsInSelectedSectors.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.buttonDragThingsInSelectedSectors.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.MoveThingsInSectors;
this.buttonDragThingsInSelectedSectors.ImageTransparentColor = System.Drawing.Color.Magenta;
this.buttonDragThingsInSelectedSectors.Name = "buttonDragThingsInSelectedSectors";
this.buttonDragThingsInSelectedSectors.Size = new System.Drawing.Size(23, 22);
this.buttonDragThingsInSelectedSectors.Text = "Move Things in Selected Sectors";
this.buttonDragThingsInSelectedSectors.ToolTipText = "When enabled, all things inside of selected sectors \r\nwill be dragged when draggi" +
"ng sectors.\r\nOtherwise, selected things will be dragged.";
this.buttonDragThingsInSelectedSectors.Click += new System.EventHandler(this.buttonDragThingsInSelectedSectors_Click);
//
// buttonAlignThingsToWall
//
this.buttonAlignThingsToWall.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
@ -688,44 +670,77 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.buttonMakeDoor.Text = "Make Door From Selection";
this.buttonMakeDoor.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// fileMenuStrip
// selectSimilarLinesItem
//
this.fileMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.exportStripMenuItem});
this.fileMenuStrip.Location = new System.Drawing.Point(0, 0);
this.fileMenuStrip.Name = "fileMenuStrip";
this.fileMenuStrip.Size = new System.Drawing.Size(588, 24);
this.fileMenuStrip.TabIndex = 3;
this.fileMenuStrip.Text = "menuStrip1";
this.selectSimilarLinesItem.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.Similar;
this.selectSimilarLinesItem.Name = "selectSimilarLinesItem";
this.selectSimilarLinesItem.Size = new System.Drawing.Size(245, 22);
this.selectSimilarLinesItem.Tag = "selectsimilar";
this.selectSimilarLinesItem.Text = "Select Similar...";
this.selectSimilarLinesItem.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// exportStripMenuItem
// makedooritem
//
this.exportStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStripMenuItem5});
this.exportStripMenuItem.Name = "exportStripMenuItem";
this.exportStripMenuItem.Size = new System.Drawing.Size(52, 20);
this.exportStripMenuItem.Text = "Export";
this.makedooritem.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.Door;
this.makedooritem.Name = "makedooritem";
this.makedooritem.Size = new System.Drawing.Size(245, 22);
this.makedooritem.Tag = "makedoor";
this.makedooritem.Text = "Make &Door";
this.makedooritem.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// toolStripMenuItem5
// selectSimilarSectors
//
this.toolStripMenuItem5.Name = "toolStripMenuItem5";
this.toolStripMenuItem5.Size = new System.Drawing.Size(229, 22);
this.toolStripMenuItem5.Tag = "exporttoobj";
this.toolStripMenuItem5.Text = "Selection To Wavefront .obj...";
this.toolStripMenuItem5.Click += new System.EventHandler(this.InvokeTaggedAction);
this.selectSimilarSectors.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.Similar;
this.selectSimilarSectors.Name = "selectSimilarSectors";
this.selectSimilarSectors.Size = new System.Drawing.Size(245, 22);
this.selectSimilarSectors.Tag = "selectsimilar";
this.selectSimilarSectors.Text = "Select Similar...";
this.selectSimilarSectors.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// toolStripSeparator8
// filterSelectionItem
//
this.toolStripSeparator8.Name = "toolStripSeparator8";
this.toolStripSeparator8.Size = new System.Drawing.Size(242, 6);
this.filterSelectionItem.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.FilterThings;
this.filterSelectionItem.Name = "filterSelectionItem";
this.filterSelectionItem.Size = new System.Drawing.Size(245, 22);
this.filterSelectionItem.Tag = "filterselectedthings";
this.filterSelectionItem.Text = "Filter Selection...";
this.filterSelectionItem.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// flipsectorlinedefsitem
// alignToWallItem
//
this.flipsectorlinedefsitem.Name = "flipsectorlinedefsitem";
this.flipsectorlinedefsitem.Size = new System.Drawing.Size(245, 22);
this.flipsectorlinedefsitem.Tag = "fliplinedefs";
this.flipsectorlinedefsitem.Text = "&Flip Linedefs";
this.flipsectorlinedefsitem.Click += new System.EventHandler(this.InvokeTaggedAction);
this.alignToWallItem.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.AlignThings;
this.alignToWallItem.Name = "alignToWallItem";
this.alignToWallItem.Size = new System.Drawing.Size(245, 22);
this.alignToWallItem.Tag = "thingaligntowall";
this.alignToWallItem.Text = "&Align To Closest Linedef";
this.alignToWallItem.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// pointAtCursorItem
//
this.pointAtCursorItem.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.ThingPointAtCursor;
this.pointAtCursorItem.Name = "pointAtCursorItem";
this.pointAtCursorItem.Size = new System.Drawing.Size(245, 22);
this.pointAtCursorItem.Tag = "thinglookatcursor";
this.pointAtCursorItem.Text = "&Point at Cursor";
this.pointAtCursorItem.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// selectSimilarThingsItem
//
this.selectSimilarThingsItem.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.Similar;
this.selectSimilarThingsItem.Name = "selectSimilarThingsItem";
this.selectSimilarThingsItem.Size = new System.Drawing.Size(245, 22);
this.selectSimilarThingsItem.Tag = "selectsimilar";
this.selectSimilarThingsItem.Text = "Select Similar...";
this.selectSimilarThingsItem.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// selectSimilarVertsItem
//
this.selectSimilarVertsItem.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.Similar;
this.selectSimilarVertsItem.Name = "selectSimilarVertsItem";
this.selectSimilarVertsItem.Size = new System.Drawing.Size(153, 22);
this.selectSimilarVertsItem.Tag = "selectsimilar";
this.selectSimilarVertsItem.Text = "Select Similar...";
this.selectSimilarVertsItem.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// MenusForm
//
@ -826,5 +841,6 @@ namespace CodeImp.DoomBuilder.BuilderModes
private System.Windows.Forms.ToolStripMenuItem selectSimilarVertsItem;
private System.Windows.Forms.ToolStripMenuItem flipsectorlinedefsitem;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator8;
private System.Windows.Forms.ToolStripButton buttonDragThingsInSelectedSectors;
}
}

View file

@ -71,6 +71,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
public ToolStripButton MarqueSelectTouching { get { return buttonMarqueSelectTouching; } } //mxd
public ToolStripButton AlignThingsToWall { get { return buttonAlignThingsToWall; } } //mxd
public ToolStripButton TextureOffsetLock { get { return buttonTextureOffsetLock; } } //mxd
public ToolStripButton DragThingsInSelectedSectors { get { return buttonDragThingsInSelectedSectors; } } //mxd
public ToolStripButton MakeDoor { get { return buttonMakeDoor; } } //mxd
#endregion
@ -213,6 +214,11 @@ namespace CodeImp.DoomBuilder.BuilderModes
General.Interface.FocusDisplay();
}
//mxd
private void buttonDragThingsInSelectedSectors_Click(object sender, EventArgs e) {
BuilderPlug.Me.DragThingsInSectorsMode = buttonDragThingsInSelectedSectors.Checked;
}
#endregion
}
}

View file

@ -214,6 +214,13 @@ namespace CodeImp.DoomBuilder.BuilderModes.Properties {
}
}
internal static System.Drawing.Bitmap MoveThingsInSectors {
get {
object obj = ResourceManager.GetObject("MoveThingsInSectors", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap PasteProperties {
get {
object obj = ResourceManager.GetObject("PasteProperties", resourceCulture);

View file

@ -139,6 +139,9 @@
<data name="SnapVerts" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\SnapVerts.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Similar" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Similar.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="DrawGridMode" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\DrawGridMode.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
@ -220,7 +223,7 @@
<data name="FilterThings" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\FilterThings.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Similar" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Similar.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="MoveThingsInSectors" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\MoveThingsInSectors.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

Binary file not shown.

After

Width:  |  Height:  |  Size: 561 B