Visual Mode: You can now Shift-Select (usually Select = LMB) to select all adjacent surfaces with same texture, Ctrl-Select to select all adjacent surfaces with same height.

Added Selection Groups options to Edit menu.
Selection Groups can now be cleared using either Edit -> Clear Group or Ctrl-Shift-[group number] shortcut.
Toolbar button groups can now be toggled using context menu. Hold "Shift" to toggle several button groups at once.
This commit is contained in:
MaxED 2013-04-01 11:06:01 +00:00
parent e243450f74
commit c6378809d5
30 changed files with 1226 additions and 68 deletions

View file

@ -753,6 +753,7 @@
<DependentUpon>TagStatisticsForm.cs</DependentUpon>
</Compile>
<Compile Include="IO\DoomColormapReader.cs" />
<Compile Include="Map\GroupInfo.cs" />
<Compile Include="Map\SelectionType.cs" />
<Compile Include="Map\MapElementCollection.cs" />
<Compile Include="Rendering\SurfaceBufferSet.cs" />
@ -852,6 +853,7 @@
<None Include="Resources\Add.png" />
<None Include="Resources\ArrowDown.png" />
<None Include="Resources\ArrowUp.png" />
<None Include="Resources\Check.png" />
<Content Include="Resources\DB2.ico" />
<None Include="Resources\GZDB2.ico" />
<None Include="Resources\fog.png" />

View file

@ -16,8 +16,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BuilderEffects", "..\Plugin
{818B3D10-F791-4C3F-9AF5-BB2D0079B63C} = {818B3D10-F791-4C3F-9AF5-BB2D0079B63C}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CommentsPanel", "..\Plugins\CommentsPanel\CommentsPanel.csproj", "{58BD8A5B-1B48-435D-8473-A92F27D06C49}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -90,16 +88,6 @@ Global
{B859BE0F-A992-476D-A642-FA8EFE94AAA5}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{B859BE0F-A992-476D-A642-FA8EFE94AAA5}.Release|x86.ActiveCfg = Release|x86
{B859BE0F-A992-476D-A642-FA8EFE94AAA5}.Release|x86.Build.0 = Release|x86
{58BD8A5B-1B48-435D-8473-A92F27D06C49}.Debug|Any CPU.ActiveCfg = Debug|x86
{58BD8A5B-1B48-435D-8473-A92F27D06C49}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
{58BD8A5B-1B48-435D-8473-A92F27D06C49}.Debug|Mixed Platforms.Build.0 = Debug|x86
{58BD8A5B-1B48-435D-8473-A92F27D06C49}.Debug|x86.ActiveCfg = Debug|x86
{58BD8A5B-1B48-435D-8473-A92F27D06C49}.Debug|x86.Build.0 = Debug|x86
{58BD8A5B-1B48-435D-8473-A92F27D06C49}.Release|Any CPU.ActiveCfg = Release|x86
{58BD8A5B-1B48-435D-8473-A92F27D06C49}.Release|Mixed Platforms.ActiveCfg = Release|x86
{58BD8A5B-1B48-435D-8473-A92F27D06C49}.Release|Mixed Platforms.Build.0 = Release|x86
{58BD8A5B-1B48-435D-8473-A92F27D06C49}.Release|x86.ActiveCfg = Release|x86
{58BD8A5B-1B48-435D-8473-A92F27D06C49}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View file

