From 8943dbc82e5223eef85fa5b43c92f03f7b28155a Mon Sep 17 00:00:00 2001 From: MaxED Date: Sun, 5 Jun 2016 22:06:56 +0000 Subject: [PATCH] Removed: activating the same 2D mode repeatedly no longer toggles View modes. Added "Next View Mode" and "Previous View Mode" actions. Removed "Replace unused textures" checkboxes from Edit Linedefs window. Fixed, SNDINFO parser: commented $ambient sound definitions were treated as editor comments (and still processed). --- Source/Core/Editing/ClassicMode.cs | 24 + Source/Core/Editing/EditModeInfo.cs | 43 +- Source/Core/Rendering/Renderer2D.cs | 2 +- Source/Core/Resources/Actions.cfg | 20 + .../Core/Windows/LinedefEditForm.Designer.cs | 1148 ++++++++--------- Source/Core/Windows/LinedefEditForm.cs | 138 +- .../Windows/LinedefEditFormUDMF.Designer.cs | 54 +- Source/Core/Windows/LinedefEditFormUDMF.cs | 138 +- 8 files changed, 646 insertions(+), 921 deletions(-) diff --git a/Source/Core/Editing/ClassicMode.cs b/Source/Core/Editing/ClassicMode.cs index ee8d38f..73b96c7 100644 --- a/Source/Core/Editing/ClassicMode.cs +++ b/Source/Core/Editing/ClassicMode.cs @@ -17,7 +17,9 @@ #region ================== Namespaces using System; +using System.Collections.Generic; using System.Drawing; +using System.Linq; using System.Windows.Forms; using CodeImp.DoomBuilder.Actions; using CodeImp.DoomBuilder.Geometry; @@ -943,6 +945,28 @@ namespace CodeImp.DoomBuilder.Editing SetViewMode(ViewMode.CeilingTextures); } + //mxd + [BeginAction("nextviewmode", BaseAction = true)] + protected virtual void NextViewMode() + { + List vmodes = new List(Enum.GetValues(typeof(ViewMode)).Cast()); + int curmode = vmodes.IndexOf(General.Map.Renderer2D.ViewMode); + curmode = (curmode == vmodes.Count - 1 ? 0 : ++curmode); + + SetViewMode(vmodes[curmode]); + } + + //mxd + [BeginAction("previousviewmode", BaseAction = true)] + protected virtual void PreviousViewMode() + { + List vmodes = new List(Enum.GetValues(typeof(ViewMode)).Cast()); + int curmode = vmodes.IndexOf(General.Map.Renderer2D.ViewMode); + curmode = (curmode == 0 ? vmodes.Count - 1 : --curmode); + + SetViewMode(vmodes[curmode]); + } + //mxd [BeginAction("centeroncoordinates", BaseAction = true)] protected virtual void CenterOnCoordinates() diff --git a/Source/Core/Editing/EditModeInfo.cs b/Source/Core/Editing/EditModeInfo.cs index d1af28b..88111aa 100644 --- a/Source/Core/Editing/EditModeInfo.cs +++ b/Source/Core/Editing/EditModeInfo.cs @@ -143,43 +143,34 @@ namespace CodeImp.DoomBuilder.Editing } } - // This switches to the mode by user command - // (when user presses shortcut key) + // This switches to the mode by user command (when user presses shortcut key) public void UserSwitchToMode() { // Only when a map is opened if(General.Map != null) { - // Switching from volatile mode to volatile mode? - if((General.Editing.Mode != null) && General.Editing.Mode.Attributes.Volatile && this.attribs.Volatile) + //mxd. Not the same mode? + if(type != General.Editing.Mode.GetType()) { - // First cancel previous volatile mode - General.Editing.CancelVolatileMode(); + // Switching from volatile mode to a different volatile mode? + if((General.Editing.Mode != null) && General.Editing.Mode.Attributes.Volatile && this.attribs.Volatile) + { + // First cancel previous volatile mode + General.Editing.CancelVolatileMode(); + } + + // Create instance + EditMode newmode = plugin.CreateObject(type); + + //mxd. Switch mode? + if(newmode != null) General.Editing.ChangeMode(newmode); } - - // When in VisualMode and switching to the same VisualMode, then we switch back to the previous classic mode - if((General.Editing.Mode is VisualMode) && (type == General.Editing.Mode.GetType())) + // When in VisualMode and switching to the same VisualMode, switch back to the previous classic mode + else if(General.Editing.Mode is VisualMode) { // Switch back to last classic mode General.Editing.ChangeMode(General.Editing.PreviousClassicMode.Name); } - //mxd. The same mode? Switch view modes instead - else if(General.Editing.Mode is ClassicMode && General.Editing.Mode.GetType().FullName == type.FullName) - { - List vmodes = new List(Enum.GetValues(typeof(ViewMode)).Cast()); - int curmode = vmodes.IndexOf(General.Map.Renderer2D.ViewMode); - curmode = (curmode == vmodes.Count - 1 ? 0 : ++curmode); - - ClassicMode.SetViewMode(vmodes[curmode]); - } - else - { - // Create instance - EditMode newmode = plugin.CreateObject(type); - - //mxd. Switch mode? - if(newmode != null) General.Editing.ChangeMode(newmode); - } } } diff --git a/Source/Core/Rendering/Renderer2D.cs b/Source/Core/Rendering/Renderer2D.cs index 1dfec92..9050c96 100644 --- a/Source/Core/Rendering/Renderer2D.cs +++ b/Source/Core/Rendering/Renderer2D.cs @@ -1520,7 +1520,7 @@ namespace CodeImp.DoomBuilder.Rendering int i = 0; int size = waypoints.Count; int seqStart = 0; - TextLabel[] sequencelabels = new TextLabel[256]; + ITextLabel[] sequencelabels = new ITextLabel[256]; while (i < size) { int iNext = i + 1; diff --git a/Source/Core/Resources/Actions.cfg b/Source/Core/Resources/Actions.cfg index 7a939a7..774c13c 100644 --- a/Source/Core/Resources/Actions.cfg +++ b/Source/Core/Resources/Actions.cfg @@ -1068,6 +1068,26 @@ viewmodeceilings allowscroll = false; } +nextviewmode //mxd +{ + title = "Next View Mode"; + category = "view"; + description = "This switches to next view mode."; + allowkeys = true; + allowmouse = true; + allowscroll = false; +} + +previousviewmode //mxd +{ + title = "Previous View Mode"; + category = "view"; + description = "This switches to previous view mode."; + allowkeys = true; + allowmouse = true; + allowscroll = false; +} + togglecomments //mxd { title = "Toggle Comments"; diff --git a/Source/Core/Windows/LinedefEditForm.Designer.cs b/Source/Core/Windows/LinedefEditForm.Designer.cs index c25230b..11dc598 100644 --- a/Source/Core/Windows/LinedefEditForm.Designer.cs +++ b/Source/Core/Windows/LinedefEditForm.Designer.cs @@ -28,600 +28,574 @@ namespace CodeImp.DoomBuilder.Windows /// private void InitializeComponent() { - this.components = new System.ComponentModel.Container(); - System.Windows.Forms.Label label11; - System.Windows.Forms.Label label5; - System.Windows.Forms.Label label4; - System.Windows.Forms.Label label3; - System.Windows.Forms.Label label12; - System.Windows.Forms.Label label8; - System.Windows.Forms.Label label9; - System.Windows.Forms.Label label10; - System.Windows.Forms.Label activationlabel; - System.Windows.Forms.Label label2; - this.tooltip = new System.Windows.Forms.ToolTip(this.components); - this.browseaction = new System.Windows.Forms.Button(); - this.apply = new System.Windows.Forms.Button(); - this.cancel = new System.Windows.Forms.Button(); - this.panel = new System.Windows.Forms.Panel(); - this.backside = new System.Windows.Forms.CheckBox(); - this.frontside = new System.Windows.Forms.CheckBox(); - this.frontgroup = new System.Windows.Forms.GroupBox(); - this.replaceunusedfronttextures = new System.Windows.Forms.CheckBox(); - this.replaceunusedbacktextures = new System.Windows.Forms.CheckBox(); - this.labelFrontTextureOffset = new System.Windows.Forms.Label(); - this.frontsector = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox(); - this.frontlow = new CodeImp.DoomBuilder.Controls.TextureSelectorControl(); - this.frontmid = new CodeImp.DoomBuilder.Controls.TextureSelectorControl(); - this.fronthigh = new CodeImp.DoomBuilder.Controls.TextureSelectorControl(); - this.frontTextureOffset = new CodeImp.DoomBuilder.GZBuilder.Controls.PairedIntControl(); - this.backgroup = new System.Windows.Forms.GroupBox(); - this.labelBackTextureOffset = new System.Windows.Forms.Label(); - this.backsector = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox(); - this.backlow = new CodeImp.DoomBuilder.Controls.TextureSelectorControl(); - this.backmid = new CodeImp.DoomBuilder.Controls.TextureSelectorControl(); - this.backhigh = new CodeImp.DoomBuilder.Controls.TextureSelectorControl(); - this.backTextureOffset = new CodeImp.DoomBuilder.GZBuilder.Controls.PairedIntControl(); - this.flagsgroup = new System.Windows.Forms.GroupBox(); - this.flags = new CodeImp.DoomBuilder.Controls.CheckboxArrayControl(); - this.actiongroup = new System.Windows.Forms.GroupBox(); - this.argscontrol = new CodeImp.DoomBuilder.Controls.ArgumentsControl(); - this.actionhelp = new CodeImp.DoomBuilder.Controls.ActionSpecialHelpButton(); - this.hexenpanel = new System.Windows.Forms.Panel(); - this.activation = new System.Windows.Forms.ComboBox(); - this.action = new CodeImp.DoomBuilder.Controls.ActionSelectorControl(); - this.idgroup = new System.Windows.Forms.GroupBox(); - this.tagSelector = new CodeImp.DoomBuilder.GZBuilder.Controls.TagSelector(); - label11 = new System.Windows.Forms.Label(); - label5 = new System.Windows.Forms.Label(); - label4 = new System.Windows.Forms.Label(); - label3 = new System.Windows.Forms.Label(); - label12 = new System.Windows.Forms.Label(); - label8 = new System.Windows.Forms.Label(); - label9 = new System.Windows.Forms.Label(); - label10 = new System.Windows.Forms.Label(); - activationlabel = new System.Windows.Forms.Label(); - label2 = new System.Windows.Forms.Label(); - this.panel.SuspendLayout(); - this.frontgroup.SuspendLayout(); - this.backgroup.SuspendLayout(); - this.flagsgroup.SuspendLayout(); - this.actiongroup.SuspendLayout(); - this.hexenpanel.SuspendLayout(); - this.idgroup.SuspendLayout(); - this.SuspendLayout(); - // - // label11 - // - label11.Location = new System.Drawing.Point(6, 40); - label11.Name = "label11"; - label11.Size = new System.Drawing.Size(80, 14); - label11.TabIndex = 13; - label11.Text = "Sector Index:"; - label11.TextAlign = System.Drawing.ContentAlignment.TopRight; - // - // label5 - // - label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204))); - label5.Location = new System.Drawing.Point(437, 13); - label5.Name = "label5"; - label5.Size = new System.Drawing.Size(83, 16); - label5.TabIndex = 5; - label5.Text = "Lower"; - label5.TextAlign = System.Drawing.ContentAlignment.TopCenter; - // - // label4 - // - label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204))); - label4.Location = new System.Drawing.Point(346, 13); - label4.Name = "label4"; - label4.Size = new System.Drawing.Size(83, 16); - label4.TabIndex = 4; - label4.Text = "Middle"; - label4.TextAlign = System.Drawing.ContentAlignment.TopCenter; - // - // label3 - // - label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204))); - label3.Location = new System.Drawing.Point(255, 13); - label3.Name = "label3"; - label3.Size = new System.Drawing.Size(83, 16); - label3.TabIndex = 3; - label3.Text = "Upper"; - label3.TextAlign = System.Drawing.ContentAlignment.TopCenter; - // - // label12 - // - label12.Location = new System.Drawing.Point(6, 40); - label12.Name = "label12"; - label12.Size = new System.Drawing.Size(80, 14); - label12.TabIndex = 16; - label12.Text = "Sector Index:"; - label12.TextAlign = System.Drawing.ContentAlignment.TopRight; - // - // label8 - // - label8.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204))); - label8.Location = new System.Drawing.Point(437, 13); - label8.Name = "label8"; - label8.Size = new System.Drawing.Size(83, 16); - label8.TabIndex = 5; - label8.Text = "Lower"; - label8.TextAlign = System.Drawing.ContentAlignment.TopCenter; - // - // label9 - // - label9.Location = new System.Drawing.Point(346, 13); - label9.Name = "label9"; - label9.Size = new System.Drawing.Size(83, 16); - label9.TabIndex = 4; - label9.Text = "Middle"; - label9.TextAlign = System.Drawing.ContentAlignment.TopCenter; - // - // label10 - // - label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204))); - label10.Location = new System.Drawing.Point(255, 13); - label10.Name = "label10"; - label10.Size = new System.Drawing.Size(83, 16); - label10.TabIndex = 3; - label10.Text = "Upper"; - label10.TextAlign = System.Drawing.ContentAlignment.TopCenter; - // - // activationlabel - // - activationlabel.AutoSize = true; - activationlabel.Location = new System.Drawing.Point(6, 11); - activationlabel.Name = "activationlabel"; - activationlabel.Size = new System.Drawing.Size(43, 13); - activationlabel.TabIndex = 10; - activationlabel.Text = "Trigger:"; - // - // label2 - // - label2.AutoSize = true; - label2.Location = new System.Drawing.Point(15, 26); - label2.Name = "label2"; - label2.Size = new System.Drawing.Size(40, 13); - label2.TabIndex = 9; - label2.Text = "Action:"; - // - // browseaction - // - this.browseaction.Image = global::CodeImp.DoomBuilder.Properties.Resources.List; - this.browseaction.Location = new System.Drawing.Point(476, 21); - this.browseaction.Name = "browseaction"; - this.browseaction.Size = new System.Drawing.Size(28, 25); - this.browseaction.TabIndex = 1; - this.browseaction.Text = " "; - this.tooltip.SetToolTip(this.browseaction, "Browse Action"); - this.browseaction.UseVisualStyleBackColor = true; - this.browseaction.Click += new System.EventHandler(this.browseaction_Click); - // - // apply - // - this.apply.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.apply.Location = new System.Drawing.Point(335, 728); - this.apply.Name = "apply"; - this.apply.Size = new System.Drawing.Size(112, 25); - this.apply.TabIndex = 1; - this.apply.Text = "OK"; - this.apply.UseVisualStyleBackColor = true; - this.apply.Click += new System.EventHandler(this.apply_Click); - // - // cancel - // - this.cancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.cancel.Location = new System.Drawing.Point(453, 728); - this.cancel.Name = "cancel"; - this.cancel.Size = new System.Drawing.Size(112, 25); - this.cancel.TabIndex = 2; - this.cancel.Text = "Cancel"; - this.cancel.UseVisualStyleBackColor = true; - this.cancel.Click += new System.EventHandler(this.cancel_Click); - // - // panel - // - this.panel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + this.components = new System.ComponentModel.Container(); + System.Windows.Forms.Label label11; + System.Windows.Forms.Label label5; + System.Windows.Forms.Label label4; + System.Windows.Forms.Label label3; + System.Windows.Forms.Label label12; + System.Windows.Forms.Label label8; + System.Windows.Forms.Label label9; + System.Windows.Forms.Label label10; + System.Windows.Forms.Label activationlabel; + System.Windows.Forms.Label label2; + this.tooltip = new System.Windows.Forms.ToolTip(this.components); + this.browseaction = new System.Windows.Forms.Button(); + this.apply = new System.Windows.Forms.Button(); + this.cancel = new System.Windows.Forms.Button(); + this.panel = new System.Windows.Forms.Panel(); + this.backside = new System.Windows.Forms.CheckBox(); + this.frontside = new System.Windows.Forms.CheckBox(); + this.frontgroup = new System.Windows.Forms.GroupBox(); + this.labelFrontTextureOffset = new System.Windows.Forms.Label(); + this.frontsector = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox(); + this.frontlow = new CodeImp.DoomBuilder.Controls.TextureSelectorControl(); + this.frontmid = new CodeImp.DoomBuilder.Controls.TextureSelectorControl(); + this.fronthigh = new CodeImp.DoomBuilder.Controls.TextureSelectorControl(); + this.frontTextureOffset = new CodeImp.DoomBuilder.GZBuilder.Controls.PairedIntControl(); + this.backgroup = new System.Windows.Forms.GroupBox(); + this.labelBackTextureOffset = new System.Windows.Forms.Label(); + this.backsector = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox(); + this.backlow = new CodeImp.DoomBuilder.Controls.TextureSelectorControl(); + this.backmid = new CodeImp.DoomBuilder.Controls.TextureSelectorControl(); + this.backhigh = new CodeImp.DoomBuilder.Controls.TextureSelectorControl(); + this.backTextureOffset = new CodeImp.DoomBuilder.GZBuilder.Controls.PairedIntControl(); + this.flagsgroup = new System.Windows.Forms.GroupBox(); + this.flags = new CodeImp.DoomBuilder.Controls.CheckboxArrayControl(); + this.actiongroup = new System.Windows.Forms.GroupBox(); + this.argscontrol = new CodeImp.DoomBuilder.Controls.ArgumentsControl(); + this.actionhelp = new CodeImp.DoomBuilder.Controls.ActionSpecialHelpButton(); + this.hexenpanel = new System.Windows.Forms.Panel(); + this.activation = new System.Windows.Forms.ComboBox(); + this.action = new CodeImp.DoomBuilder.Controls.ActionSelectorControl(); + this.idgroup = new System.Windows.Forms.GroupBox(); + this.tagSelector = new CodeImp.DoomBuilder.GZBuilder.Controls.TagSelector(); + label11 = new System.Windows.Forms.Label(); + label5 = new System.Windows.Forms.Label(); + label4 = new System.Windows.Forms.Label(); + label3 = new System.Windows.Forms.Label(); + label12 = new System.Windows.Forms.Label(); + label8 = new System.Windows.Forms.Label(); + label9 = new System.Windows.Forms.Label(); + label10 = new System.Windows.Forms.Label(); + activationlabel = new System.Windows.Forms.Label(); + label2 = new System.Windows.Forms.Label(); + this.panel.SuspendLayout(); + this.frontgroup.SuspendLayout(); + this.backgroup.SuspendLayout(); + this.flagsgroup.SuspendLayout(); + this.actiongroup.SuspendLayout(); + this.hexenpanel.SuspendLayout(); + this.idgroup.SuspendLayout(); + this.SuspendLayout(); + // + // label11 + // + label11.Location = new System.Drawing.Point(6, 40); + label11.Name = "label11"; + label11.Size = new System.Drawing.Size(80, 14); + label11.TabIndex = 13; + label11.Text = "Sector Index:"; + label11.TextAlign = System.Drawing.ContentAlignment.TopRight; + // + // label5 + // + label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204))); + label5.Location = new System.Drawing.Point(437, 13); + label5.Name = "label5"; + label5.Size = new System.Drawing.Size(83, 16); + label5.TabIndex = 5; + label5.Text = "Lower"; + label5.TextAlign = System.Drawing.ContentAlignment.TopCenter; + // + // label4 + // + label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204))); + label4.Location = new System.Drawing.Point(346, 13); + label4.Name = "label4"; + label4.Size = new System.Drawing.Size(83, 16); + label4.TabIndex = 4; + label4.Text = "Middle"; + label4.TextAlign = System.Drawing.ContentAlignment.TopCenter; + // + // label3 + // + label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204))); + label3.Location = new System.Drawing.Point(255, 13); + label3.Name = "label3"; + label3.Size = new System.Drawing.Size(83, 16); + label3.TabIndex = 3; + label3.Text = "Upper"; + label3.TextAlign = System.Drawing.ContentAlignment.TopCenter; + // + // label12 + // + label12.Location = new System.Drawing.Point(6, 40); + label12.Name = "label12"; + label12.Size = new System.Drawing.Size(80, 14); + label12.TabIndex = 16; + label12.Text = "Sector Index:"; + label12.TextAlign = System.Drawing.ContentAlignment.TopRight; + // + // label8 + // + label8.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204))); + label8.Location = new System.Drawing.Point(437, 13); + label8.Name = "label8"; + label8.Size = new System.Drawing.Size(83, 16); + label8.TabIndex = 5; + label8.Text = "Lower"; + label8.TextAlign = System.Drawing.ContentAlignment.TopCenter; + // + // label9 + // + label9.Location = new System.Drawing.Point(346, 13); + label9.Name = "label9"; + label9.Size = new System.Drawing.Size(83, 16); + label9.TabIndex = 4; + label9.Text = "Middle"; + label9.TextAlign = System.Drawing.ContentAlignment.TopCenter; + // + // label10 + // + label10.Location = new System.Drawing.Point(255, 13); + label10.Name = "label10"; + label10.Size = new System.Drawing.Size(83, 16); + label10.TabIndex = 3; + label10.Text = "Upper"; + label10.TextAlign = System.Drawing.ContentAlignment.TopCenter; + // + // activationlabel + // + activationlabel.AutoSize = true; + activationlabel.Location = new System.Drawing.Point(6, 11); + activationlabel.Name = "activationlabel"; + activationlabel.Size = new System.Drawing.Size(43, 13); + activationlabel.TabIndex = 10; + activationlabel.Text = "Trigger:"; + // + // label2 + // + label2.AutoSize = true; + label2.Location = new System.Drawing.Point(15, 26); + label2.Name = "label2"; + label2.Size = new System.Drawing.Size(40, 13); + label2.TabIndex = 9; + label2.Text = "Action:"; + // + // browseaction + // + this.browseaction.Image = global::CodeImp.DoomBuilder.Properties.Resources.List; + this.browseaction.Location = new System.Drawing.Point(476, 21); + this.browseaction.Name = "browseaction"; + this.browseaction.Size = new System.Drawing.Size(28, 25); + this.browseaction.TabIndex = 1; + this.browseaction.Text = " "; + this.tooltip.SetToolTip(this.browseaction, "Browse Action"); + this.browseaction.UseVisualStyleBackColor = true; + this.browseaction.Click += new System.EventHandler(this.browseaction_Click); + // + // apply + // + this.apply.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.apply.Location = new System.Drawing.Point(335, 728); + this.apply.Name = "apply"; + this.apply.Size = new System.Drawing.Size(112, 25); + this.apply.TabIndex = 1; + this.apply.Text = "OK"; + this.apply.UseVisualStyleBackColor = true; + this.apply.Click += new System.EventHandler(this.apply_Click); + // + // cancel + // + this.cancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.cancel.Location = new System.Drawing.Point(453, 728); + this.cancel.Name = "cancel"; + this.cancel.Size = new System.Drawing.Size(112, 25); + this.cancel.TabIndex = 2; + this.cancel.Text = "Cancel"; + this.cancel.UseVisualStyleBackColor = true; + this.cancel.Click += new System.EventHandler(this.cancel_Click); + // + // panel + // + this.panel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.panel.BackColor = System.Drawing.SystemColors.Window; - this.panel.Controls.Add(this.backside); - this.panel.Controls.Add(this.frontside); - this.panel.Controls.Add(this.frontgroup); - this.panel.Controls.Add(this.backgroup); - this.panel.Controls.Add(this.flagsgroup); - this.panel.Controls.Add(this.actiongroup); - this.panel.Controls.Add(this.idgroup); - this.panel.Location = new System.Drawing.Point(12, 12); - this.panel.Name = "panel"; - this.panel.Size = new System.Drawing.Size(553, 706); - this.panel.TabIndex = 5; - // - // backside - // - this.backside.AutoSize = true; - this.backside.Location = new System.Drawing.Point(17, 158); - this.backside.Name = "backside"; - this.backside.Size = new System.Drawing.Size(75, 17); - this.backside.TabIndex = 0; - this.backside.Text = "Back Side"; - this.backside.UseVisualStyleBackColor = true; - this.backside.CheckStateChanged += new System.EventHandler(this.backside_CheckStateChanged); - // - // frontside - // - this.frontside.AutoSize = true; - this.frontside.Location = new System.Drawing.Point(17, 4); - this.frontside.Name = "frontside"; - this.frontside.Size = new System.Drawing.Size(74, 17); - this.frontside.TabIndex = 0; - this.frontside.Text = "Front Side"; - this.frontside.UseVisualStyleBackColor = true; - this.frontside.CheckStateChanged += new System.EventHandler(this.frontside_CheckStateChanged); - // - // frontgroup - // - this.frontgroup.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + this.panel.BackColor = System.Drawing.SystemColors.Window; + this.panel.Controls.Add(this.backside); + this.panel.Controls.Add(this.frontside); + this.panel.Controls.Add(this.frontgroup); + this.panel.Controls.Add(this.backgroup); + this.panel.Controls.Add(this.flagsgroup); + this.panel.Controls.Add(this.actiongroup); + this.panel.Controls.Add(this.idgroup); + this.panel.Location = new System.Drawing.Point(12, 12); + this.panel.Name = "panel"; + this.panel.Size = new System.Drawing.Size(553, 706); + this.panel.TabIndex = 5; + // + // backside + // + this.backside.AutoSize = true; + this.backside.Location = new System.Drawing.Point(17, 158); + this.backside.Name = "backside"; + this.backside.Size = new System.Drawing.Size(75, 17); + this.backside.TabIndex = 0; + this.backside.Text = "Back Side"; + this.backside.UseVisualStyleBackColor = true; + this.backside.CheckStateChanged += new System.EventHandler(this.backside_CheckStateChanged); + // + // frontside + // + this.frontside.AutoSize = true; + this.frontside.Location = new System.Drawing.Point(17, 4); + this.frontside.Name = "frontside"; + this.frontside.Size = new System.Drawing.Size(74, 17); + this.frontside.TabIndex = 0; + this.frontside.Text = "Front Side"; + this.frontside.UseVisualStyleBackColor = true; + this.frontside.CheckStateChanged += new System.EventHandler(this.frontside_CheckStateChanged); + // + // frontgroup + // + this.frontgroup.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.frontgroup.Controls.Add(this.replaceunusedfronttextures); - this.frontgroup.Controls.Add(this.labelFrontTextureOffset); - this.frontgroup.Controls.Add(this.frontsector); - this.frontgroup.Controls.Add(label11); - this.frontgroup.Controls.Add(this.frontlow); - this.frontgroup.Controls.Add(this.frontmid); - this.frontgroup.Controls.Add(this.fronthigh); - this.frontgroup.Controls.Add(this.frontTextureOffset); - this.frontgroup.Controls.Add(label5); - this.frontgroup.Controls.Add(label4); - this.frontgroup.Controls.Add(label3); - this.frontgroup.Enabled = false; - this.frontgroup.Location = new System.Drawing.Point(6, 6); - this.frontgroup.Name = "frontgroup"; - this.frontgroup.Size = new System.Drawing.Size(541, 148); - this.frontgroup.TabIndex = 1; - this.frontgroup.TabStop = false; - this.frontgroup.Text = " "; - // - // replaceunusedfronttextures - // - this.replaceunusedfronttextures.AutoSize = true; - this.replaceunusedfronttextures.Location = new System.Drawing.Point(90, 121); - this.replaceunusedfronttextures.Name = "replaceunusedfronttextures"; - this.replaceunusedfronttextures.Size = new System.Drawing.Size(144, 17); - this.replaceunusedfronttextures.TabIndex = 43; - this.replaceunusedfronttextures.Text = "Replace unused textures"; - this.replaceunusedfronttextures.UseVisualStyleBackColor = true; - this.replaceunusedfronttextures.CheckedChanged += new System.EventHandler(this.replaceunusedfronttextures_CheckedChanged); - // - // - // labelFrontTextureOffset - // - this.labelFrontTextureOffset.Location = new System.Drawing.Point(6, 70); - this.labelFrontTextureOffset.Name = "labelFrontTextureOffset"; - this.labelFrontTextureOffset.Size = new System.Drawing.Size(80, 14); - this.labelFrontTextureOffset.TabIndex = 42; - this.labelFrontTextureOffset.Text = "Texture Offset:"; - this.labelFrontTextureOffset.TextAlign = System.Drawing.ContentAlignment.TopRight; - // - // frontsector - // - this.frontsector.AllowDecimal = false; - this.frontsector.AllowNegative = false; - this.frontsector.AllowRelative = false; - this.frontsector.ButtonStep = 1; - this.frontsector.ButtonStepBig = 10F; - this.frontsector.ButtonStepFloat = 1F; - this.frontsector.ButtonStepSmall = 0.1F; - this.frontsector.ButtonStepsUseModifierKeys = false; - this.frontsector.ButtonStepsWrapAround = false; - this.frontsector.Location = new System.Drawing.Point(90, 35); - this.frontsector.Name = "frontsector"; - this.frontsector.Size = new System.Drawing.Size(130, 24); - this.frontsector.StepValues = null; - this.frontsector.TabIndex = 14; - // - // frontlow - // - this.frontlow.Location = new System.Drawing.Point(437, 32); - this.frontlow.MultipleTextures = false; - this.frontlow.Name = "frontlow"; - this.frontlow.Required = false; - this.frontlow.Size = new System.Drawing.Size(83, 107); - this.frontlow.TabIndex = 6; - this.frontlow.TextureName = ""; - this.frontlow.UsePreviews = true; - this.frontlow.OnValueChanged += new System.EventHandler(this.frontlow_OnValueChanged); - // - // frontmid - // - this.frontmid.Location = new System.Drawing.Point(346, 32); - this.frontmid.MultipleTextures = false; - this.frontmid.Name = "frontmid"; - this.frontmid.Required = false; - this.frontmid.Size = new System.Drawing.Size(83, 107); - this.frontmid.TabIndex = 5; - this.frontmid.TextureName = ""; - this.frontmid.UsePreviews = true; - this.frontmid.OnValueChanged += new System.EventHandler(this.frontmid_OnValueChanged); - // - // fronthigh - // - this.fronthigh.Location = new System.Drawing.Point(255, 32); - this.fronthigh.MultipleTextures = false; - this.fronthigh.Name = "fronthigh"; - this.fronthigh.Required = false; - this.fronthigh.Size = new System.Drawing.Size(83, 107); - this.fronthigh.TabIndex = 4; - this.fronthigh.TextureName = ""; - this.fronthigh.UsePreviews = true; - this.fronthigh.OnValueChanged += new System.EventHandler(this.fronthigh_OnValueChanged); - // - // frontTextureOffset - // - this.frontTextureOffset.ButtonStep = 8; - this.frontTextureOffset.ButtonStepBig = 16F; - this.frontTextureOffset.ButtonStepSmall = 1F; - this.frontTextureOffset.ButtonStepsUseModifierKeys = true; - this.frontTextureOffset.DefaultValue = 0; - this.frontTextureOffset.Location = new System.Drawing.Point(87, 65); - this.frontTextureOffset.Name = "frontTextureOffset"; - this.frontTextureOffset.Size = new System.Drawing.Size(186, 26); - this.frontTextureOffset.TabIndex = 41; - this.frontTextureOffset.OnValuesChanged += new System.EventHandler(this.frontTextureOffset_OnValuesChanged); - // - // backgroup - // - this.backgroup.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + this.frontgroup.Controls.Add(this.labelFrontTextureOffset); + this.frontgroup.Controls.Add(this.frontsector); + this.frontgroup.Controls.Add(label11); + this.frontgroup.Controls.Add(this.frontlow); + this.frontgroup.Controls.Add(this.frontmid); + this.frontgroup.Controls.Add(this.fronthigh); + this.frontgroup.Controls.Add(this.frontTextureOffset); + this.frontgroup.Controls.Add(label5); + this.frontgroup.Controls.Add(label4); + this.frontgroup.Controls.Add(label3); + this.frontgroup.Enabled = false; + this.frontgroup.Location = new System.Drawing.Point(6, 6); + this.frontgroup.Name = "frontgroup"; + this.frontgroup.Size = new System.Drawing.Size(541, 148); + this.frontgroup.TabIndex = 1; + this.frontgroup.TabStop = false; + this.frontgroup.Text = " "; + // + // labelFrontTextureOffset + // + this.labelFrontTextureOffset.Location = new System.Drawing.Point(6, 70); + this.labelFrontTextureOffset.Name = "labelFrontTextureOffset"; + this.labelFrontTextureOffset.Size = new System.Drawing.Size(80, 14); + this.labelFrontTextureOffset.TabIndex = 42; + this.labelFrontTextureOffset.Text = "Texture Offset:"; + this.labelFrontTextureOffset.TextAlign = System.Drawing.ContentAlignment.TopRight; + // + // frontsector + // + this.frontsector.AllowDecimal = false; + this.frontsector.AllowNegative = false; + this.frontsector.AllowRelative = false; + this.frontsector.ButtonStep = 1; + this.frontsector.ButtonStepBig = 10F; + this.frontsector.ButtonStepFloat = 1F; + this.frontsector.ButtonStepSmall = 0.1F; + this.frontsector.ButtonStepsUseModifierKeys = false; + this.frontsector.ButtonStepsWrapAround = false; + this.frontsector.Location = new System.Drawing.Point(90, 35); + this.frontsector.MaximumValue = 2147483647; + this.frontsector.Name = "frontsector"; + this.frontsector.Size = new System.Drawing.Size(130, 24); + this.frontsector.StepValues = null; + this.frontsector.TabIndex = 14; + // + // frontlow + // + this.frontlow.Location = new System.Drawing.Point(437, 32); + this.frontlow.MultipleTextures = false; + this.frontlow.Name = "frontlow"; + this.frontlow.Required = false; + this.frontlow.Size = new System.Drawing.Size(83, 107); + this.frontlow.TabIndex = 6; + this.frontlow.TextureName = ""; + this.frontlow.UsePreviews = true; + this.frontlow.OnValueChanged += new System.EventHandler(this.frontlow_OnValueChanged); + // + // frontmid + // + this.frontmid.Location = new System.Drawing.Point(346, 32); + this.frontmid.MultipleTextures = false; + this.frontmid.Name = "frontmid"; + this.frontmid.Required = false; + this.frontmid.Size = new System.Drawing.Size(83, 107); + this.frontmid.TabIndex = 5; + this.frontmid.TextureName = ""; + this.frontmid.UsePreviews = true; + this.frontmid.OnValueChanged += new System.EventHandler(this.frontmid_OnValueChanged); + // + // fronthigh + // + this.fronthigh.Location = new System.Drawing.Point(255, 32); + this.fronthigh.MultipleTextures = false; + this.fronthigh.Name = "fronthigh"; + this.fronthigh.Required = false; + this.fronthigh.Size = new System.Drawing.Size(83, 107); + this.fronthigh.TabIndex = 4; + this.fronthigh.TextureName = ""; + this.fronthigh.UsePreviews = true; + this.fronthigh.OnValueChanged += new System.EventHandler(this.fronthigh_OnValueChanged); + // + // frontTextureOffset + // + this.frontTextureOffset.ButtonStep = 8; + this.frontTextureOffset.ButtonStepBig = 16F; + this.frontTextureOffset.ButtonStepSmall = 1F; + this.frontTextureOffset.ButtonStepsUseModifierKeys = true; + this.frontTextureOffset.DefaultValue = 0; + this.frontTextureOffset.Location = new System.Drawing.Point(87, 65); + this.frontTextureOffset.Name = "frontTextureOffset"; + this.frontTextureOffset.Size = new System.Drawing.Size(186, 26); + this.frontTextureOffset.TabIndex = 41; + this.frontTextureOffset.OnValuesChanged += new System.EventHandler(this.frontTextureOffset_OnValuesChanged); + // + // backgroup + // + this.backgroup.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.backgroup.Controls.Add(this.replaceunusedbacktextures); - this.backgroup.Controls.Add(this.labelBackTextureOffset); - this.backgroup.Controls.Add(this.backsector); - this.backgroup.Controls.Add(label12); - this.backgroup.Controls.Add(this.backlow); - this.backgroup.Controls.Add(this.backmid); - this.backgroup.Controls.Add(this.backhigh); - this.backgroup.Controls.Add(this.backTextureOffset); - this.backgroup.Controls.Add(label8); - this.backgroup.Controls.Add(label9); - this.backgroup.Controls.Add(label10); - this.backgroup.Enabled = false; - this.backgroup.Location = new System.Drawing.Point(6, 160); - this.backgroup.Name = "backgroup"; - this.backgroup.Size = new System.Drawing.Size(541, 148); - this.backgroup.TabIndex = 1; - this.backgroup.TabStop = false; - this.backgroup.Text = " "; - // - // replaceunusedbacktextures - // - this.replaceunusedbacktextures.AutoSize = true; - this.replaceunusedbacktextures.Location = new System.Drawing.Point(90, 121); - this.replaceunusedbacktextures.Name = "replaceunusedbacktextures"; - this.replaceunusedbacktextures.Size = new System.Drawing.Size(144, 17); - this.replaceunusedbacktextures.TabIndex = 44; - this.replaceunusedbacktextures.Text = "Replace unused textures"; - this.replaceunusedbacktextures.UseVisualStyleBackColor = true; - this.replaceunusedbacktextures.CheckedChanged += new System.EventHandler(this.replaceunusedbacktextures_CheckedChanged); - // - // - // labelBackTextureOffset - // - this.labelBackTextureOffset.Location = new System.Drawing.Point(6, 70); - this.labelBackTextureOffset.Name = "labelBackTextureOffset"; - this.labelBackTextureOffset.Size = new System.Drawing.Size(80, 14); - this.labelBackTextureOffset.TabIndex = 43; - this.labelBackTextureOffset.Text = "Texture Offset:"; - this.labelBackTextureOffset.TextAlign = System.Drawing.ContentAlignment.TopRight; - // - // backsector - // - this.backsector.AllowDecimal = false; - this.backsector.AllowNegative = false; - this.backsector.AllowRelative = false; - this.backsector.ButtonStep = 1; - this.backsector.ButtonStepBig = 10F; - this.backsector.ButtonStepFloat = 1F; - this.backsector.ButtonStepSmall = 0.1F; - this.backsector.ButtonStepsUseModifierKeys = false; - this.backsector.ButtonStepsWrapAround = false; - this.backsector.Location = new System.Drawing.Point(90, 35); - this.backsector.Name = "backsector"; - this.backsector.Size = new System.Drawing.Size(130, 24); - this.backsector.StepValues = null; - this.backsector.TabIndex = 17; - // - // backlow - // - this.backlow.Location = new System.Drawing.Point(437, 32); - this.backlow.MultipleTextures = false; - this.backlow.Name = "backlow"; - this.backlow.Required = false; - this.backlow.Size = new System.Drawing.Size(83, 107); - this.backlow.TabIndex = 6; - this.backlow.TextureName = ""; - this.backlow.UsePreviews = true; - this.backlow.OnValueChanged += new System.EventHandler(this.backlow_OnValueChanged); - // - // backmid - // - this.backmid.Location = new System.Drawing.Point(346, 32); - this.backmid.MultipleTextures = false; - this.backmid.Name = "backmid"; - this.backmid.Required = false; - this.backmid.Size = new System.Drawing.Size(83, 107); - this.backmid.TabIndex = 5; - this.backmid.TextureName = ""; - this.backmid.UsePreviews = true; - this.backmid.OnValueChanged += new System.EventHandler(this.backmid_OnValueChanged); - // - // backhigh - // - this.backhigh.Location = new System.Drawing.Point(255, 32); - this.backhigh.MultipleTextures = false; - this.backhigh.Name = "backhigh"; - this.backhigh.Required = false; - this.backhigh.Size = new System.Drawing.Size(83, 107); - this.backhigh.TabIndex = 4; - this.backhigh.TextureName = ""; - this.backhigh.UsePreviews = true; - this.backhigh.OnValueChanged += new System.EventHandler(this.backhigh_OnValueChanged); - // - // backTextureOffset - // - this.backTextureOffset.ButtonStep = 8; - this.backTextureOffset.ButtonStepBig = 16F; - this.backTextureOffset.ButtonStepSmall = 1F; - this.backTextureOffset.ButtonStepsUseModifierKeys = true; - this.backTextureOffset.DefaultValue = 0; - this.backTextureOffset.Location = new System.Drawing.Point(87, 65); - this.backTextureOffset.Name = "backTextureOffset"; - this.backTextureOffset.Size = new System.Drawing.Size(186, 26); - this.backTextureOffset.TabIndex = 42; - this.backTextureOffset.OnValuesChanged += new System.EventHandler(this.backTextureOffset_OnValuesChanged); - // - // flagsgroup - // - this.flagsgroup.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + this.backgroup.Controls.Add(this.labelBackTextureOffset); + this.backgroup.Controls.Add(this.backsector); + this.backgroup.Controls.Add(label12); + this.backgroup.Controls.Add(this.backlow); + this.backgroup.Controls.Add(this.backmid); + this.backgroup.Controls.Add(this.backhigh); + this.backgroup.Controls.Add(this.backTextureOffset); + this.backgroup.Controls.Add(label8); + this.backgroup.Controls.Add(label9); + this.backgroup.Controls.Add(label10); + this.backgroup.Enabled = false; + this.backgroup.Location = new System.Drawing.Point(6, 160); + this.backgroup.Name = "backgroup"; + this.backgroup.Size = new System.Drawing.Size(541, 148); + this.backgroup.TabIndex = 1; + this.backgroup.TabStop = false; + this.backgroup.Text = " "; + // + // labelBackTextureOffset + // + this.labelBackTextureOffset.Location = new System.Drawing.Point(6, 70); + this.labelBackTextureOffset.Name = "labelBackTextureOffset"; + this.labelBackTextureOffset.Size = new System.Drawing.Size(80, 14); + this.labelBackTextureOffset.TabIndex = 43; + this.labelBackTextureOffset.Text = "Texture Offset:"; + this.labelBackTextureOffset.TextAlign = System.Drawing.ContentAlignment.TopRight; + // + // backsector + // + this.backsector.AllowDecimal = false; + this.backsector.AllowNegative = false; + this.backsector.AllowRelative = false; + this.backsector.ButtonStep = 1; + this.backsector.ButtonStepBig = 10F; + this.backsector.ButtonStepFloat = 1F; + this.backsector.ButtonStepSmall = 0.1F; + this.backsector.ButtonStepsUseModifierKeys = false; + this.backsector.ButtonStepsWrapAround = false; + this.backsector.Location = new System.Drawing.Point(90, 35); + this.backsector.MaximumValue = 2147483647; + this.backsector.Name = "backsector"; + this.backsector.Size = new System.Drawing.Size(130, 24); + this.backsector.StepValues = null; + this.backsector.TabIndex = 17; + // + // backlow + // + this.backlow.Location = new System.Drawing.Point(437, 32); + this.backlow.MultipleTextures = false; + this.backlow.Name = "backlow"; + this.backlow.Required = false; + this.backlow.Size = new System.Drawing.Size(83, 107); + this.backlow.TabIndex = 6; + this.backlow.TextureName = ""; + this.backlow.UsePreviews = true; + this.backlow.OnValueChanged += new System.EventHandler(this.backlow_OnValueChanged); + // + // backmid + // + this.backmid.Location = new System.Drawing.Point(346, 32); + this.backmid.MultipleTextures = false; + this.backmid.Name = "backmid"; + this.backmid.Required = false; + this.backmid.Size = new System.Drawing.Size(83, 107); + this.backmid.TabIndex = 5; + this.backmid.TextureName = ""; + this.backmid.UsePreviews = true; + this.backmid.OnValueChanged += new System.EventHandler(this.backmid_OnValueChanged); + // + // backhigh + // + this.backhigh.Location = new System.Drawing.Point(255, 32); + this.backhigh.MultipleTextures = false; + this.backhigh.Name = "backhigh"; + this.backhigh.Required = false; + this.backhigh.Size = new System.Drawing.Size(83, 107); + this.backhigh.TabIndex = 4; + this.backhigh.TextureName = ""; + this.backhigh.UsePreviews = true; + this.backhigh.OnValueChanged += new System.EventHandler(this.backhigh_OnValueChanged); + // + // backTextureOffset + // + this.backTextureOffset.ButtonStep = 8; + this.backTextureOffset.ButtonStepBig = 16F; + this.backTextureOffset.ButtonStepSmall = 1F; + this.backTextureOffset.ButtonStepsUseModifierKeys = true; + this.backTextureOffset.DefaultValue = 0; + this.backTextureOffset.Location = new System.Drawing.Point(87, 65); + this.backTextureOffset.Name = "backTextureOffset"; + this.backTextureOffset.Size = new System.Drawing.Size(186, 26); + this.backTextureOffset.TabIndex = 42; + this.backTextureOffset.OnValuesChanged += new System.EventHandler(this.backTextureOffset_OnValuesChanged); + // + // flagsgroup + // + this.flagsgroup.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.flagsgroup.Controls.Add(this.flags); - this.flagsgroup.Location = new System.Drawing.Point(6, 314); - this.flagsgroup.Name = "flagsgroup"; - this.flagsgroup.Size = new System.Drawing.Size(541, 138); - this.flagsgroup.TabIndex = 0; - this.flagsgroup.TabStop = false; - this.flagsgroup.Text = " Flags"; - // - // flags - // - this.flags.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + this.flagsgroup.Controls.Add(this.flags); + this.flagsgroup.Location = new System.Drawing.Point(6, 314); + this.flagsgroup.Name = "flagsgroup"; + this.flagsgroup.Size = new System.Drawing.Size(541, 138); + this.flagsgroup.TabIndex = 0; + this.flagsgroup.TabStop = false; + this.flagsgroup.Text = " Flags"; + // + // flags + // + this.flags.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.flags.AutoScroll = true; - this.flags.Columns = 3; - this.flags.Location = new System.Drawing.Point(8, 17); - this.flags.Name = "flags"; - this.flags.Size = new System.Drawing.Size(532, 116); - this.flags.TabIndex = 0; - this.flags.VerticalSpacing = 1; - this.flags.OnValueChanged += new System.EventHandler(this.flags_OnValueChanged); - // - // actiongroup - // - this.actiongroup.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + this.flags.AutoScroll = true; + this.flags.Columns = 3; + this.flags.Location = new System.Drawing.Point(8, 17); + this.flags.Name = "flags"; + this.flags.Size = new System.Drawing.Size(532, 116); + this.flags.TabIndex = 0; + this.flags.VerticalSpacing = 1; + this.flags.OnValueChanged += new System.EventHandler(this.flags_OnValueChanged); + // + // actiongroup + // + this.actiongroup.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.actiongroup.Controls.Add(this.argscontrol); - this.actiongroup.Controls.Add(this.actionhelp); - this.actiongroup.Controls.Add(this.hexenpanel); - this.actiongroup.Controls.Add(label2); - this.actiongroup.Controls.Add(this.action); - this.actiongroup.Controls.Add(this.browseaction); - this.actiongroup.Location = new System.Drawing.Point(6, 458); - this.actiongroup.Name = "actiongroup"; - this.actiongroup.Size = new System.Drawing.Size(541, 176); - this.actiongroup.TabIndex = 1; - this.actiongroup.TabStop = false; - this.actiongroup.Text = " Action "; - // - // argscontrol - // - this.argscontrol.Location = new System.Drawing.Point(9, 52); - this.argscontrol.Name = "argscontrol"; - this.argscontrol.Size = new System.Drawing.Size(526, 76); - this.argscontrol.TabIndex = 12; - this.argscontrol.Visible = false; - // - // actionhelp - // - this.actionhelp.Location = new System.Drawing.Point(505, 21); - this.actionhelp.Name = "actionhelp"; - this.actionhelp.Size = new System.Drawing.Size(28, 25); - this.actionhelp.TabIndex = 11; - // - // hexenpanel - // - this.hexenpanel.Controls.Add(this.activation); - this.hexenpanel.Controls.Add(activationlabel); - this.hexenpanel.Location = new System.Drawing.Point(6, 134); - this.hexenpanel.Name = "hexenpanel"; - this.hexenpanel.Size = new System.Drawing.Size(529, 36); - this.hexenpanel.TabIndex = 3; - this.hexenpanel.Visible = false; - // - // activation - // - this.activation.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.activation.FormattingEnabled = true; - this.activation.Location = new System.Drawing.Point(56, 7); - this.activation.Name = "activation"; - this.activation.Size = new System.Drawing.Size(470, 21); - this.activation.TabIndex = 0; - // - // action - // - this.action.BackColor = System.Drawing.Color.Transparent; - this.action.Cursor = System.Windows.Forms.Cursors.Default; - this.action.Empty = false; - this.action.GeneralizedCategories = null; - this.action.GeneralizedOptions = null; - this.action.Location = new System.Drawing.Point(62, 23); - this.action.Name = "action"; - this.action.Size = new System.Drawing.Size(412, 21); - this.action.TabIndex = 0; - this.action.Value = -1; - this.action.ValueChanges += new System.EventHandler(this.action_ValueChanges); - // - // idgroup - // - this.idgroup.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + this.actiongroup.Controls.Add(this.argscontrol); + this.actiongroup.Controls.Add(this.actionhelp); + this.actiongroup.Controls.Add(this.hexenpanel); + this.actiongroup.Controls.Add(label2); + this.actiongroup.Controls.Add(this.action); + this.actiongroup.Controls.Add(this.browseaction); + this.actiongroup.Location = new System.Drawing.Point(6, 458); + this.actiongroup.Name = "actiongroup"; + this.actiongroup.Size = new System.Drawing.Size(541, 176); + this.actiongroup.TabIndex = 1; + this.actiongroup.TabStop = false; + this.actiongroup.Text = " Action "; + // + // argscontrol + // + this.argscontrol.Location = new System.Drawing.Point(9, 52); + this.argscontrol.Name = "argscontrol"; + this.argscontrol.Size = new System.Drawing.Size(526, 76); + this.argscontrol.TabIndex = 12; + this.argscontrol.Visible = false; + // + // actionhelp + // + this.actionhelp.Location = new System.Drawing.Point(505, 21); + this.actionhelp.Name = "actionhelp"; + this.actionhelp.Size = new System.Drawing.Size(28, 25); + this.actionhelp.TabIndex = 11; + // + // hexenpanel + // + this.hexenpanel.Controls.Add(this.activation); + this.hexenpanel.Controls.Add(activationlabel); + this.hexenpanel.Location = new System.Drawing.Point(6, 134); + this.hexenpanel.Name = "hexenpanel"; + this.hexenpanel.Size = new System.Drawing.Size(529, 36); + this.hexenpanel.TabIndex = 3; + this.hexenpanel.Visible = false; + // + // activation + // + this.activation.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.activation.FormattingEnabled = true; + this.activation.Location = new System.Drawing.Point(56, 7); + this.activation.Name = "activation"; + this.activation.Size = new System.Drawing.Size(470, 21); + this.activation.TabIndex = 0; + // + // action + // + this.action.BackColor = System.Drawing.Color.Transparent; + this.action.Cursor = System.Windows.Forms.Cursors.Default; + this.action.Empty = false; + this.action.GeneralizedCategories = null; + this.action.GeneralizedOptions = null; + this.action.GrayOut = true; + this.action.Location = new System.Drawing.Point(62, 23); + this.action.Name = "action"; + this.action.Size = new System.Drawing.Size(412, 21); + this.action.TabIndex = 0; + this.action.Value = -1; + this.action.ValueChanges += new System.EventHandler(this.action_ValueChanges); + // + // idgroup + // + this.idgroup.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.idgroup.Controls.Add(this.tagSelector); - this.idgroup.Location = new System.Drawing.Point(6, 640); - this.idgroup.Name = "idgroup"; - this.idgroup.Size = new System.Drawing.Size(541, 58); - this.idgroup.TabIndex = 2; - this.idgroup.TabStop = false; - this.idgroup.Text = " Identification "; - // - // tagSelector - // - this.tagSelector.Location = new System.Drawing.Point(19, 19); - this.tagSelector.Name = "tagSelector"; - this.tagSelector.Size = new System.Drawing.Size(518, 34); - this.tagSelector.TabIndex = 0; - // - // LinedefEditForm - // - this.AcceptButton = this.apply; - this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; - this.CancelButton = this.cancel; - this.ClientSize = new System.Drawing.Size(577, 760); - this.Controls.Add(this.cancel); - this.Controls.Add(this.apply); - this.Controls.Add(this.panel); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; - this.MaximizeBox = false; - this.MinimizeBox = false; - this.Name = "LinedefEditForm"; - this.Opacity = 1D; - this.ShowIcon = false; - this.ShowInTaskbar = false; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; - this.Text = "Edit Linedef"; - this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.LinedefEditForm_FormClosing); - this.HelpRequested += new System.Windows.Forms.HelpEventHandler(this.LinedefEditForm_HelpRequested); - this.panel.ResumeLayout(false); - this.panel.PerformLayout(); - this.frontgroup.ResumeLayout(false); - this.backgroup.ResumeLayout(false); - this.flagsgroup.ResumeLayout(false); - this.actiongroup.ResumeLayout(false); - this.actiongroup.PerformLayout(); - this.hexenpanel.ResumeLayout(false); - this.hexenpanel.PerformLayout(); - this.idgroup.ResumeLayout(false); - this.ResumeLayout(false); + this.idgroup.Controls.Add(this.tagSelector); + this.idgroup.Location = new System.Drawing.Point(6, 640); + this.idgroup.Name = "idgroup"; + this.idgroup.Size = new System.Drawing.Size(541, 58); + this.idgroup.TabIndex = 2; + this.idgroup.TabStop = false; + this.idgroup.Text = " Identification "; + // + // tagSelector + // + this.tagSelector.Location = new System.Drawing.Point(19, 19); + this.tagSelector.Name = "tagSelector"; + this.tagSelector.Size = new System.Drawing.Size(518, 34); + this.tagSelector.TabIndex = 0; + // + // LinedefEditForm + // + this.AcceptButton = this.apply; + this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; + this.CancelButton = this.cancel; + this.ClientSize = new System.Drawing.Size(577, 760); + this.Controls.Add(this.cancel); + this.Controls.Add(this.apply); + this.Controls.Add(this.panel); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "LinedefEditForm"; + this.Opacity = 1D; + this.ShowIcon = false; + this.ShowInTaskbar = false; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + this.Text = "Edit Linedef"; + this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.LinedefEditForm_FormClosing); + this.HelpRequested += new System.Windows.Forms.HelpEventHandler(this.LinedefEditForm_HelpRequested); + this.panel.ResumeLayout(false); + this.panel.PerformLayout(); + this.frontgroup.ResumeLayout(false); + this.backgroup.ResumeLayout(false); + this.flagsgroup.ResumeLayout(false); + this.actiongroup.ResumeLayout(false); + this.actiongroup.PerformLayout(); + this.hexenpanel.ResumeLayout(false); + this.hexenpanel.PerformLayout(); + this.idgroup.ResumeLayout(false); + this.ResumeLayout(false); } @@ -658,7 +632,5 @@ namespace CodeImp.DoomBuilder.Windows private System.Windows.Forms.Label labelFrontTextureOffset; private System.Windows.Forms.Label labelBackTextureOffset; private CodeImp.DoomBuilder.Controls.ArgumentsControl argscontrol; - private System.Windows.Forms.CheckBox replaceunusedfronttextures; - private System.Windows.Forms.CheckBox replaceunusedbacktextures; } } \ No newline at end of file diff --git a/Source/Core/Windows/LinedefEditForm.cs b/Source/Core/Windows/LinedefEditForm.cs index 4067993..05d7600 100644 --- a/Source/Core/Windows/LinedefEditForm.cs +++ b/Source/Core/Windows/LinedefEditForm.cs @@ -151,12 +151,6 @@ namespace CodeImp.DoomBuilder.Windows apply.Top = panel.Bottom + panel.Margin.Bottom + apply.Margin.Top; cancel.Top = apply.Top; - //mxd. Apply texture replacement settings - preventchanges = true; - replaceunusedfronttextures.Checked = General.Settings.ReadSetting("editlinedefswindow.replaceunusedfronttextures", true); - replaceunusedbacktextures.Checked = General.Settings.ReadSetting("editlinedefswindow.replaceunusedbacktextures", true); - preventchanges = false; - // Update window height this.Height = apply.Bottom + apply.Margin.Bottom * 2 + (this.Height - this.ClientRectangle.Height) + 1; } @@ -603,10 +597,6 @@ namespace CodeImp.DoomBuilder.Windows { // Save location location = this.Location; - - // Save persistent settings - General.Settings.WriteSetting("editlinedefswindow.replaceunusedfronttextures", replaceunusedfronttextures.Checked); - General.Settings.WriteSetting("editlinedefswindow.replaceunusedbacktextures", replaceunusedbacktextures.Checked); } // Help! @@ -687,15 +677,9 @@ namespace CodeImp.DoomBuilder.Windows // Update values else { - int i = 0; foreach(Linedef l in lines) { - if(l.Front != null - && (replaceunusedfronttextures.Checked - || (l.Front.HighRequired() - || (linedefprops[i].Front != null && linedefprops[i].Front.HighTexture != "-")))) - l.Front.SetTextureHigh(fronthigh.GetResult(l.Front.HighTexture)); - i++; + if(l.Front != null) l.Front.SetTextureHigh(fronthigh.GetResult(l.Front.HighTexture)); } } @@ -724,15 +708,9 @@ namespace CodeImp.DoomBuilder.Windows // Update values else { - int i = 0; foreach(Linedef l in lines) { - if(l.Front != null - && (replaceunusedfronttextures.Checked - || (l.Front.MiddleRequired() - || (linedefprops[i].Front != null && linedefprops[i].Front.MiddleTexture != "-")))) - l.Front.SetTextureMid(frontmid.GetResult(l.Front.MiddleTexture)); - i++; + if(l.Front != null) l.Front.SetTextureMid(frontmid.GetResult(l.Front.MiddleTexture)); } } @@ -761,15 +739,9 @@ namespace CodeImp.DoomBuilder.Windows // Update values else { - int i = 0; foreach(Linedef l in lines) { - if(l.Front != null - && (replaceunusedfronttextures.Checked - || (l.Front.LowRequired() - || (linedefprops[i].Front != null && linedefprops[i].Front.LowTexture != "-")))) - l.Front.SetTextureLow(frontlow.GetResult(l.Front.LowTexture)); - i++; + if(l.Front != null) l.Front.SetTextureLow(frontlow.GetResult(l.Front.LowTexture)); } } @@ -798,15 +770,9 @@ namespace CodeImp.DoomBuilder.Windows // Update values else { - int i = 0; foreach(Linedef l in lines) { - if(l.Back != null - && (replaceunusedbacktextures.Checked - || (l.Back.HighRequired() - || (linedefprops[i].Back != null && linedefprops[i].Back.HighTexture != "-")))) - l.Back.SetTextureHigh(backhigh.GetResult(l.Back.HighTexture)); - i++; + if(l.Back != null) l.Back.SetTextureHigh(backhigh.GetResult(l.Back.HighTexture)); } } @@ -835,15 +801,9 @@ namespace CodeImp.DoomBuilder.Windows // Update values else { - int i = 0; foreach(Linedef l in lines) { - if(l.Back != null - && (replaceunusedbacktextures.Checked - || (l.Back.MiddleRequired() - || (linedefprops[i].Back != null && linedefprops[i].Back.MiddleTexture != "-")))) - l.Back.SetTextureMid(backmid.GetResult(l.Back.MiddleTexture)); - i++; + if(l.Back != null) l.Back.SetTextureMid(backmid.GetResult(l.Back.MiddleTexture)); } } @@ -872,15 +832,9 @@ namespace CodeImp.DoomBuilder.Windows // Update values else { - int i = 0; foreach(Linedef l in lines) { - if(l.Back != null - && (replaceunusedbacktextures.Checked - || (l.Back.LowRequired() - || (linedefprops[i].Back != null && linedefprops[i].Back.LowTexture != "-")))) - l.Back.SetTextureLow(backlow.GetResult(l.Back.LowTexture)); - i++; + if(l.Back != null) l.Back.SetTextureLow(backlow.GetResult(l.Back.LowTexture)); } } @@ -891,86 +845,6 @@ namespace CodeImp.DoomBuilder.Windows if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty); } - private void replaceunusedfronttextures_CheckedChanged(object sender, EventArgs e) - { - //Re-apply front textures - if(preventchanges) return; - MakeUndo(); - - // Set values - int i = 0; - foreach(Linedef l in lines) - { - if(l.Front == null) continue; - - // Update top texture - if(!replaceunusedfronttextures.Checked || string.IsNullOrEmpty(fronthigh.TextureName)) - l.Front.SetTextureHigh(linedefprops[i].Front != null ? linedefprops[i].Front.HighTexture : "-"); - else - l.Front.SetTextureHigh(fronthigh.GetResult(l.Front.HighTexture)); - - // Update middle texture - if(!replaceunusedfronttextures.Checked || string.IsNullOrEmpty(frontmid.TextureName)) - l.Front.SetTextureMid(linedefprops[i].Front != null ? linedefprops[i].Front.MiddleTexture : "-"); - else - l.Front.SetTextureMid(frontmid.GetResult(l.Front.MiddleTexture)); - - // Update bottom texture - if(!replaceunusedfronttextures.Checked || string.IsNullOrEmpty(frontlow.TextureName)) - l.Front.SetTextureLow(linedefprops[i].Front != null ? linedefprops[i].Front.LowTexture : "-"); - else - l.Front.SetTextureLow(frontlow.GetResult(l.Front.LowTexture)); - - i++; - } - - // Update the used textures - General.Map.Data.UpdateUsedTextures(); - - General.Map.IsChanged = true; - if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty); - } - - private void replaceunusedbacktextures_CheckedChanged(object sender, EventArgs e) - { - //Re-apply back textures - if(preventchanges) return; - MakeUndo(); - - // Set values - int i = 0; - foreach(Linedef l in lines) - { - if(l.Back == null) continue; - - // Update top texture - if(!replaceunusedbacktextures.Checked || string.IsNullOrEmpty(backhigh.TextureName)) - l.Back.SetTextureHigh(linedefprops[i].Back != null ? linedefprops[i].Back.HighTexture : "-"); - else - l.Back.SetTextureHigh(backhigh.GetResult(l.Back.HighTexture)); - - // Update middle texture - if(!replaceunusedbacktextures.Checked || string.IsNullOrEmpty(backmid.TextureName)) - l.Back.SetTextureMid(linedefprops[i].Back != null ? linedefprops[i].Back.MiddleTexture : "-"); - else - l.Back.SetTextureMid(backmid.GetResult(l.Back.MiddleTexture)); - - // Update bottom texture - if(!replaceunusedbacktextures.Checked || string.IsNullOrEmpty(backlow.TextureName)) - l.Back.SetTextureLow(linedefprops[i].Back != null ? linedefprops[i].Back.LowTexture : "-"); - else - l.Back.SetTextureLow(backlow.GetResult(l.Back.LowTexture)); - - i++; - } - - // Update the used textures - General.Map.Data.UpdateUsedTextures(); - - General.Map.IsChanged = true; - if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty); - } - private void frontTextureOffset_OnValuesChanged(object sender, EventArgs e) { if(preventchanges) return; diff --git a/Source/Core/Windows/LinedefEditFormUDMF.Designer.cs b/Source/Core/Windows/LinedefEditFormUDMF.Designer.cs index 902e5c6..217527d 100644 --- a/Source/Core/Windows/LinedefEditFormUDMF.Designer.cs +++ b/Source/Core/Windows/LinedefEditFormUDMF.Designer.cs @@ -60,7 +60,6 @@ namespace CodeImp.DoomBuilder.Windows this.tabfront = new System.Windows.Forms.TabPage(); this.frontside = new System.Windows.Forms.CheckBox(); this.frontgroup = new System.Windows.Forms.GroupBox(); - this.replaceunusedfronttextures = new System.Windows.Forms.CheckBox(); this.frontflagsgroup = new System.Windows.Forms.GroupBox(); this.flagsFront = new CodeImp.DoomBuilder.Controls.CheckboxArrayControl(); this.frontscalegroup = new System.Windows.Forms.GroupBox(); @@ -91,7 +90,6 @@ namespace CodeImp.DoomBuilder.Windows this.tabback = new System.Windows.Forms.TabPage(); this.backside = new System.Windows.Forms.CheckBox(); this.backgroup = new System.Windows.Forms.GroupBox(); - this.replaceunusedbacktextures = new System.Windows.Forms.CheckBox(); this.groupBox4 = new System.Windows.Forms.GroupBox(); this.resetbacklight = new System.Windows.Forms.Button(); this.backsector = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox(); @@ -498,7 +496,6 @@ namespace CodeImp.DoomBuilder.Windows this.frontgroup.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.frontgroup.Controls.Add(this.replaceunusedfronttextures); this.frontgroup.Controls.Add(this.frontflagsgroup); this.frontgroup.Controls.Add(this.frontscalegroup); this.frontgroup.Controls.Add(this.groupBox6); @@ -514,17 +511,6 @@ namespace CodeImp.DoomBuilder.Windows this.frontgroup.TabStop = false; this.frontgroup.Text = " "; // - // replaceunusedfronttextures - // - this.replaceunusedfronttextures.AutoSize = true; - this.replaceunusedfronttextures.Location = new System.Drawing.Point(312, 15); - this.replaceunusedfronttextures.Name = "replaceunusedfronttextures"; - this.replaceunusedfronttextures.Size = new System.Drawing.Size(144, 17); - this.replaceunusedfronttextures.TabIndex = 46; - this.replaceunusedfronttextures.Text = "Replace unused textures"; - this.replaceunusedfronttextures.UseVisualStyleBackColor = true; - this.replaceunusedfronttextures.CheckedChanged += new System.EventHandler(this.replaceunusedfronttextures_CheckedChanged); - // // frontflagsgroup // this.frontflagsgroup.Controls.Add(this.flagsFront); @@ -864,11 +850,11 @@ namespace CodeImp.DoomBuilder.Windows // // frontlow // - this.frontlow.Location = new System.Drawing.Point(309, 415); + this.frontlow.Location = new System.Drawing.Point(309, 409); this.frontlow.MultipleTextures = false; this.frontlow.Name = "frontlow"; this.frontlow.Required = false; - this.frontlow.Size = new System.Drawing.Size(220, 184); + this.frontlow.Size = new System.Drawing.Size(220, 189); this.frontlow.TabIndex = 6; this.frontlow.TextureName = ""; this.frontlow.UsePreviews = false; @@ -876,11 +862,11 @@ namespace CodeImp.DoomBuilder.Windows // // frontmid // - this.frontmid.Location = new System.Drawing.Point(309, 225); + this.frontmid.Location = new System.Drawing.Point(309, 214); this.frontmid.MultipleTextures = false; this.frontmid.Name = "frontmid"; this.frontmid.Required = false; - this.frontmid.Size = new System.Drawing.Size(220, 184); + this.frontmid.Size = new System.Drawing.Size(220, 189); this.frontmid.TabIndex = 5; this.frontmid.TextureName = ""; this.frontmid.UsePreviews = false; @@ -888,11 +874,11 @@ namespace CodeImp.DoomBuilder.Windows // // fronthigh // - this.fronthigh.Location = new System.Drawing.Point(309, 35); + this.fronthigh.Location = new System.Drawing.Point(309, 19); this.fronthigh.MultipleTextures = false; this.fronthigh.Name = "fronthigh"; this.fronthigh.Required = false; - this.fronthigh.Size = new System.Drawing.Size(220, 184); + this.fronthigh.Size = new System.Drawing.Size(220, 189); this.fronthigh.TabIndex = 4; this.fronthigh.TextureName = ""; this.fronthigh.UsePreviews = false; @@ -928,7 +914,6 @@ namespace CodeImp.DoomBuilder.Windows this.backgroup.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.backgroup.Controls.Add(this.replaceunusedbacktextures); this.backgroup.Controls.Add(this.groupBox4); this.backgroup.Controls.Add(this.backflagsgroup); this.backgroup.Controls.Add(this.backscalegroup); @@ -944,17 +929,6 @@ namespace CodeImp.DoomBuilder.Windows this.backgroup.TabStop = false; this.backgroup.Text = " "; // - // replaceunusedbacktextures - // - this.replaceunusedbacktextures.AutoSize = true; - this.replaceunusedbacktextures.Location = new System.Drawing.Point(312, 15); - this.replaceunusedbacktextures.Name = "replaceunusedbacktextures"; - this.replaceunusedbacktextures.Size = new System.Drawing.Size(144, 17); - this.replaceunusedbacktextures.TabIndex = 47; - this.replaceunusedbacktextures.Text = "Replace unused textures"; - this.replaceunusedbacktextures.UseVisualStyleBackColor = true; - this.replaceunusedbacktextures.CheckedChanged += new System.EventHandler(this.replaceunusedbacktextures_CheckedChanged); - // // groupBox4 // this.groupBox4.Controls.Add(this.resetbacklight); @@ -1304,11 +1278,11 @@ namespace CodeImp.DoomBuilder.Windows // // backlow // - this.backlow.Location = new System.Drawing.Point(309, 415); + this.backlow.Location = new System.Drawing.Point(309, 409); this.backlow.MultipleTextures = false; this.backlow.Name = "backlow"; this.backlow.Required = false; - this.backlow.Size = new System.Drawing.Size(220, 184); + this.backlow.Size = new System.Drawing.Size(220, 189); this.backlow.TabIndex = 6; this.backlow.TextureName = ""; this.backlow.UsePreviews = false; @@ -1316,11 +1290,11 @@ namespace CodeImp.DoomBuilder.Windows // // backmid // - this.backmid.Location = new System.Drawing.Point(309, 225); + this.backmid.Location = new System.Drawing.Point(309, 214); this.backmid.MultipleTextures = false; this.backmid.Name = "backmid"; this.backmid.Required = false; - this.backmid.Size = new System.Drawing.Size(220, 184); + this.backmid.Size = new System.Drawing.Size(220, 189); this.backmid.TabIndex = 5; this.backmid.TextureName = ""; this.backmid.UsePreviews = false; @@ -1328,11 +1302,11 @@ namespace CodeImp.DoomBuilder.Windows // // backhigh // - this.backhigh.Location = new System.Drawing.Point(309, 35); + this.backhigh.Location = new System.Drawing.Point(309, 19); this.backhigh.MultipleTextures = false; this.backhigh.Name = "backhigh"; this.backhigh.Required = false; - this.backhigh.Size = new System.Drawing.Size(220, 184); + this.backhigh.Size = new System.Drawing.Size(220, 189); this.backhigh.TabIndex = 4; this.backhigh.TextureName = ""; this.backhigh.UsePreviews = false; @@ -1433,7 +1407,6 @@ namespace CodeImp.DoomBuilder.Windows this.tabfront.ResumeLayout(false); this.tabfront.PerformLayout(); this.frontgroup.ResumeLayout(false); - this.frontgroup.PerformLayout(); this.frontflagsgroup.ResumeLayout(false); this.frontscalegroup.ResumeLayout(false); this.groupBox6.ResumeLayout(false); @@ -1442,7 +1415,6 @@ namespace CodeImp.DoomBuilder.Windows this.tabback.ResumeLayout(false); this.tabback.PerformLayout(); this.backgroup.ResumeLayout(false); - this.backgroup.PerformLayout(); this.groupBox4.ResumeLayout(false); this.groupBox4.PerformLayout(); this.backflagsgroup.ResumeLayout(false); @@ -1546,7 +1518,5 @@ namespace CodeImp.DoomBuilder.Windows private CodeImp.DoomBuilder.GZBuilder.Controls.TagsSelector tagsselector; private System.Windows.Forms.Button resetfrontlight; private System.Windows.Forms.Button resetbacklight; - private System.Windows.Forms.CheckBox replaceunusedfronttextures; - private System.Windows.Forms.CheckBox replaceunusedbacktextures; } } \ No newline at end of file diff --git a/Source/Core/Windows/LinedefEditFormUDMF.cs b/Source/Core/Windows/LinedefEditFormUDMF.cs index 35069bf..7ae7528 100644 --- a/Source/Core/Windows/LinedefEditFormUDMF.cs +++ b/Source/Core/Windows/LinedefEditFormUDMF.cs @@ -232,12 +232,6 @@ namespace CodeImp.DoomBuilder.Windows pfcBackScaleTop.LinkValues = linkBackTopScale; pfcBackScaleMid.LinkValues = linkBackMidScale; pfcBackScaleBottom.LinkValues = linkBackBottomScale; - - // Apply texture replacement settings - preventchanges = true; - replaceunusedfronttextures.Checked = General.Settings.ReadSetting("editlinedefswindow.replaceunusedfronttextures", true); - replaceunusedbacktextures.Checked = General.Settings.ReadSetting("editlinedefswindow.replaceunusedbacktextures", true); - preventchanges = false; } #endregion @@ -841,10 +835,6 @@ namespace CodeImp.DoomBuilder.Windows // Save location and active tab location = this.Location; activetab = tabs.SelectedIndex; - - // Save persistent settings - General.Settings.WriteSetting("editlinedefswindow.replaceunusedfronttextures", replaceunusedfronttextures.Checked); - General.Settings.WriteSetting("editlinedefswindow.replaceunusedbacktextures", replaceunusedbacktextures.Checked); } // Help! @@ -1081,15 +1071,9 @@ namespace CodeImp.DoomBuilder.Windows // Update values else { - int i = 0; foreach(Linedef l in lines) { - if(l.Front != null - && (replaceunusedfronttextures.Checked - || (l.Front.HighRequired() - || (linedefprops[i].Front != null && linedefprops[i].Front.HighTexture != "-")))) - l.Front.SetTextureHigh(fronthigh.GetResult(l.Front.HighTexture)); - i++; + if(l.Front != null) l.Front.SetTextureHigh(fronthigh.GetResult(l.Front.HighTexture)); } } @@ -1118,15 +1102,9 @@ namespace CodeImp.DoomBuilder.Windows // Update values else { - int i = 0; foreach(Linedef l in lines) { - if(l.Front != null - && (replaceunusedfronttextures.Checked - || (l.Front.MiddleRequired() - || (linedefprops[i].Front != null && linedefprops[i].Front.MiddleTexture != "-")))) - l.Front.SetTextureMid(frontmid.GetResult(l.Front.MiddleTexture)); - i++; + if(l.Front != null) l.Front.SetTextureMid(frontmid.GetResult(l.Front.MiddleTexture)); } } @@ -1155,15 +1133,9 @@ namespace CodeImp.DoomBuilder.Windows // Update values else { - int i = 0; foreach(Linedef l in lines) { - if(l.Front != null - && (replaceunusedfronttextures.Checked - || (l.Front.LowRequired() - || (linedefprops[i].Front != null && linedefprops[i].Front.LowTexture != "-")))) - l.Front.SetTextureLow(frontlow.GetResult(l.Front.LowTexture)); - i++; + if(l.Front != null) l.Front.SetTextureLow(frontlow.GetResult(l.Front.LowTexture)); } } @@ -1192,15 +1164,9 @@ namespace CodeImp.DoomBuilder.Windows // Update values else { - int i = 0; foreach(Linedef l in lines) { - if(l.Back != null - && (replaceunusedbacktextures.Checked - || (l.Back.HighRequired() - || (linedefprops[i].Back != null && linedefprops[i].Back.HighTexture != "-")))) - l.Back.SetTextureHigh(backhigh.GetResult(l.Back.HighTexture)); - i++; + if(l.Back != null) l.Back.SetTextureHigh(backhigh.GetResult(l.Back.HighTexture)); } } @@ -1229,15 +1195,9 @@ namespace CodeImp.DoomBuilder.Windows // Update values else { - int i = 0; foreach(Linedef l in lines) { - if(l.Back != null - && (replaceunusedbacktextures.Checked - || (l.Back.MiddleRequired() - || (linedefprops[i].Back != null && linedefprops[i].Back.MiddleTexture != "-")))) - l.Back.SetTextureMid(backmid.GetResult(l.Back.MiddleTexture)); - i++; + if(l.Back != null) l.Back.SetTextureMid(backmid.GetResult(l.Back.MiddleTexture)); } } @@ -1266,15 +1226,9 @@ namespace CodeImp.DoomBuilder.Windows // Update values else { - int i = 0; foreach(Linedef l in lines) { - if(l.Back != null - && (replaceunusedbacktextures.Checked - || (l.Back.LowRequired() - || (linedefprops[i].Back != null && linedefprops[i].Back.LowTexture != "-")))) - l.Back.SetTextureLow(backlow.GetResult(l.Back.LowTexture)); - i++; + if(l.Back != null) l.Back.SetTextureLow(backlow.GetResult(l.Back.LowTexture)); } } @@ -1285,86 +1239,6 @@ namespace CodeImp.DoomBuilder.Windows if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty); } - private void replaceunusedfronttextures_CheckedChanged(object sender, EventArgs e) - { - //Re-apply front textures - if(preventchanges) return; - MakeUndo(); - - // Set values - int i = 0; - foreach(Linedef l in lines) - { - if(l.Front == null) continue; - - // Update top texture - if(!replaceunusedfronttextures.Checked || string.IsNullOrEmpty(fronthigh.TextureName)) - l.Front.SetTextureHigh(linedefprops[i].Front != null ? linedefprops[i].Front.HighTexture : "-"); - else - l.Front.SetTextureHigh(fronthigh.GetResult(l.Front.HighTexture)); - - // Update middle texture - if(!replaceunusedfronttextures.Checked || string.IsNullOrEmpty(frontmid.TextureName)) - l.Front.SetTextureMid(linedefprops[i].Front != null ? linedefprops[i].Front.MiddleTexture : "-"); - else - l.Front.SetTextureMid(frontmid.GetResult(l.Front.MiddleTexture)); - - // Update bottom texture - if(!replaceunusedfronttextures.Checked || string.IsNullOrEmpty(frontlow.TextureName)) - l.Front.SetTextureLow(linedefprops[i].Front != null ? linedefprops[i].Front.LowTexture : "-"); - else - l.Front.SetTextureLow(frontlow.GetResult(l.Front.LowTexture)); - - i++; - } - - // Update the used textures - General.Map.Data.UpdateUsedTextures(); - - General.Map.IsChanged = true; - if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty); - } - - private void replaceunusedbacktextures_CheckedChanged(object sender, EventArgs e) - { - //Re-apply back textures - if(preventchanges) return; - MakeUndo(); - - // Set values - int i = 0; - foreach(Linedef l in lines) - { - if(l.Back == null) continue; - - // Update top texture - if(!replaceunusedbacktextures.Checked || string.IsNullOrEmpty(backhigh.TextureName)) - l.Back.SetTextureHigh(linedefprops[i].Back != null ? linedefprops[i].Back.HighTexture : "-"); - else - l.Back.SetTextureHigh(backhigh.GetResult(l.Back.HighTexture)); - - // Update middle texture - if(!replaceunusedbacktextures.Checked || string.IsNullOrEmpty(backmid.TextureName)) - l.Back.SetTextureMid(linedefprops[i].Back != null ? linedefprops[i].Back.MiddleTexture : "-"); - else - l.Back.SetTextureMid(backmid.GetResult(l.Back.MiddleTexture)); - - // Update bottom texture - if(!replaceunusedbacktextures.Checked || string.IsNullOrEmpty(backlow.TextureName)) - l.Back.SetTextureLow(linedefprops[i].Back != null ? linedefprops[i].Back.LowTexture : "-"); - else - l.Back.SetTextureLow(backlow.GetResult(l.Back.LowTexture)); - - i++; - } - - // Update the used textures - General.Map.Data.UpdateUsedTextures(); - - General.Map.IsChanged = true; - if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty); - } - #endregion #region Brightness changed