@ -78,13 +78,15 @@ namespace CodeImp.DoomBuilder.Compilers
int line = 0;
string sourcedir = Path.GetDirectoryName(sourcefile);
//xabis
// Copy includes from the resources into the compiler's folder, preserving relative pathing and naming
foreach (string include in General.Map.ScriptIncludes) {
//grab the script text from the resources
MemoryStream s = General.Map.Data.LoadFile(include);
if (s != null) {
//pull the pk3 or directory sub folder out if applicable
FileInfo fi = new FileInfo(this.tempdir.FullName + @"\" + include);
FileInfo fi = new FileInfo(Path.Combine(this.tempdir.FullName, include));
//do not allow files to be overwritten, either accidentally or maliciously
if (!fi.Exists) {

View file

@ -1103,13 +1103,13 @@ namespace CodeImp.DoomBuilder {
private void AddSelectionToGroup(int groupindex) {
General.Interface.SetCursor(Cursors.WaitCursor);
// Make undo
undoredo.CreateUndo("Assign to group " + groupindex);
// Make undo. mxd: group assignment is not recorded
//undoredo.CreateUndo("Assign to group " + (groupindex + 1));
// Make selection
map.AddSelectionToGroup(0x01 << groupindex);
map.AddSelectionToGroup(groupindex); //mxd. switched groupmask to groupindex
General.Interface.DisplayStatus(StatusType.Action, "Assigned selection to group " + groupindex);
General.Interface.DisplayStatus(StatusType.Action, "Assigned selection to group " + (groupindex + 1));
General.Interface.SetCursor(Cursors.Default);
}
@ -1123,10 +1123,21 @@ namespace CodeImp.DoomBuilder {
map.SelectThingsByGroup(groupmask);
// Redraw to show selection
General.Interface.DisplayStatus(StatusType.Action, "Selected group " + groupindex);
General.Interface.DisplayStatus(StatusType.Action, "Selected group " + (groupindex + 1));
General.Interface.RedrawDisplay();
}
//mxd. This clears a group
private void ClearGroup(int groupindex) {
General.Interface.SetCursor(Cursors.WaitCursor);
// Clear group
map.ClearGroup(0x01 << groupindex, groupindex);
General.Interface.DisplayStatus(StatusType.Action, "Cleared group " + (groupindex + 1));
General.Interface.SetCursor(Cursors.Default);
}
// Select actions
[BeginAction("selectgroup1")]
internal void SelectGroup1() { SelectGroup(0); }
@ -1171,6 +1182,28 @@ namespace CodeImp.DoomBuilder {
[BeginAction("assigngroup10")]
internal void AssignGroup10() { AddSelectionToGroup(9); }
//mxd. Clear actions
[BeginAction("cleargroup1")]
internal void ClearGroup1() { ClearGroup(0); }
[BeginAction("cleargroup2")]
internal void ClearGroup2() { ClearGroup(1); }
[BeginAction("cleargroup3")]
internal void ClearGroup3() { ClearGroup(2); }
[BeginAction("cleargroup4")]
internal void ClearGroup4() { ClearGroup(3); }
[BeginAction("cleargroup5")]
internal void ClearGroup5() { ClearGroup(4); }
[BeginAction("cleargroup6")]
internal void ClearGroup6() { ClearGroup(5); }
[BeginAction("cleargroup7")]
internal void ClearGroup7() { ClearGroup(6); }
[BeginAction("cleargroup8")]
internal void ClearGroup8() { ClearGroup(7); }
[BeginAction("cleargroup9")]
internal void ClearGroup9() { ClearGroup(8); }
[BeginAction("cleargroup10")]
internal void ClearGroup10() { ClearGroup(9); }
#endregion
#region ================== Script Editing

View file

@ -0,0 +1,56 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace CodeImp.DoomBuilder.Map
{
public class GroupInfo
{
private int numSectors;
private int numLines;
private int numVerts;
private int numThings;
public GroupInfo(int numSectors, int numLines, int numVerts, int numThings) {
this.numSectors = numSectors;
this.numLines = numLines;
this.numVerts = numVerts;
this.numThings = numThings;
}
public override string ToString() {
string result = string.Empty;
if(numSectors > 0) result = numSectors + (numSectors > 1 ? " sectors" : " sector");
if(numLines > 0){
if(string.IsNullOrEmpty(result))
result = numLines + (numLines > 1 ? " lines" : " line");
else
result += ", " + numLines + (numLines > 1 ? " lines" : " line");
}
if(numVerts > 0){
if(string.IsNullOrEmpty(result))
result = numVerts + (numVerts > 1 ? " vertices" : " vertex");
else
result += ", " + numLines + (numVerts > 1 ? " vertices" : " vertex");
}
if(numThings > 0){
if(string.IsNullOrEmpty(result))
result = numThings + (numThings > 1 ? " things" : " thing");
else
result += ", " + numThings + (numThings > 1 ? " things" : " thing");
}
return result;
}
internal void Append(int numSectors, int numLines, int numVerts, int numThings) {
this.numSectors += numSectors;
this.numLines += numLines;
this.numVerts += numVerts;
this.numThings += numThings;
}
}
}

View file

@ -84,6 +84,7 @@ namespace CodeImp.DoomBuilder.Map
//mxd
private Sector[] newSectors;
private GroupInfo[] groupInfos;
// Behavior
private int freezearrays;
@ -165,7 +166,9 @@ namespace CodeImp.DoomBuilder.Map
internal bool AutoRemove { get { return autoremove; } set { autoremove = value; } }
public Sector[] NewSectors { get { return newSectors; } }
public Sector[] NewSectors { get { return newSectors; } } //mxd
public GroupInfo[] GroupInfos { get { return groupInfos; } } //mxd
#endregion
@ -188,6 +191,7 @@ namespace CodeImp.DoomBuilder.Map
lastsectorindex = 0;
autoremove = true;
newSectors = new Sector[0]; //mxd
groupInfos = new GroupInfo[10]; //mxd
// We have no destructor
GC.SuppressFinalize(this);
@ -210,6 +214,7 @@ namespace CodeImp.DoomBuilder.Map
lastsectorindex = 0;
autoremove = true;
newSectors = new Sector[0]; //mxd
groupInfos = new GroupInfo[10]; //mxd
// Deserialize
Deserialize(stream);
@ -260,6 +265,7 @@ namespace CodeImp.DoomBuilder.Map
sel_things = null;
indexholes = null;
newSectors = null; //mxd
groupInfos = null; //mxd
// Done
isdisposed = true;
@ -1352,19 +1358,75 @@ namespace CodeImp.DoomBuilder.Map
}
/// <summary>This adds the current selection to the specified selection group.</summary>
public void AddSelectionToGroup(int groupmask)
//mxd. switched groupmask to groupindex
public void AddSelectionToGroup(int groupindex)
{
//mxd
int numSectors = 0;
int numLines = 0;
int numVerts = 0;
int numThings = 0;
int groupmask = 0x01 << groupindex;
foreach(SelectableElement e in vertices) {
if(e.Selected) {
numVerts++;//mxd
e.AddToGroup(groupmask);
}
}
foreach(SelectableElement e in linedefs) {
if(e.Selected) {
numLines++;//mxd
e.AddToGroup(groupmask);
}
}
foreach(SelectableElement e in sectors) {
if(e.Selected) {
numSectors++;//mxd
e.AddToGroup(groupmask);
}
}
foreach(SelectableElement e in things) {
if(e.Selected) {
numThings++;//mxd
e.AddToGroup(groupmask);
}
}
//mxd
if(numSectors > 0 || numLines > 0 || numThings > 0 || numVerts > 0) {
if(groupInfos[groupindex] != null)
groupInfos[groupindex].Append(numSectors, numLines, numVerts, numThings);
else
groupInfos[groupindex] = new GroupInfo(numSectors, numLines, numVerts, numThings);
}
}
//mxd
public void ClearGroup(int groupmask, int groupindex) {
foreach(SelectableElement e in vertices)
if(e.Selected) e.AddToGroup(groupmask);
e.RemoveFromGroup(groupmask);
foreach(SelectableElement e in linedefs)
if(e.Selected) e.AddToGroup(groupmask);
e.RemoveFromGroup(groupmask);
foreach(SelectableElement e in sectors)
if(e.Selected) e.AddToGroup(groupmask);
e.RemoveFromGroup(groupmask);
foreach(SelectableElement e in things)
if(e.Selected) e.AddToGroup(groupmask);
e.RemoveFromGroup(groupmask);
groupInfos[groupindex] = null;
}
//mxd
public bool HaveSelectionGroups() {
foreach(GroupInfo info in groupInfos)
if(info != null) return true;
return false;
}
#endregion

View file

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

View file

@ -373,4 +373,7 @@
<data name="TagStatistics" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\TagStatistics.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Check" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Check.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

View file

@ -727,6 +727,126 @@ assigngroup10
allowscroll = false;
}
//mxd
cleargroup1
{
title = "Clear Group 1";
category = "selecting";
description = "Clears group 1";
allowkeys = true;
allowmouse = true;
allowscroll = false;
default = 196657; //Ctrl-Shift-1
}
//mxd
cleargroup2
{
title = "Clear Group 2";
category = "selecting";
description = "Clears group 2";
allowkeys = true;
allowmouse = true;
allowscroll = false;
default = 196659;
}
//mxd
cleargroup3
{
title = "Clear Group 3";
category = "selecting";
description = "Clears group 3";
allowkeys = true;
allowmouse = true;
allowscroll = false;
default = 196660;
}
//mxd
cleargroup4
{
title = "Clear Group 4";
category = "selecting";
description = "Clears group 4";
allowkeys = true;
allowmouse = true;
allowscroll = false;
default = 196661;
}
//mxd
cleargroup5
{
title = "Clear Group 5";
category = "selecting";
description = "Clears group 5";
allowkeys = true;
allowmouse = true;
allowscroll = false;
default = 196662;
}
//mxd
cleargroup6
{
title = "Clear Group 6";
category = "selecting";
description = "Clears group 6";
allowkeys = true;
allowmouse = true;
allowscroll = false;
default = 196663;
}
//mxd
cleargroup7
{
title = "Clear Group 7";
category = "selecting";
description = "Clears group 7";
allowkeys = true;
allowmouse = true;
allowscroll = false;
default = 196664;
}
//mxd
cleargroup8
{
title = "Clear Group 8";
category = "selecting";
description = "Clears group 8";
allowkeys = true;
allowmouse = true;
allowscroll = false;
default = 196665;
}
//mxd
cleargroup9
{
title = "Clear Group 9";
category = "selecting";
description = "Clears group 9";
allowkeys = true;
allowmouse = true;
allowscroll = false;
default = 196656;
}
//mxd
cleargroup10
{
title = "Clear Group 10";
category = "selecting";
description = "Clears group 10";
allowkeys = true;
allowmouse = true;
allowscroll = false;
default = 196658;
}
openscripteditor
{
title = "Script Editor";
@ -781,10 +901,12 @@ visualselect
{
title = "Select";
category = "visual";
description = "Selects the highlighted item.";
description = "Selects the highlighted item. Hold Shift to select adjacent surfaces with the same texture. Hold Ctrl to adjacent surfaces with the same height";
allowkeys = true;
allowmouse = true;
allowscroll = false;
disregardcontrol = true;
disregardshift = true;
}
visualedit

Binary file not shown.

After

Width:  |  Height:  |  Size: 249 B

View file

@ -72,9 +72,44 @@ namespace CodeImp.DoomBuilder.Windows
this.itemgridinc = new System.Windows.Forms.ToolStripMenuItem();
this.itemgriddec = new System.Windows.Forms.ToolStripMenuItem();
this.itemgridsetup = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator();
this.addToGroup = new System.Windows.Forms.ToolStripMenuItem();
this.addGroup1 = new System.Windows.Forms.ToolStripMenuItem();
this.addGroup2 = new System.Windows.Forms.ToolStripMenuItem();
this.addGroup3 = new System.Windows.Forms.ToolStripMenuItem();
this.addGroup4 = new System.Windows.Forms.ToolStripMenuItem();
this.addGroup5 = new System.Windows.Forms.ToolStripMenuItem();
this.addGroup6 = new System.Windows.Forms.ToolStripMenuItem();
this.addGroup7 = new System.Windows.Forms.ToolStripMenuItem();
this.addGroup8 = new System.Windows.Forms.ToolStripMenuItem();
this.addGroup9 = new System.Windows.Forms.ToolStripMenuItem();
this.addGroup10 = new System.Windows.Forms.ToolStripMenuItem();
this.selectGroup = new System.Windows.Forms.ToolStripMenuItem();
this.selectGroup1 = new System.Windows.Forms.ToolStripMenuItem();
this.selectGroup2 = new System.Windows.Forms.ToolStripMenuItem();
this.selectGroup3 = new System.Windows.Forms.ToolStripMenuItem();
this.selectGroup4 = new System.Windows.Forms.ToolStripMenuItem();
this.selectGroup5 = new System.Windows.Forms.ToolStripMenuItem();
this.selectGroup6 = new System.Windows.Forms.ToolStripMenuItem();
this.selectGroup7 = new System.Windows.Forms.ToolStripMenuItem();
this.selectGroup8 = new System.Windows.Forms.ToolStripMenuItem();
this.selectGroup9 = new System.Windows.Forms.ToolStripMenuItem();
this.selectGroup10 = new System.Windows.Forms.ToolStripMenuItem();
this.clearGroup = new System.Windows.Forms.ToolStripMenuItem();
this.clearGroup1 = new System.Windows.Forms.ToolStripMenuItem();
this.clearGroup2 = new System.Windows.Forms.ToolStripMenuItem();
this.clearGroup3 = new System.Windows.Forms.ToolStripMenuItem();
this.clearGroup4 = new System.Windows.Forms.ToolStripMenuItem();
this.clearGroup5 = new System.Windows.Forms.ToolStripMenuItem();
this.clearGroup6 = new System.Windows.Forms.ToolStripMenuItem();
this.clearGroup7 = new System.Windows.Forms.ToolStripMenuItem();
this.clearGroup8 = new System.Windows.Forms.ToolStripMenuItem();
this.clearGroup9 = new System.Windows.Forms.ToolStripMenuItem();
this.clearGroup10 = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator();
this.itemSetCurrentTextures = new System.Windows.Forms.ToolStripMenuItem();
this.itemmapoptions = new System.Windows.Forms.ToolStripMenuItem();
this.itemviewusedtags = new System.Windows.Forms.ToolStripMenuItem();
this.menuview = new System.Windows.Forms.ToolStripMenuItem();
this.itemthingsfilter = new System.Windows.Forms.ToolStripMenuItem();
this.seperatorviewthings = new System.Windows.Forms.ToolStripSeparator();
@ -194,7 +229,17 @@ namespace CodeImp.DoomBuilder.Windows
this.dockersspace = new System.Windows.Forms.Panel();
this.dockerspanel = new CodeImp.DoomBuilder.Controls.DockersControl();
this.dockerscollapser = new System.Windows.Forms.Timer(this.components);
this.itemviewusedtags = new System.Windows.Forms.ToolStripMenuItem();
this.toolbarContextMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
this.toggleFile = new System.Windows.Forms.ToolStripMenuItem();
this.toggleScript = new System.Windows.Forms.ToolStripMenuItem();
this.toggleUndo = new System.Windows.Forms.ToolStripMenuItem();
this.toggleCopy = new System.Windows.Forms.ToolStripMenuItem();
this.togglePrefabs = new System.Windows.Forms.ToolStripMenuItem();
this.toggleFilter = new System.Windows.Forms.ToolStripMenuItem();
this.toggleViewModes = new System.Windows.Forms.ToolStripMenuItem();
this.toggleGeometry = new System.Windows.Forms.ToolStripMenuItem();
this.toggleTesting = new System.Windows.Forms.ToolStripMenuItem();
this.toggleRendering = new System.Windows.Forms.ToolStripMenuItem();
toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
toolStripSeparator9 = new System.Windows.Forms.ToolStripSeparator();
toolStripSeparator12 = new System.Windows.Forms.ToolStripSeparator();
@ -205,6 +250,7 @@ namespace CodeImp.DoomBuilder.Windows
this.toolbar.SuspendLayout();
this.statusbar.SuspendLayout();
this.panelinfo.SuspendLayout();
this.toolbarContextMenu.SuspendLayout();
this.SuspendLayout();
//
// toolStripSeparator1
@ -257,13 +303,13 @@ namespace CodeImp.DoomBuilder.Windows
//
this.seperatoreditgrid.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3);
this.seperatoreditgrid.Name = "seperatoreditgrid";
this.seperatoreditgrid.Size = new System.Drawing.Size(186, 6);
this.seperatoreditgrid.Size = new System.Drawing.Size(194, 6);
//
// seperatoreditcopypaste
//
this.seperatoreditcopypaste.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3);
this.seperatoreditcopypaste.Name = "seperatoreditcopypaste";
this.seperatoreditcopypaste.Size = new System.Drawing.Size(186, 6);
this.seperatoreditcopypaste.Size = new System.Drawing.Size(194, 6);
//
// seperatorfile
//
@ -431,6 +477,10 @@ namespace CodeImp.DoomBuilder.Windows
this.itemgridinc,
this.itemgriddec,
this.itemgridsetup,
this.toolStripSeparator5,
this.addToGroup,
this.selectGroup,
this.clearGroup,
this.toolStripSeparator4,
this.itemSetCurrentTextures,
this.seperatoreditgrid,
@ -439,12 +489,13 @@ namespace CodeImp.DoomBuilder.Windows
this.menuedit.Name = "menuedit";
this.menuedit.Size = new System.Drawing.Size(39, 20);
this.menuedit.Text = "&Edit";
this.menuedit.DropDownOpening += new System.EventHandler(this.menuedit_DropDownOpening);
//
// itemundo
//
this.itemundo.Image = global::CodeImp.DoomBuilder.Properties.Resources.Undo;
this.itemundo.Name = "itemundo";
this.itemundo.Size = new System.Drawing.Size(189, 22);
this.itemundo.Size = new System.Drawing.Size(197, 22);
this.itemundo.Tag = "builder_undo";
this.itemundo.Text = "&Undo";
this.itemundo.Click += new System.EventHandler(this.InvokeTaggedAction);
@ -453,7 +504,7 @@ namespace CodeImp.DoomBuilder.Windows
//
this.itemredo.Image = global::CodeImp.DoomBuilder.Properties.Resources.Redo;
this.itemredo.Name = "itemredo";
this.itemredo.Size = new System.Drawing.Size(189, 22);
this.itemredo.Size = new System.Drawing.Size(197, 22);
this.itemredo.Tag = "builder_redo";
this.itemredo.Text = "&Redo";
this.itemredo.Click += new System.EventHandler(this.InvokeTaggedAction);
@ -462,13 +513,13 @@ namespace CodeImp.DoomBuilder.Windows
//
this.seperatoreditundo.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3);
this.seperatoreditundo.Name = "seperatoreditundo";
this.seperatoreditundo.Size = new System.Drawing.Size(186, 6);
this.seperatoreditundo.Size = new System.Drawing.Size(194, 6);
//
// itemcut
//
this.itemcut.Image = global::CodeImp.DoomBuilder.Properties.Resources.Cut;
this.itemcut.Name = "itemcut";
this.itemcut.Size = new System.Drawing.Size(189, 22);
this.itemcut.Size = new System.Drawing.Size(197, 22);
this.itemcut.Tag = "builder_cutselection";
this.itemcut.Text = "Cu&t";
this.itemcut.Click += new System.EventHandler(this.InvokeTaggedAction);
@ -477,7 +528,7 @@ namespace CodeImp.DoomBuilder.Windows
//
this.itemcopy.Image = global::CodeImp.DoomBuilder.Properties.Resources.Copy;
this.itemcopy.Name = "itemcopy";
this.itemcopy.Size = new System.Drawing.Size(189, 22);
this.itemcopy.Size = new System.Drawing.Size(197, 22);
this.itemcopy.Tag = "builder_copyselection";
this.itemcopy.Text = "&Copy";
this.itemcopy.Click += new System.EventHandler(this.InvokeTaggedAction);
@ -486,7 +537,7 @@ namespace CodeImp.DoomBuilder.Windows
//
this.itempaste.Image = global::CodeImp.DoomBuilder.Properties.Resources.Paste;
this.itempaste.Name = "itempaste";
this.itempaste.Size = new System.Drawing.Size(189, 22);
this.itempaste.Size = new System.Drawing.Size(197, 22);
this.itempaste.Tag = "builder_pasteselection";
this.itempaste.Text = "&Paste";
this.itempaste.Click += new System.EventHandler(this.InvokeTaggedAction);
@ -495,7 +546,7 @@ namespace CodeImp.DoomBuilder.Windows
//
this.itempastespecial.Image = global::CodeImp.DoomBuilder.Properties.Resources.PasteSpecial;
this.itempastespecial.Name = "itempastespecial";
this.itempastespecial.Size = new System.Drawing.Size(189, 22);
this.itempastespecial.Size = new System.Drawing.Size(197, 22);
this.itempastespecial.Tag = "builder_pasteselectionspecial";
this.itempastespecial.Text = "Paste Special...";
this.itempastespecial.Click += new System.EventHandler(this.InvokeTaggedAction);
@ -506,7 +557,7 @@ namespace CodeImp.DoomBuilder.Windows
this.itemsnaptogrid.CheckState = System.Windows.Forms.CheckState.Checked;
this.itemsnaptogrid.Image = global::CodeImp.DoomBuilder.Properties.Resources.Grid4;
this.itemsnaptogrid.Name = "itemsnaptogrid";
this.itemsnaptogrid.Size = new System.Drawing.Size(189, 22);
this.itemsnaptogrid.Size = new System.Drawing.Size(197, 22);
this.itemsnaptogrid.Tag = "builder_togglesnap";
this.itemsnaptogrid.Text = "&Snap to Grid";
this.itemsnaptogrid.Click += new System.EventHandler(this.InvokeTaggedAction);
@ -517,7 +568,7 @@ namespace CodeImp.DoomBuilder.Windows
this.itemautomerge.CheckState = System.Windows.Forms.CheckState.Checked;
this.itemautomerge.Image = global::CodeImp.DoomBuilder.Properties.Resources.mergegeometry2;
this.itemautomerge.Name = "itemautomerge";
this.itemautomerge.Size = new System.Drawing.Size(189, 22);
this.itemautomerge.Size = new System.Drawing.Size(197, 22);
this.itemautomerge.Tag = "builder_toggleautomerge";
this.itemautomerge.Text = "&Merge Geometry";
this.itemautomerge.Click += new System.EventHandler(this.InvokeTaggedAction);
@ -526,12 +577,12 @@ namespace CodeImp.DoomBuilder.Windows
//
this.seperatoreditgeometry.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3);
this.seperatoreditgeometry.Name = "seperatoreditgeometry";
this.seperatoreditgeometry.Size = new System.Drawing.Size(186, 6);
this.seperatoreditgeometry.Size = new System.Drawing.Size(194, 6);
//
// itemgridinc
//
this.itemgridinc.Name = "itemgridinc";
this.itemgridinc.Size = new System.Drawing.Size(189, 22);
this.itemgridinc.Size = new System.Drawing.Size(197, 22);
this.itemgridinc.Tag = "builder_griddec";
this.itemgridinc.Text = "&Increase Grid";
this.itemgridinc.Click += new System.EventHandler(this.InvokeTaggedAction);
@ -539,7 +590,7 @@ namespace CodeImp.DoomBuilder.Windows
// itemgriddec
//
this.itemgriddec.Name = "itemgriddec";
this.itemgriddec.Size = new System.Drawing.Size(189, 22);
this.itemgriddec.Size = new System.Drawing.Size(197, 22);
this.itemgriddec.Tag = "builder_gridinc";
this.itemgriddec.Text = "&Decrease Grid";
this.itemgriddec.Click += new System.EventHandler(this.InvokeTaggedAction);
@ -548,20 +599,319 @@ namespace CodeImp.DoomBuilder.Windows
//
this.itemgridsetup.Image = global::CodeImp.DoomBuilder.Properties.Resources.Grid2;
this.itemgridsetup.Name = "itemgridsetup";
this.itemgridsetup.Size = new System.Drawing.Size(189, 22);
this.itemgridsetup.Size = new System.Drawing.Size(197, 22);
this.itemgridsetup.Tag = "builder_gridsetup";
this.itemgridsetup.Text = "&Grid Setup...";
this.itemgridsetup.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// toolStripSeparator5
//
this.toolStripSeparator5.Name = "toolStripSeparator5";
this.toolStripSeparator5.Size = new System.Drawing.Size(194, 6);
//
// addToGroup
//
this.addToGroup.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.addGroup1,
this.addGroup2,
this.addGroup3,
this.addGroup4,
this.addGroup5,
this.addGroup6,
this.addGroup7,
this.addGroup8,
this.addGroup9,
this.addGroup10});
this.addToGroup.Name = "addToGroup";
this.addToGroup.Size = new System.Drawing.Size(197, 22);
this.addToGroup.Text = "Add Selection to Group";
this.addToGroup.DropDownOpening += new System.EventHandler(this.addToGroup_DropDownOpening);
//
// addGroup1
//
this.addGroup1.Name = "addGroup1";
this.addGroup1.Size = new System.Drawing.Size(253, 22);
this.addGroup1.Tag = "builder_assigngroup1";
this.addGroup1.Text = "1: 100 sectors, 12 vertices, 5 things";
this.addGroup1.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// addGroup2
//
this.addGroup2.Name = "addGroup2";
this.addGroup2.Size = new System.Drawing.Size(253, 22);
this.addGroup2.Tag = "builder_assigngroup2";
this.addGroup2.Text = "2:";
this.addGroup2.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// addGroup3
//
this.addGroup3.Name = "addGroup3";
this.addGroup3.Size = new System.Drawing.Size(253, 22);
this.addGroup3.Tag = "builder_assigngroup3";
this.addGroup3.Text = "3:";
this.addGroup3.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// addGroup4
//
this.addGroup4.Name = "addGroup4";
this.addGroup4.Size = new System.Drawing.Size(253, 22);
this.addGroup4.Tag = "builder_assigngroup4";
this.addGroup4.Text = "4:";
this.addGroup4.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// addGroup5
//
this.addGroup5.Name = "addGroup5";
this.addGroup5.Size = new System.Drawing.Size(253, 22);
this.addGroup5.Tag = "builder_assigngroup5";
this.addGroup5.Text = "5:";
this.addGroup5.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// addGroup6
//
this.addGroup6.Name = "addGroup6";
this.addGroup6.Size = new System.Drawing.Size(253, 22);
this.addGroup6.Tag = "builder_assigngroup6";
this.addGroup6.Text = "6:";
this.addGroup6.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// addGroup7
//
this.addGroup7.Name = "addGroup7";
this.addGroup7.Size = new System.Drawing.Size(253, 22);
this.addGroup7.Tag = "builder_assigngroup7";
this.addGroup7.Text = "7:";
this.addGroup7.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// addGroup8
//
this.addGroup8.Name = "addGroup8";
this.addGroup8.Size = new System.Drawing.Size(253, 22);
this.addGroup8.Tag = "builder_assigngroup8";
this.addGroup8.Text = "8:";
this.addGroup8.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// addGroup9
//
this.addGroup9.Name = "addGroup9";
this.addGroup9.Size = new System.Drawing.Size(253, 22);
this.addGroup9.Tag = "builder_assigngroup9";
this.addGroup9.Text = "9:";
this.addGroup9.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// addGroup10
//
this.addGroup10.Name = "addGroup10";
this.addGroup10.Size = new System.Drawing.Size(253, 22);
this.addGroup10.Tag = "builder_assigngroup10";
this.addGroup10.Text = "10:";
this.addGroup10.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// selectGroup
//
this.selectGroup.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.selectGroup1,
this.selectGroup2,
this.selectGroup3,
this.selectGroup4,
this.selectGroup5,
this.selectGroup6,
this.selectGroup7,
this.selectGroup8,
this.selectGroup9,
this.selectGroup10});
this.selectGroup.Name = "selectGroup";
this.selectGroup.Size = new System.Drawing.Size(197, 22);
this.selectGroup.Text = "Select Group";
this.selectGroup.DropDownOpening += new System.EventHandler(this.selectGroup_DropDownOpening);
//
// selectGroup1
//
this.selectGroup1.Name = "selectGroup1";
this.selectGroup1.Size = new System.Drawing.Size(89, 22);
this.selectGroup1.Tag = "builder_selectgroup1";
this.selectGroup1.Text = "1:";
this.selectGroup1.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// selectGroup2
//
this.selectGroup2.Name = "selectGroup2";
this.selectGroup2.Size = new System.Drawing.Size(89, 22);
this.selectGroup2.Tag = "builder_selectgroup2";
this.selectGroup2.Text = "2:";
this.selectGroup2.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// selectGroup3
//
this.selectGroup3.Name = "selectGroup3";
this.selectGroup3.Size = new System.Drawing.Size(89, 22);
this.selectGroup3.Tag = "builder_selectgroup3";
this.selectGroup3.Text = "3:";
this.selectGroup3.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// selectGroup4
//
this.selectGroup4.Name = "selectGroup4";
this.selectGroup4.Size = new System.Drawing.Size(89, 22);
this.selectGroup4.Tag = "builder_selectgroup4";
this.selectGroup4.Text = "4:";
this.selectGroup4.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// selectGroup5
//
this.selectGroup5.Name = "selectGroup5";
this.selectGroup5.Size = new System.Drawing.Size(89, 22);
this.selectGroup5.Tag = "builder_selectgroup5";
this.selectGroup5.Text = "5:";
this.selectGroup5.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// selectGroup6
//
this.selectGroup6.Name = "selectGroup6";
this.selectGroup6.Size = new System.Drawing.Size(89, 22);
this.selectGroup6.Tag = "builder_selectgroup6";
this.selectGroup6.Text = "6:";
this.selectGroup6.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// selectGroup7
//
this.selectGroup7.Name = "selectGroup7";
this.selectGroup7.Size = new System.Drawing.Size(89, 22);
this.selectGroup7.Tag = "builder_selectgroup7";
this.selectGroup7.Text = "7:";
this.selectGroup7.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// selectGroup8
//
this.selectGroup8.Name = "selectGroup8";
this.selectGroup8.Size = new System.Drawing.Size(89, 22);
this.selectGroup8.Tag = "builder_selectgroup8";
this.selectGroup8.Text = "8:";
this.selectGroup8.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// selectGroup9
//
this.selectGroup9.Name = "selectGroup9";
this.selectGroup9.Size = new System.Drawing.Size(89, 22);
this.selectGroup9.Tag = "builder_selectgroup9";
this.selectGroup9.Text = "9:";
this.selectGroup9.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// selectGroup10
//
this.selectGroup10.Name = "selectGroup10";
this.selectGroup10.Size = new System.Drawing.Size(89, 22);
this.selectGroup10.Tag = "builder_selectgroup10";
this.selectGroup10.Text = "10:";
this.selectGroup10.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// clearGroup
//
this.clearGroup.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.clearGroup1,
this.clearGroup2,
this.clearGroup3,
this.clearGroup4,
this.clearGroup5,
this.clearGroup6,
this.clearGroup7,
this.clearGroup8,
this.clearGroup9,
this.clearGroup10});
this.clearGroup.Name = "clearGroup";
this.clearGroup.Size = new System.Drawing.Size(197, 22);
this.clearGroup.Text = "Clear Group";
this.clearGroup.DropDownOpening += new System.EventHandler(this.selectGroup_DropDownOpening);
//
// clearGroup1
//
this.clearGroup1.Name = "clearGroup1";
this.clearGroup1.Size = new System.Drawing.Size(89, 22);
this.clearGroup1.Tag = "builder_cleargroup1";
this.clearGroup1.Text = "1:";
this.clearGroup1.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// clearGroup2
//
this.clearGroup2.Name = "clearGroup2";
this.clearGroup2.Size = new System.Drawing.Size(89, 22);
this.clearGroup2.Tag = "builder_cleargroup2";
this.clearGroup2.Text = "2:";
this.clearGroup2.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// clearGroup3
//
this.clearGroup3.Name = "clearGroup3";
this.clearGroup3.Size = new System.Drawing.Size(89, 22);
this.clearGroup3.Tag = "builder_cleargroup3";
this.clearGroup3.Text = "3:";
this.clearGroup3.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// clearGroup4
//
this.clearGroup4.Name = "clearGroup4";
this.clearGroup4.Size = new System.Drawing.Size(89, 22);
this.clearGroup4.Tag = "builder_cleargroup4";
this.clearGroup4.Text = "4:";
this.clearGroup4.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// clearGroup5
//
this.clearGroup5.Name = "clearGroup5";
this.clearGroup5.Size = new System.Drawing.Size(89, 22);
this.clearGroup5.Tag = "builder_cleargroup5";
this.clearGroup5.Text = "5:";
this.clearGroup5.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// clearGroup6
//
this.clearGroup6.Name = "clearGroup6";
this.clearGroup6.Size = new System.Drawing.Size(89, 22);
this.clearGroup6.Tag = "builder_cleargroup6";
this.clearGroup6.Text = "6:";
this.clearGroup6.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// clearGroup7
//
this.clearGroup7.Name = "clearGroup7";
this.clearGroup7.Size = new System.Drawing.Size(89, 22);
this.clearGroup7.Tag = "builder_cleargroup7";
this.clearGroup7.Text = "7:";
this.clearGroup7.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// clearGroup8
//
this.clearGroup8.Name = "clearGroup8";
this.clearGroup8.Size = new System.Drawing.Size(89, 22);
this.clearGroup8.Tag = "builder_cleargroup8";
this.clearGroup8.Text = "8:";
this.clearGroup8.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// clearGroup9
//
this.clearGroup9.Name = "clearGroup9";
this.clearGroup9.Size = new System.Drawing.Size(89, 22);
this.clearGroup9.Tag = "builder_cleargroup9";
this.clearGroup9.Text = "9:";
this.clearGroup9.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// clearGroup10
//
this.clearGroup10.Name = "clearGroup10";
this.clearGroup10.Size = new System.Drawing.Size(89, 22);
this.clearGroup10.Tag = "builder_cleargroup10";
this.clearGroup10.Text = "10:";
this.clearGroup10.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// toolStripSeparator4
//
this.toolStripSeparator4.Name = "toolStripSeparator4";
this.toolStripSeparator4.Size = new System.Drawing.Size(186, 6);
this.toolStripSeparator4.Size = new System.Drawing.Size(194, 6);
//
// itemSetCurrentTextures
//
this.itemSetCurrentTextures.Name = "itemSetCurrentTextures";
this.itemSetCurrentTextures.Size = new System.Drawing.Size(189, 22);
this.itemSetCurrentTextures.Size = new System.Drawing.Size(197, 22);
this.itemSetCurrentTextures.Tag = "builder_setcurrenttextures";
this.itemSetCurrentTextures.Text = "Set Current &Textures...";
this.itemSetCurrentTextures.Click += new System.EventHandler(this.InvokeTaggedAction);
@ -570,11 +920,20 @@ namespace CodeImp.DoomBuilder.Windows
//
this.itemmapoptions.Image = global::CodeImp.DoomBuilder.Properties.Resources.Properties;
this.itemmapoptions.Name = "itemmapoptions";
this.itemmapoptions.Size = new System.Drawing.Size(189, 22);
this.itemmapoptions.Size = new System.Drawing.Size(197, 22);
this.itemmapoptions.Tag = "builder_mapoptions";
this.itemmapoptions.Text = "Map &Options....";
this.itemmapoptions.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// itemviewusedtags
//
this.itemviewusedtags.Image = global::CodeImp.DoomBuilder.Properties.Resources.TagStatistics;
this.itemviewusedtags.Name = "itemviewusedtags";
this.itemviewusedtags.Size = new System.Drawing.Size(197, 22);
this.itemviewusedtags.Tag = "builder_viewusedtags";
this.itemviewusedtags.Text = "View Used Tags...";
this.itemviewusedtags.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// menuview
//
this.menuview.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
@ -667,7 +1026,7 @@ namespace CodeImp.DoomBuilder.Windows
// item2zoom200
//
this.item2zoom200.Name = "item2zoom200";
this.item2zoom200.Size = new System.Drawing.Size(152, 22);
this.item2zoom200.Size = new System.Drawing.Size(102, 22);
this.item2zoom200.Tag = "200";
this.item2zoom200.Text = "200%";
this.item2zoom200.Click += new System.EventHandler(this.itemzoomto_Click);
@ -675,7 +1034,7 @@ namespace CodeImp.DoomBuilder.Windows
// item2zoom100
//
this.item2zoom100.Name = "item2zoom100";
this.item2zoom100.Size = new System.Drawing.Size(152, 22);
this.item2zoom100.Size = new System.Drawing.Size(102, 22);
this.item2zoom100.Tag = "100";
this.item2zoom100.Text = "100%";
this.item2zoom100.Click += new System.EventHandler(this.itemzoomto_Click);
@ -683,7 +1042,7 @@ namespace CodeImp.DoomBuilder.Windows
// item2zoom50
//
this.item2zoom50.Name = "item2zoom50";
this.item2zoom50.Size = new System.Drawing.Size(152, 22);
this.item2zoom50.Size = new System.Drawing.Size(102, 22);
this.item2zoom50.Tag = "50";
this.item2zoom50.Text = "50%";
this.item2zoom50.Click += new System.EventHandler(this.itemzoomto_Click);
@ -691,7 +1050,7 @@ namespace CodeImp.DoomBuilder.Windows
// item2zoom25
//
this.item2zoom25.Name = "item2zoom25";
this.item2zoom25.Size = new System.Drawing.Size(152, 22);
this.item2zoom25.Size = new System.Drawing.Size(102, 22);
this.item2zoom25.Tag = "25";
this.item2zoom25.Text = "25%";
this.item2zoom25.Click += new System.EventHandler(this.itemzoomto_Click);
@ -699,7 +1058,7 @@ namespace CodeImp.DoomBuilder.Windows
// item2zoom10
//
this.item2zoom10.Name = "item2zoom10";
this.item2zoom10.Size = new System.Drawing.Size(152, 22);
this.item2zoom10.Size = new System.Drawing.Size(102, 22);
this.item2zoom10.Tag = "10";
this.item2zoom10.Text = "10%";
this.item2zoom10.Click += new System.EventHandler(this.itemzoomto_Click);
@ -707,7 +1066,7 @@ namespace CodeImp.DoomBuilder.Windows
// item2zoom5
//
this.item2zoom5.Name = "item2zoom5";
this.item2zoom5.Size = new System.Drawing.Size(152, 22);
this.item2zoom5.Size = new System.Drawing.Size(102, 22);
this.item2zoom5.Tag = "5";
this.item2zoom5.Text = "5%";
this.item2zoom5.Click += new System.EventHandler(this.itemzoomto_Click);
@ -935,6 +1294,7 @@ namespace CodeImp.DoomBuilder.Windows
// toolbar
//
this.toolbar.AutoSize = false;
this.toolbar.ContextMenuStrip = this.toolbarContextMenu;
this.toolbar.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden;
this.toolbar.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.buttonnewmap,
@ -1791,14 +2151,93 @@ namespace CodeImp.DoomBuilder.Windows
this.dockerscollapser.Interval = 200;
this.dockerscollapser.Tick += new System.EventHandler(this.dockerscollapser_Tick);
//
// itemviewusedtags
// toolbarContextMenu
//
this.itemviewusedtags.Image = global::CodeImp.DoomBuilder.Properties.Resources.TagStatistics;
this.itemviewusedtags.Name = "itemviewusedtags";
this.itemviewusedtags.Size = new System.Drawing.Size(189, 22);
this.itemviewusedtags.Tag = "builder_viewusedtags";
this.itemviewusedtags.Text = "View Used Tags...";
this.itemviewusedtags.Click += new System.EventHandler(this.InvokeTaggedAction);
this.toolbarContextMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toggleFile,
this.toggleScript,
this.toggleUndo,
this.toggleCopy,
this.togglePrefabs,
this.toggleFilter,
this.toggleViewModes,
this.toggleGeometry,
this.toggleTesting,
this.toggleRendering});
this.toolbarContextMenu.Name = "toolbarContextMenu";
this.toolbarContextMenu.Size = new System.Drawing.Size(174, 246);
this.toolbarContextMenu.Opening += new System.ComponentModel.CancelEventHandler(this.toolbarContextMenu_Opening);
this.toolbarContextMenu.Closing += new System.Windows.Forms.ToolStripDropDownClosingEventHandler(this.toolbarContextMenu_Closing);
//
// toggleNew
//
this.toggleFile.Name = "toggleNew";
this.toggleFile.Size = new System.Drawing.Size(173, 22);
this.toggleFile.Text = "New / Open / Save";
this.toggleFile.Click += new System.EventHandler(this.toggleFile_Click);
//
// toggleScript
//
this.toggleScript.Name = "toggleScript";
this.toggleScript.Size = new System.Drawing.Size(173, 22);
this.toggleScript.Text = "Script Editor";
this.toggleScript.Click += new System.EventHandler(this.toggleScript_Click);
//
// toggleUndo
//
this.toggleUndo.Name = "toggleUndo";
this.toggleUndo.Size = new System.Drawing.Size(173, 22);
this.toggleUndo.Text = "Undo / Redo";
this.toggleUndo.Click += new System.EventHandler(this.toggleUndo_Click);
//
// togglePaste
//
this.toggleCopy.Name = "togglePaste";
this.toggleCopy.Size = new System.Drawing.Size(173, 22);
this.toggleCopy.Text = "Cut / Copy / Paste";
this.toggleCopy.Click += new System.EventHandler(this.toggleCopy_Click);
//
// togglePrefabs
//
this.togglePrefabs.Name = "togglePrefabs";
this.togglePrefabs.Size = new System.Drawing.Size(173, 22);
this.togglePrefabs.Text = "Prefabs";
this.togglePrefabs.Click += new System.EventHandler(this.togglePrefabs_Click);
//
// toggleFilters
//
this.toggleFilter.Name = "toggleFilters";
this.toggleFilter.Size = new System.Drawing.Size(173, 22);
this.toggleFilter.Text = "Things Filter";
this.toggleFilter.Click += new System.EventHandler(this.toggleFilter_Click);
//
// toggleViewModes
//
this.toggleViewModes.Name = "toggleViewModes";
this.toggleViewModes.Size = new System.Drawing.Size(173, 22);
this.toggleViewModes.Text = "View Modes";
this.toggleViewModes.Click += new System.EventHandler(this.toggleViewModes_Click);
//
// toggleSnap
//
this.toggleGeometry.Name = "toggleSnap";
this.toggleGeometry.Size = new System.Drawing.Size(173, 22);
this.toggleGeometry.Text = "Snap / Merge";
this.toggleGeometry.Click += new System.EventHandler(this.toggleGeometry_Click);
//
// toggleTesting
//
this.toggleTesting.Name = "toggleTesting";
this.toggleTesting.Size = new System.Drawing.Size(173, 22);
this.toggleTesting.Text = "Testing";
this.toggleTesting.Click += new System.EventHandler(this.toggleTesting_Click);
//
// toggleRendering
//
this.toggleRendering.Name = "toggleRendering";
this.toggleRendering.Size = new System.Drawing.Size(173, 22);
this.toggleRendering.Text = "Rendering";
this.toggleRendering.Click += new System.EventHandler(this.toggleRendering_Click);
//
// MainForm
//
@ -1837,6 +2276,7 @@ namespace CodeImp.DoomBuilder.Windows
this.statusbar.PerformLayout();
this.panelinfo.ResumeLayout(false);
this.panelinfo.PerformLayout();
this.toolbarContextMenu.ResumeLayout(false);
this.ResumeLayout(false);
this.PerformLayout();
@ -2003,5 +2443,50 @@ namespace CodeImp.DoomBuilder.Windows
private System.Windows.Forms.ToolStripSeparator toolStripSeparator4;
private System.Windows.Forms.ToolStripMenuItem itemSetCurrentTextures;
private System.Windows.Forms.ToolStripMenuItem itemviewusedtags;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator5;
private System.Windows.Forms.ToolStripMenuItem addToGroup;
private System.Windows.Forms.ToolStripMenuItem selectGroup;
private System.Windows.Forms.ToolStripMenuItem addGroup1;
private System.Windows.Forms.ToolStripMenuItem addGroup2;
private System.Windows.Forms.ToolStripMenuItem addGroup3;
private System.Windows.Forms.ToolStripMenuItem addGroup4;
private System.Windows.Forms.ToolStripMenuItem addGroup5;
private System.Windows.Forms.ToolStripMenuItem addGroup6;
private System.Windows.Forms.ToolStripMenuItem addGroup7;
private System.Windows.Forms.ToolStripMenuItem addGroup8;
private System.Windows.Forms.ToolStripMenuItem addGroup9;
private System.Windows.Forms.ToolStripMenuItem addGroup10;
private System.Windows.Forms.ToolStripMenuItem selectGroup1;
private System.Windows.Forms.ToolStripMenuItem selectGroup2;
private System.Windows.Forms.ToolStripMenuItem selectGroup3;
private System.Windows.Forms.ToolStripMenuItem selectGroup4;
private System.Windows.Forms.ToolStripMenuItem selectGroup5;
private System.Windows.Forms.ToolStripMenuItem selectGroup6;
private System.Windows.Forms.ToolStripMenuItem selectGroup7;
private System.Windows.Forms.ToolStripMenuItem selectGroup8;
private System.Windows.Forms.ToolStripMenuItem selectGroup9;
private System.Windows.Forms.ToolStripMenuItem selectGroup10;
private System.Windows.Forms.ToolStripMenuItem clearGroup;
private System.Windows.Forms.ToolStripMenuItem clearGroup1;
private System.Windows.Forms.ToolStripMenuItem clearGroup2;
private System.Windows.Forms.ToolStripMenuItem clearGroup3;
private System.Windows.Forms.ToolStripMenuItem clearGroup4;
private System.Windows.Forms.ToolStripMenuItem clearGroup5;
private System.Windows.Forms.ToolStripMenuItem clearGroup6;
private System.Windows.Forms.ToolStripMenuItem clearGroup7;
private System.Windows.Forms.ToolStripMenuItem clearGroup8;
private System.Windows.Forms.ToolStripMenuItem clearGroup9;
private System.Windows.Forms.ToolStripMenuItem clearGroup10;
private System.Windows.Forms.ContextMenuStrip toolbarContextMenu;
private System.Windows.Forms.ToolStripMenuItem toggleFile;
private System.Windows.Forms.ToolStripMenuItem toggleScript;
private System.Windows.Forms.ToolStripMenuItem toggleUndo;
private System.Windows.Forms.ToolStripMenuItem toggleCopy;
private System.Windows.Forms.ToolStripMenuItem togglePrefabs;
private System.Windows.Forms.ToolStripMenuItem toggleFilter;
private System.Windows.Forms.ToolStripMenuItem toggleViewModes;
private System.Windows.Forms.ToolStripMenuItem toggleGeometry;
private System.Windows.Forms.ToolStripMenuItem toggleTesting;
private System.Windows.Forms.ToolStripMenuItem toggleRendering;
}
}

View file

@ -143,6 +143,7 @@ namespace CodeImp.DoomBuilder.Windows
private EventHandler buttonvisiblechangedhandler;
private bool preventupdateseperators;
private bool updatingfilters;
private bool toolbarContextMenuShiftPressed; //mxd
// Statusbar
private StatusInfo status;
@ -220,6 +221,8 @@ namespace CodeImp.DoomBuilder.Windows
buttonvisiblechangedhandler = new EventHandler(ToolbarButtonVisibleChanged);
//mxd
display.OnKeyReleased += new KeyEventHandler(display_OnKeyReleased);
toolbarContextMenu.KeyDown += new KeyEventHandler(toolbarContextMenu_KeyDown);
toolbarContextMenu.KeyUp += new KeyEventHandler(toolbarContextMenu_KeyUp);
// Bind any methods
General.Actions.BindMethods(this);
@ -1685,6 +1688,8 @@ namespace CodeImp.DoomBuilder.Windows
buttontoggleanimatedlight.Visible = General.Settings.GZToolbarGZDoom;
buttontogglefx.Visible = General.Settings.GZToolbarGZDoom;
buttontogglefog.Visible = General.Settings.GZToolbarGZDoom;
buttontoggleeventlines.Visible = General.Settings.GZToolbarGZDoom;
buttontogglevisualvertices.Visible = General.Settings.GZToolbarGZDoom;
separatorgzmodes.Visible = General.Settings.GZToolbarGZDoom;
@ -1847,6 +1852,115 @@ namespace CodeImp.DoomBuilder.Windows
#endregion
#region Toolbar context menu (mxd)
private void toolbarContextMenu_Opening(object sender, CancelEventArgs e) {
toggleFile.Image = General.Settings.ToolbarFile ? Resources.Check : null;
toggleScript.Image = General.Settings.ToolbarScript ? Resources.Check : null;
toggleUndo.Image = General.Settings.ToolbarUndo ? Resources.Check : null;
toggleCopy.Image = General.Settings.ToolbarCopy ? Resources.Check : null;
togglePrefabs.Image = General.Settings.ToolbarPrefabs ? Resources.Check : null;
toggleFilter.Image = General.Settings.ToolbarFilter ? Resources.Check : null;
toggleViewModes.Image = General.Settings.ToolbarViewModes ? Resources.Check : null;
toggleGeometry.Image = General.Settings.ToolbarGeometry ? Resources.Check : null;
toggleTesting.Image = General.Settings.ToolbarTesting ? Resources.Check : null;
toggleRendering.Image = General.Settings.GZToolbarGZDoom ? Resources.Check : null;
}
private void toolbarContextMenu_Closing(object sender, ToolStripDropDownClosingEventArgs e) {
e.Cancel = toolbarContextMenuShiftPressed;
}
private void toolbarContextMenu_KeyDown(object sender, KeyEventArgs e) {
toolbarContextMenuShiftPressed = e.KeyCode == Keys.ShiftKey;
}
private void toolbarContextMenu_KeyUp(object sender, KeyEventArgs e) {
toolbarContextMenuShiftPressed = !(e.KeyCode == Keys.ShiftKey);
}
private void toggleFile_Click(object sender, EventArgs e) {
General.Settings.ToolbarFile = !General.Settings.ToolbarFile;
UpdateToolbar();
if(toolbarContextMenuShiftPressed)
toggleFile.Image = General.Settings.ToolbarFile ? Resources.Check : null;
}
private void toggleScript_Click(object sender, EventArgs e) {
General.Settings.ToolbarScript = !General.Settings.ToolbarScript;
UpdateToolbar();
if(toolbarContextMenuShiftPressed)
toggleScript.Image = General.Settings.ToolbarScript ? Resources.Check : null;
}
private void toggleUndo_Click(object sender, EventArgs e) {
General.Settings.ToolbarUndo = !General.Settings.ToolbarUndo;
UpdateToolbar();
if(toolbarContextMenuShiftPressed)
toggleUndo.Image = General.Settings.ToolbarUndo ? Resources.Check : null;
}
private void toggleCopy_Click(object sender, EventArgs e) {
General.Settings.ToolbarCopy = !General.Settings.ToolbarCopy;
UpdateToolbar();
if(toolbarContextMenuShiftPressed)
toggleCopy.Image = General.Settings.ToolbarCopy ? Resources.Check : null;
}
private void togglePrefabs_Click(object sender, EventArgs e) {
General.Settings.ToolbarPrefabs = !General.Settings.ToolbarPrefabs;
UpdateToolbar();
if(toolbarContextMenuShiftPressed)
togglePrefabs.Image = General.Settings.ToolbarPrefabs ? Resources.Check : null;
}
private void toggleFilter_Click(object sender, EventArgs e) {
General.Settings.ToolbarFilter = !General.Settings.ToolbarFilter;
UpdateToolbar();
if(toolbarContextMenuShiftPressed)
toggleFilter.Image = General.Settings.ToolbarFilter ? Resources.Check : null;
}
private void toggleViewModes_Click(object sender, EventArgs e) {
General.Settings.ToolbarViewModes = !General.Settings.ToolbarViewModes;
UpdateToolbar();
if(toolbarContextMenuShiftPressed)
toggleViewModes.Image = General.Settings.ToolbarViewModes ? Resources.Check : null;
}
private void toggleGeometry_Click(object sender, EventArgs e) {
General.Settings.ToolbarGeometry = !General.Settings.ToolbarGeometry;
UpdateToolbar();
if(toolbarContextMenuShiftPressed)
toggleGeometry.Image = General.Settings.ToolbarGeometry ? Resources.Check : null;
}
private void toggleTesting_Click(object sender, EventArgs e) {
General.Settings.ToolbarTesting = !General.Settings.ToolbarTesting;
UpdateToolbar();
if(toolbarContextMenuShiftPressed)
toggleTesting.Image = General.Settings.ToolbarTesting ? Resources.Check : null;
}
private void toggleRendering_Click(object sender, EventArgs e) {
General.Settings.GZToolbarGZDoom = !General.Settings.GZToolbarGZDoom;
UpdateToolbar();
if(toolbarContextMenuShiftPressed)
toggleRendering.Image = General.Settings.GZToolbarGZDoom ? Resources.Check : null;
}
#endregion
#region ================== Menus
// This adds a menu to the menus bar
@ -2173,6 +2287,9 @@ namespace CodeImp.DoomBuilder.Windows
itemgriddec.Enabled = (General.Map != null);
itemSetCurrentTextures.Enabled = (General.Map != null); //mxd
itemviewusedtags.Enabled = (General.Map != null); //mxd
addToGroup.Enabled = (General.Map != null); //mxd
selectGroup.Enabled = (General.Map != null); //mxd
clearGroup.Enabled = (General.Map != null); //mxd
// Determine undo description
if(itemundo.Enabled)
@ -2198,6 +2315,34 @@ namespace CodeImp.DoomBuilder.Windows
buttonpaste.Enabled = itempaste.Enabled;
}
//mxd
private void addToGroup_DropDownOpening(object sender, EventArgs e) {
for(int i = 0; i < addToGroup.DropDown.Items.Count; i++)
addToGroup.DropDown.Items[i].Text = (i + 1) + ": " + (General.Map.Map.GroupInfos[i] == null ? " Empty" : General.Map.Map.GroupInfos[i].ToString());
}
//mxd
private void selectGroup_DropDownOpening(object sender, EventArgs e) {
ToolStripMenuItem menu = sender as ToolStripMenuItem;
for(int i = 0; i < menu.DropDown.Items.Count; i++) {
if(General.Map.Map.GroupInfos[i] == null) {
menu.DropDown.Items[i].Visible = false;
} else {
menu.DropDown.Items[i].Visible = true;
menu.DropDown.Items[i].Text = (i + 1) + ": " + General.Map.Map.GroupInfos[i].ToString();
}
}
}
//mxd
private void menuedit_DropDownOpening(object sender, EventArgs e) {
if(General.Map == null) return;
bool haveGroups = General.Map.Map.HaveSelectionGroups();
selectGroup.Enabled = haveGroups;
clearGroup.Enabled = haveGroups;
}
// Action to toggle snap to grid
[BeginAction("togglesnap")]
internal void ToggleSnapToGrid()

View file

@ -147,6 +147,9 @@
<metadata name="toolbar.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>241, 17</value>
</metadata>
<metadata name="toolbarContextMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>159, 56</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="buttontogglemodels.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>

View file

@ -812,9 +812,9 @@ namespace CodeImp.DoomBuilder.Windows
this.toolbar_gzdoom.AutoSize = true;
this.toolbar_gzdoom.Location = new System.Drawing.Point(188, 137);
this.toolbar_gzdoom.Name = "toolbar_gzdoom";
this.toolbar_gzdoom.Size = new System.Drawing.Size(104, 18);
this.toolbar_gzdoom.Size = new System.Drawing.Size(75, 18);
this.toolbar_gzdoom.TabIndex = 50;
this.toolbar_gzdoom.Text = "GZDoom toolbar";
this.toolbar_gzdoom.Text = "Rendering";
this.toolbar_gzdoom.UseVisualStyleBackColor = true;
//
// toolbar_file

View file

@ -236,6 +236,7 @@ namespace CodeImp.DoomBuilder.Windows
General.Settings.ToolbarViewModes = toolbar_viewmodes.Checked;
General.Settings.ToolbarGeometry = toolbar_geometry.Checked;
General.Settings.ToolbarTesting = toolbar_testing.Checked;
General.Settings.GZToolbarGZDoom = toolbar_gzdoom.Checked; //mxd
General.Settings.ShowTextureSizes = showtexturesizes.Checked;
// Script font size
@ -278,7 +279,6 @@ namespace CodeImp.DoomBuilder.Windows
//mxd
General.Settings.GZSynchCameras = cbSynchCameras.Checked;
General.Settings.GZToolbarGZDoom = toolbar_gzdoom.Checked;
General.Settings.GZMaxDynamicLights = tbDynLightCount.Value;
General.Settings.GZDynamicLightRadius = ((float)tbDynLightSize.Value / 10.0f);
General.Settings.GZDynamicLightIntensity = ((float)tbDynLightIntensity.Value / 10.0f);

View file

@ -144,7 +144,4 @@
<metadata name="label21.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>

View file

@ -55,6 +55,7 @@
</ItemGroup>
<ItemGroup>
<Compile Include="BuilderPlug.cs" />
<Compile Include="ClassicModes\ArrayDuplicateMode.cs" />
<Compile Include="Controls\NumericUpDownEx.cs">
<SubType>Component</SubType>
</Compile>

View file

@ -100,6 +100,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
// This changes the height
protected abstract void ChangeHeight(int amount);
public virtual void SelectNeighbours(bool select, bool withSameTexture, bool withSameHeight) { } //mxd
// This swaps triangles so that the plane faces the other way
protected void SwapTriangleVertices(WorldVertex[] verts)
@ -200,6 +201,11 @@ namespace CodeImp.DoomBuilder.BuilderModes
vs.UpdateSectorGeometry(false);
}
}
//mxd
public virtual bool IsSelected() {
return selected;
}
#endregion

View file

@ -396,6 +396,102 @@ namespace CodeImp.DoomBuilder.BuilderModes
}
}
protected void selectNeighbours(string texture, bool select, bool withSameTexture, bool withSameHeight) {
if(!withSameTexture && !withSameHeight)
return;
if(select && !selected) {
selected = true;
mode.AddSelectedObject(this);
} else if(!select && selected) {
selected = false;
mode.RemoveSelectedObject(this);
}
//select
List<Linedef> connectedLines = new List<Linedef>();
foreach(Linedef line in Sidedef.Line.Start.Linedefs) {
if(line.Index == Sidedef.Line.Index)
continue;
connectedLines.Add(line);
}
foreach(Linedef line in Sidedef.Line.End.Linedefs) {
if(line.Index == Sidedef.Line.Index)
continue;
if(!connectedLines.Contains(line))
connectedLines.Add(line);
}
foreach(Linedef line in connectedLines) {
bool addFrontTop = false;
bool addFrontMiddle = false;
bool addFrontBottom = false;
bool addBackTop = false;
bool addBackMiddle = false;
bool addBackBottom = false;
if(withSameTexture) {
if(line.Front != null) {
if(line.Front.HighTexture == texture)
addFrontTop = true;
if(line.Front.MiddleTexture == texture)
addFrontMiddle = true;
if(line.Front.LowTexture == texture)
addFrontBottom = true;
}
if(line.Back != null) {
if(line.Back.HighTexture == texture)
addBackTop = true;
if(line.Back.MiddleTexture == texture)
addBackMiddle = true;
if(line.Back.LowTexture == texture)
addBackBottom = true;
}
}
if(withSameHeight) {
if(line.Front != null && line.Front.Sector.FloorHeight == Sidedef.Sector.FloorHeight && line.Front.Sector.CeilHeight == Sidedef.Sector.CeilHeight) {
addFrontTop = withSameTexture ? addFrontTop : true;
addFrontMiddle = withSameTexture ? addFrontMiddle : true;
addFrontBottom = withSameTexture ? addFrontBottom : true;
} else {
addFrontTop = false;
addFrontMiddle = false;
addFrontBottom = false;
}
if(line.Back != null && line.Back.Sector.FloorHeight == Sidedef.Sector.FloorHeight && line.Back.Sector.CeilHeight == Sidedef.Sector.CeilHeight) {
addBackTop = withSameTexture ? addBackTop : true;
addBackMiddle = withSameTexture ? addBackMiddle : true;
addBackBottom = withSameTexture ? addBackBottom : true;
} else {
addBackTop = false;
addBackMiddle = false;
addBackBottom = false;
}
}
//select front?
if(addFrontTop || addFrontMiddle || addFrontBottom)
mode.SelectSideParts(line.Front, addFrontTop, addFrontMiddle, addFrontBottom, select, withSameTexture, withSameHeight);
//select back?
if(addBackTop || addBackMiddle || addBackBottom)
mode.SelectSideParts(line.Back, addBackTop, addBackMiddle, addBackBottom, select, withSameTexture, withSameHeight);
}
}
//mxd
public virtual bool IsSelected() {
return selected;
}
#endregion
@ -409,6 +505,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
protected abstract void SetTextureOffsetY(int y);
protected abstract void MoveTextureOffset(Point xy);
protected abstract Point GetTextureOffset();
public virtual void SelectNeighbours(bool select, bool withSameTexture, bool withSameHeight) { } //mxd
// Insert middle texture
public virtual void OnInsert()
@ -1000,7 +1097,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
VisualSidedefParts parts = Sector.GetSidedefParts(Sidedef);
parts.SetupAllParts();
}
#endregion
}
}

View file

@ -578,6 +578,31 @@ namespace CodeImp.DoomBuilder.BuilderModes
return translatedCoords;
}
//mxd
internal void SelectSideParts(Sidedef side, bool toggleTop, bool toggleMid, bool toggleBottom, bool select, bool withSameTexture, bool withSameHeight) {
BaseVisualSector vs = GetVisualSector(side.Sector) as BaseVisualSector;
if(toggleTop && vs.Sides[side].upper != null &&
((select && !vs.Sides[side].upper.Selected) || (!select && vs.Sides[side].upper.Selected))) {
vs.Sides[side].upper.SelectNeighbours(select, withSameTexture, withSameHeight);
}
if(toggleMid && vs.Sides[side].middlesingle != null &&
((select && !vs.Sides[side].middlesingle.Selected) || (!select && vs.Sides[side].middlesingle.Selected))) {
vs.Sides[side].middlesingle.SelectNeighbours(select, withSameTexture, withSameHeight);
}
if(toggleMid && vs.Sides[side].middledouble != null &&
((select && !vs.Sides[side].middledouble.Selected) || (!select && vs.Sides[side].middledouble.Selected))) {
vs.Sides[side].middledouble.SelectNeighbours(select, withSameTexture, withSameHeight);
}
if(toggleBottom && vs.Sides[side].lower != null &&
((select && !vs.Sides[side].lower.Selected) || (!select && vs.Sides[side].lower.Selected))) {
vs.Sides[side].lower.SelectNeighbours(select, withSameTexture, withSameHeight);
}
}
#endregion
@ -1530,7 +1555,18 @@ namespace CodeImp.DoomBuilder.BuilderModes
public void EndSelect()
{
//PreActionNoChange();
GetTargetEventReceiver(true).OnSelectEnd();
IVisualEventReceiver target = GetTargetEventReceiver(true);
target.OnSelectEnd();
//mxd
if((General.Interface.ShiftState || General.Interface.CtrlState) && selectedobjects.Count > 0) {
IVisualEventReceiver[] selection = new IVisualEventReceiver[selectedobjects.Count];
selectedobjects.CopyTo(selection);
foreach(IVisualEventReceiver obj in selection)
obj.SelectNeighbours(target.IsSelected(), General.Interface.ShiftState, General.Interface.CtrlState);
}
Renderer.ShowSelection = true;
Renderer.ShowHighlight = true;
PostAction();

View file

@ -433,6 +433,11 @@ namespace CodeImp.DoomBuilder.BuilderModes
u_ray = (tnear > 0.0f) ? tnear : tfar;
return true;
}
//mxd
public virtual bool IsSelected() {
return selected;
}
#endregion
@ -460,6 +465,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
public virtual void ApplyTexture(string texture) { }
public virtual void ApplyUpperUnpegged(bool set) { }
public virtual void ApplyLowerUnpegged(bool set) { }
public virtual void SelectNeighbours(bool select, bool withSameTexture, bool withSameHeight) { } //mxd
// Return texture name
public virtual string GetTextureName() { return ""; }

View file

@ -104,6 +104,11 @@ namespace CodeImp.DoomBuilder.BuilderModes
return height;
}
//mxd
public virtual bool IsSelected() {
return selected;
}
#region ================== Object picking
// This performs a fast test in object picking
@ -219,6 +224,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
public virtual void ApplyUpperUnpegged(bool set) { }
public virtual void ApplyLowerUnpegged(bool set) { }
public virtual string GetTextureName() { return ""; }
public virtual void SelectNeighbours(bool select, bool withSameTexture, bool withSameHeight) { } //mxd
#endregion

View file

@ -70,5 +70,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
// Other methods
string GetTextureName();
void SelectNeighbours(bool select, bool withSameTexture, bool withSameHeight); //mxd
bool IsSelected(); //mxd
}
}

View file

@ -151,5 +151,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
{
return "";
}
public void SelectNeighbours(bool select, bool withSameTexture, bool withSameHeight) { } //mxd
public bool IsSelected() { return false; } //mxd
}
}

View file

@ -329,6 +329,45 @@ namespace CodeImp.DoomBuilder.BuilderModes
level.sector.SetCeilTexture(texturename);
General.Map.Data.UpdateUsedTextures();
}
//mxd
public override void SelectNeighbours(bool select, bool withSameTexture, bool withSameHeight) {
if(!withSameTexture && !withSameHeight) return;
if(select && !selected) {
selected = true;
mode.AddSelectedObject(this);
} else if(!select && selected) {
selected = false;
mode.RemoveSelectedObject(this);
}
List<Sector> neighbours = new List<Sector>();
//collect neighbour sectors
foreach(Sidedef side in level.sector.Sidedefs) {
if(side.Other != null && side.Other.Sector != level.sector && !neighbours.Contains(side.Other.Sector)) {
bool add = false;
if(withSameTexture && side.Other.Sector.CeilTexture == level.sector.CeilTexture) {
add = true;
}
if(withSameHeight) {
add = ((withSameTexture && add) || !withSameTexture) && side.Other.Sector.CeilHeight == level.sector.CeilHeight;
}
if(add) neighbours.Add(side.Other.Sector);
}
}
//(de)select neighbour sectors
foreach(Sector s in neighbours) {
BaseVisualSector vs = mode.GetVisualSector(s) as BaseVisualSector;
if((select && !vs.Ceiling.Selected) || (!select && vs.Ceiling.Selected))
vs.Ceiling.SelectNeighbours(select, withSameTexture, withSameHeight);
}
}
#endregion
}

View file

@ -293,6 +293,43 @@ namespace CodeImp.DoomBuilder.BuilderModes
level.sector.SetFloorTexture(texturename);
General.Map.Data.UpdateUsedTextures();
}
//mxd
public override void SelectNeighbours(bool select, bool withSameTexture, bool withSameHeight) {
if(!withSameTexture && !withSameHeight) return;
if(select && !selected) {
selected = true;
mode.AddSelectedObject(this);
}else if(!select && selected){
selected = false;
mode.RemoveSelectedObject(this);
}
List<Sector> neighbours = new List<Sector>();
//collect neighbour sectors
foreach(Sidedef side in level.sector.Sidedefs) {
if(side.Other != null && side.Other.Sector != level.sector && !neighbours.Contains(side.Other.Sector)) {
bool add = false;
if(withSameTexture && side.Other.Sector.FloorTexture == level.sector.FloorTexture)
add = true;
if(withSameHeight)
add = ((withSameTexture && add) || !withSameTexture) && side.Other.Sector.FloorHeight == level.sector.FloorHeight;
if(add) neighbours.Add(side.Other.Sector);
}
}
//(de)select neighbour sectors
foreach(Sector s in neighbours){
BaseVisualSector vs = mode.GetVisualSector(s) as BaseVisualSector;
if((select && !vs.Floor.Selected) || (!select && vs.Floor.Selected))
vs.Floor.SelectNeighbours(select, withSameTexture, withSameHeight);
}
}
#endregion
}

View file

@ -284,6 +284,11 @@ namespace CodeImp.DoomBuilder.BuilderModes
//rebuild sector
Sector.UpdateSectorGeometry(false);
}
//mxd
public override void SelectNeighbours(bool select, bool withSameTexture, bool withSameHeight) {
selectNeighbours(Sidedef.LowTexture, select, withSameTexture, withSameHeight);
}
#endregion
}

View file

@ -329,6 +329,11 @@ namespace CodeImp.DoomBuilder.BuilderModes
//rebuild sector
Sector.UpdateSectorGeometry(false);
}
//mxd
public override void SelectNeighbours(bool select, bool withSameTexture, bool withSameHeight) {
selectNeighbours(Sidedef.MiddleTexture, select, withSameTexture, withSameHeight);
}
#endregion
}

View file

@ -280,6 +280,11 @@ namespace CodeImp.DoomBuilder.BuilderModes
//rebuild sector
Sector.UpdateSectorGeometry(false);
}
//mxd
public override void SelectNeighbours(bool select, bool withSameTexture, bool withSameHeight) {
selectNeighbours(Sidedef.MiddleTexture, select, withSameTexture, withSameHeight);
}
#endregion
}

View file

@ -283,6 +283,11 @@ namespace CodeImp.DoomBuilder.BuilderModes
//rebuild sector
Sector.UpdateSectorGeometry(false);
}
//mxd
public override void SelectNeighbours(bool select, bool withSameTexture, bool withSameHeight) {
selectNeighbours(Sidedef.HighTexture, select, withSameTexture, withSameHeight);
}
#endregion
}