From 032c8aaae12c7fc8e55888f8f24fd6de7707083b Mon Sep 17 00:00:00 2001 From: MaxED Date: Mon, 15 Sep 2014 14:12:31 +0000 Subject: [PATCH] Split Linedef Edit Form into 2 versions: one for Doom/Hexen, and the other for UDMF map format. Linedef Edit Form, UDMF: added less annoying warning about missing activation flags (no checks if an action actually requires activation yet...) --- Source/Core/Builder.csproj | 9 + Source/Core/Windows/BitFlagsForm.cs | 2 +- .../Core/Windows/LinedefEditForm.Designer.cs | 860 +------- Source/Core/Windows/LinedefEditForm.cs | 1205 ++--------- Source/Core/Windows/LinedefEditForm.resx | 39 - .../Windows/LinedefEditFormUDMF.Designer.cs | 1460 +++++++++++++ Source/Core/Windows/LinedefEditFormUDMF.cs | 1911 +++++++++++++++++ Source/Core/Windows/LinedefEditFormUDMF.resx | 216 ++ Source/Core/Windows/MainForm.cs | 56 +- 9 files changed, 3862 insertions(+), 1896 deletions(-) create mode 100644 Source/Core/Windows/LinedefEditFormUDMF.Designer.cs create mode 100644 Source/Core/Windows/LinedefEditFormUDMF.cs create mode 100644 Source/Core/Windows/LinedefEditFormUDMF.resx diff --git a/Source/Core/Builder.csproj b/Source/Core/Builder.csproj index 6c40c8ad..6ffc52d8 100644 --- a/Source/Core/Builder.csproj +++ b/Source/Core/Builder.csproj @@ -878,6 +878,12 @@ FlagsForm.cs + + Form + + + LinedefEditFormUDMF.cs + Form @@ -1141,6 +1147,9 @@ FlagsForm.cs + + LinedefEditFormUDMF.cs + PasteOptionsForm.cs diff --git a/Source/Core/Windows/BitFlagsForm.cs b/Source/Core/Windows/BitFlagsForm.cs index baad5f1e..6aa31e1e 100644 --- a/Source/Core/Windows/BitFlagsForm.cs +++ b/Source/Core/Windows/BitFlagsForm.cs @@ -30,7 +30,7 @@ namespace CodeImp.DoomBuilder.Windows private bool setup; private int value; - private int initialFlagsHeight; //mxd + private readonly int initialFlagsHeight; //mxd #endregion diff --git a/Source/Core/Windows/LinedefEditForm.Designer.cs b/Source/Core/Windows/LinedefEditForm.Designer.cs index 81712786..1f1071da 100644 --- a/Source/Core/Windows/LinedefEditForm.Designer.cs +++ b/Source/Core/Windows/LinedefEditForm.Designer.cs @@ -38,16 +38,11 @@ namespace CodeImp.DoomBuilder.Windows System.Windows.Forms.Label label11; System.Windows.Forms.Label label12; System.Windows.Forms.Label activationlabel; - System.Windows.Forms.Label label7; - System.Windows.Forms.Label label14; - System.Windows.Forms.Label label6; - this.labelLightFront = new System.Windows.Forms.Label(); this.cancel = new System.Windows.Forms.Button(); this.apply = new System.Windows.Forms.Button(); this.actiongroup = new System.Windows.Forms.GroupBox(); this.argspanel = new System.Windows.Forms.Panel(); this.scriptNumbers = new System.Windows.Forms.ComboBox(); - this.scriptNames = new System.Windows.Forms.ComboBox(); this.arg2 = new CodeImp.DoomBuilder.Controls.ArgumentBox(); this.arg1 = new CodeImp.DoomBuilder.Controls.ArgumentBox(); this.arg0 = new CodeImp.DoomBuilder.Controls.ArgumentBox(); @@ -57,71 +52,30 @@ namespace CodeImp.DoomBuilder.Windows this.arg3label = new System.Windows.Forms.Label(); this.arg2label = new System.Windows.Forms.Label(); this.arg4label = new System.Windows.Forms.Label(); - this.cbArgStr = new System.Windows.Forms.CheckBox(); this.arg0label = new System.Windows.Forms.Label(); this.hexenpanel = new System.Windows.Forms.Panel(); this.activation = new System.Windows.Forms.ComboBox(); this.action = new CodeImp.DoomBuilder.Controls.ActionSelectorControl(); this.browseaction = new System.Windows.Forms.Button(); - this.udmfpanel = new System.Windows.Forms.Panel(); - this.udmfactivates = new CodeImp.DoomBuilder.Controls.CheckboxArrayControl(); this.flagsgroup = new System.Windows.Forms.GroupBox(); this.flags = new CodeImp.DoomBuilder.Controls.CheckboxArrayControl(); - this.tabs = new System.Windows.Forms.TabControl(); - this.tabproperties = new System.Windows.Forms.TabPage(); - this.settingsGroup = new System.Windows.Forms.GroupBox(); - this.alpha = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox(); - this.lockNumber = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox(); - this.renderStyle = new System.Windows.Forms.ComboBox(); this.idgroup = new System.Windows.Forms.GroupBox(); this.tagSelector = new CodeImp.DoomBuilder.GZBuilder.Controls.TagSelector(); - this.tabsidedefs = new System.Windows.Forms.TabPage(); - this.splitter = new System.Windows.Forms.SplitContainer(); this.frontside = new System.Windows.Forms.CheckBox(); this.frontgroup = new System.Windows.Forms.GroupBox(); this.frontTextureOffset = new CodeImp.DoomBuilder.GZBuilder.Controls.PairedIntControl(); - this.cbLightAbsoluteFront = new System.Windows.Forms.CheckBox(); - this.lightFront = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox(); this.frontsector = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox(); - this.customfrontbutton = new System.Windows.Forms.Button(); this.frontlow = new CodeImp.DoomBuilder.Controls.TextureSelectorControl(); this.frontmid = new CodeImp.DoomBuilder.Controls.TextureSelectorControl(); this.fronthigh = new CodeImp.DoomBuilder.Controls.TextureSelectorControl(); - this.udmfPropertiesFront = new System.Windows.Forms.TabControl(); - this.tabFrontOffsets = new System.Windows.Forms.TabPage(); - this.pfcFrontScaleBottom = new CodeImp.DoomBuilder.GZBuilder.Controls.PairedFieldsControl(); - this.pfcFrontScaleMid = new CodeImp.DoomBuilder.GZBuilder.Controls.PairedFieldsControl(); - this.pfcFrontScaleTop = new CodeImp.DoomBuilder.GZBuilder.Controls.PairedFieldsControl(); - this.pfcFrontOffsetBottom = new CodeImp.DoomBuilder.GZBuilder.Controls.PairedFieldsControl(); - this.pfcFrontOffsetMid = new CodeImp.DoomBuilder.GZBuilder.Controls.PairedFieldsControl(); - this.pfcFrontOffsetTop = new CodeImp.DoomBuilder.GZBuilder.Controls.PairedFieldsControl(); - this.tabFrontFlags = new System.Windows.Forms.TabPage(); - this.flagsFront = new CodeImp.DoomBuilder.Controls.CheckboxArrayControl(); this.backside = new System.Windows.Forms.CheckBox(); this.backgroup = new System.Windows.Forms.GroupBox(); this.backTextureOffset = new CodeImp.DoomBuilder.GZBuilder.Controls.PairedIntControl(); - this.cbLightAbsoluteBack = new System.Windows.Forms.CheckBox(); - this.labelLightBack = new System.Windows.Forms.Label(); - this.lightBack = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox(); this.backsector = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox(); - this.custombackbutton = new System.Windows.Forms.Button(); this.backlow = new CodeImp.DoomBuilder.Controls.TextureSelectorControl(); this.backmid = new CodeImp.DoomBuilder.Controls.TextureSelectorControl(); this.backhigh = new CodeImp.DoomBuilder.Controls.TextureSelectorControl(); - this.udmfPropertiesBack = new System.Windows.Forms.TabControl(); - this.tabBackOffsets = new System.Windows.Forms.TabPage(); - this.pfcBackScaleMid = new CodeImp.DoomBuilder.GZBuilder.Controls.PairedFieldsControl(); - this.pfcBackScaleTop = new CodeImp.DoomBuilder.GZBuilder.Controls.PairedFieldsControl(); - this.pfcBackScaleBottom = new CodeImp.DoomBuilder.GZBuilder.Controls.PairedFieldsControl(); - this.pfcBackOffsetBottom = new CodeImp.DoomBuilder.GZBuilder.Controls.PairedFieldsControl(); - this.pfcBackOffsetMid = new CodeImp.DoomBuilder.GZBuilder.Controls.PairedFieldsControl(); - this.pfcBackOffsetTop = new CodeImp.DoomBuilder.GZBuilder.Controls.PairedFieldsControl(); - this.tabBackFlags = new System.Windows.Forms.TabPage(); - this.flagsBack = new CodeImp.DoomBuilder.Controls.CheckboxArrayControl(); - this.tabcustom = new System.Windows.Forms.TabPage(); - this.fieldslist = new CodeImp.DoomBuilder.Controls.FieldsEditorControl(); - this.heightpanel1 = new System.Windows.Forms.Panel(); - this.heightpanel2 = new System.Windows.Forms.Panel(); + this.panel1 = new System.Windows.Forms.Panel(); label2 = new System.Windows.Forms.Label(); label3 = new System.Windows.Forms.Label(); label4 = new System.Windows.Forms.Label(); @@ -132,31 +86,14 @@ namespace CodeImp.DoomBuilder.Windows label11 = new System.Windows.Forms.Label(); label12 = new System.Windows.Forms.Label(); activationlabel = new System.Windows.Forms.Label(); - label7 = new System.Windows.Forms.Label(); - label14 = new System.Windows.Forms.Label(); - label6 = new System.Windows.Forms.Label(); this.actiongroup.SuspendLayout(); this.argspanel.SuspendLayout(); this.hexenpanel.SuspendLayout(); - this.udmfpanel.SuspendLayout(); this.flagsgroup.SuspendLayout(); - this.tabs.SuspendLayout(); - this.tabproperties.SuspendLayout(); - this.settingsGroup.SuspendLayout(); this.idgroup.SuspendLayout(); - this.tabsidedefs.SuspendLayout(); - this.splitter.Panel1.SuspendLayout(); - this.splitter.Panel2.SuspendLayout(); - this.splitter.SuspendLayout(); this.frontgroup.SuspendLayout(); - this.udmfPropertiesFront.SuspendLayout(); - this.tabFrontOffsets.SuspendLayout(); - this.tabFrontFlags.SuspendLayout(); this.backgroup.SuspendLayout(); - this.udmfPropertiesBack.SuspendLayout(); - this.tabBackOffsets.SuspendLayout(); - this.tabBackFlags.SuspendLayout(); - this.tabcustom.SuspendLayout(); + this.panel1.SuspendLayout(); this.SuspendLayout(); // // label2 @@ -249,48 +186,11 @@ namespace CodeImp.DoomBuilder.Windows activationlabel.TabIndex = 10; activationlabel.Text = "Trigger:"; // - // label7 - // - label7.AutoSize = true; - label7.Location = new System.Drawing.Point(15, 30); - label7.Name = "label7"; - label7.Size = new System.Drawing.Size(71, 14); - label7.TabIndex = 11; - label7.Text = "Render style:"; - // - // label14 - // - label14.AutoSize = true; - label14.Location = new System.Drawing.Point(330, 30); - label14.Name = "label14"; - label14.Size = new System.Drawing.Size(73, 14); - label14.TabIndex = 15; - label14.Text = "Lock Number:"; - // - // label6 - // - label6.AutoSize = true; - label6.Location = new System.Drawing.Point(199, 30); - label6.Name = "label6"; - label6.Size = new System.Drawing.Size(38, 14); - label6.TabIndex = 17; - label6.Text = "Alpha:"; - // - // labelLightFront - // - this.labelLightFront.Location = new System.Drawing.Point(8, 101); - this.labelLightFront.Name = "labelLightFront"; - this.labelLightFront.Size = new System.Drawing.Size(80, 14); - this.labelLightFront.TabIndex = 25; - this.labelLightFront.Tag = ""; - this.labelLightFront.Text = "Brightness:"; - this.labelLightFront.TextAlign = System.Drawing.ContentAlignment.TopRight; - // // cancel // this.cancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.cancel.Location = new System.Drawing.Point(335, 665); + this.cancel.Location = new System.Drawing.Point(335, 764); this.cancel.Name = "cancel"; this.cancel.Size = new System.Drawing.Size(112, 25); this.cancel.TabIndex = 2; @@ -301,7 +201,7 @@ namespace CodeImp.DoomBuilder.Windows // apply // this.apply.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.apply.Location = new System.Drawing.Point(453, 665); + this.apply.Location = new System.Drawing.Point(453, 764); this.apply.Name = "apply"; this.apply.Size = new System.Drawing.Size(112, 25); this.apply.TabIndex = 1; @@ -318,10 +218,9 @@ namespace CodeImp.DoomBuilder.Windows this.actiongroup.Controls.Add(label2); this.actiongroup.Controls.Add(this.action); this.actiongroup.Controls.Add(this.browseaction); - this.actiongroup.Controls.Add(this.udmfpanel); - this.actiongroup.Location = new System.Drawing.Point(8, 255); + this.actiongroup.Location = new System.Drawing.Point(6, 462); this.actiongroup.Name = "actiongroup"; - this.actiongroup.Size = new System.Drawing.Size(533, 291); + this.actiongroup.Size = new System.Drawing.Size(541, 190); this.actiongroup.TabIndex = 1; this.actiongroup.TabStop = false; this.actiongroup.Text = " Action "; @@ -329,7 +228,6 @@ namespace CodeImp.DoomBuilder.Windows // argspanel // this.argspanel.Controls.Add(this.scriptNumbers); - this.argspanel.Controls.Add(this.scriptNames); this.argspanel.Controls.Add(this.arg2); this.argspanel.Controls.Add(this.arg1); this.argspanel.Controls.Add(this.arg0); @@ -339,7 +237,6 @@ namespace CodeImp.DoomBuilder.Windows this.argspanel.Controls.Add(this.arg3label); this.argspanel.Controls.Add(this.arg2label); this.argspanel.Controls.Add(this.arg4label); - this.argspanel.Controls.Add(this.cbArgStr); this.argspanel.Controls.Add(this.arg0label); this.argspanel.Location = new System.Drawing.Point(6, 54); this.argspanel.Name = "argspanel"; @@ -353,22 +250,11 @@ namespace CodeImp.DoomBuilder.Windows this.scriptNumbers.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems; this.scriptNumbers.BackColor = System.Drawing.Color.LemonChiffon; this.scriptNumbers.FormattingEnabled = true; - this.scriptNumbers.Location = new System.Drawing.Point(407, 55); + this.scriptNumbers.Location = new System.Drawing.Point(398, 57); this.scriptNumbers.Name = "scriptNumbers"; this.scriptNumbers.Size = new System.Drawing.Size(120, 22); this.scriptNumbers.TabIndex = 39; // - // scriptNames - // - this.scriptNames.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest; - this.scriptNames.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems; - this.scriptNames.BackColor = System.Drawing.Color.Honeydew; - this.scriptNames.FormattingEnabled = true; - this.scriptNames.Location = new System.Drawing.Point(283, 55); - this.scriptNames.Name = "scriptNames"; - this.scriptNames.Size = new System.Drawing.Size(120, 22); - this.scriptNames.TabIndex = 38; - // // arg2 // this.arg2.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); @@ -449,16 +335,6 @@ namespace CodeImp.DoomBuilder.Windows this.arg4label.TextAlign = System.Drawing.ContentAlignment.TopRight; this.arg4label.UseMnemonic = false; // - // cbArgStr - // - this.cbArgStr.Location = new System.Drawing.Point(8, -4); - this.cbArgStr.Name = "cbArgStr"; - this.cbArgStr.Size = new System.Drawing.Size(63, 40); - this.cbArgStr.TabIndex = 37; - this.cbArgStr.Text = "Named script"; - this.cbArgStr.UseVisualStyleBackColor = true; - this.cbArgStr.CheckedChanged += new System.EventHandler(this.cbArgStr_CheckedChanged); - // // arg0label // this.arg0label.Location = new System.Drawing.Point(-28, 8); @@ -475,7 +351,7 @@ namespace CodeImp.DoomBuilder.Windows this.hexenpanel.Controls.Add(activationlabel); this.hexenpanel.Location = new System.Drawing.Point(6, 139); this.hexenpanel.Name = "hexenpanel"; - this.hexenpanel.Size = new System.Drawing.Size(521, 49); + this.hexenpanel.Size = new System.Drawing.Size(521, 44); this.hexenpanel.TabIndex = 3; this.hexenpanel.Visible = false; // @@ -485,7 +361,7 @@ namespace CodeImp.DoomBuilder.Windows this.activation.FormattingEnabled = true; this.activation.Location = new System.Drawing.Point(56, 13); this.activation.Name = "activation"; - this.activation.Size = new System.Drawing.Size(437, 22); + this.activation.Size = new System.Drawing.Size(428, 22); this.activation.TabIndex = 0; // // action @@ -494,6 +370,7 @@ namespace CodeImp.DoomBuilder.Windows 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, 27); this.action.Name = "action"; this.action.Size = new System.Drawing.Size(428, 21); @@ -514,36 +391,14 @@ namespace CodeImp.DoomBuilder.Windows this.browseaction.UseVisualStyleBackColor = true; this.browseaction.Click += new System.EventHandler(this.browseaction_Click); // - // udmfpanel - // - this.udmfpanel.Controls.Add(this.udmfactivates); - this.udmfpanel.Location = new System.Drawing.Point(6, 143); - this.udmfpanel.Name = "udmfpanel"; - this.udmfpanel.Size = new System.Drawing.Size(505, 142); - this.udmfpanel.TabIndex = 4; - this.udmfpanel.Visible = false; - // - // udmfactivates - // - this.udmfactivates.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.udmfactivates.AutoScroll = true; - this.udmfactivates.Columns = 2; - this.udmfactivates.Location = new System.Drawing.Point(56, 5); - this.udmfactivates.Name = "udmfactivates"; - this.udmfactivates.Size = new System.Drawing.Size(437, 133); - this.udmfactivates.TabIndex = 0; - this.udmfactivates.VerticalSpacing = 1; - // // 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(8, 3); + this.flagsgroup.Location = new System.Drawing.Point(6, 338); this.flagsgroup.Name = "flagsgroup"; - this.flagsgroup.Size = new System.Drawing.Size(533, 174); + this.flagsgroup.Size = new System.Drawing.Size(541, 118); this.flagsgroup.TabIndex = 0; this.flagsgroup.TabStop = false; this.flagsgroup.Text = " Flags"; @@ -557,153 +412,35 @@ namespace CodeImp.DoomBuilder.Windows this.flags.Columns = 3; this.flags.Location = new System.Drawing.Point(18, 17); this.flags.Name = "flags"; - this.flags.Size = new System.Drawing.Size(509, 152); + this.flags.Size = new System.Drawing.Size(517, 96); this.flags.TabIndex = 0; this.flags.VerticalSpacing = 1; this.flags.OnValueChanged += new System.EventHandler(this.flags_OnValueChanged); // - // tabs - // - this.tabs.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.tabs.Controls.Add(this.tabproperties); - this.tabs.Controls.Add(this.tabsidedefs); - this.tabs.Controls.Add(this.tabcustom); - this.tabs.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.tabs.Location = new System.Drawing.Point(10, 10); - this.tabs.Margin = new System.Windows.Forms.Padding(1); - this.tabs.Name = "tabs"; - this.tabs.SelectedIndex = 0; - this.tabs.Size = new System.Drawing.Size(557, 648); - this.tabs.SizeMode = System.Windows.Forms.TabSizeMode.Fixed; - this.tabs.TabIndex = 0; - // - // tabproperties - // - this.tabproperties.Controls.Add(this.settingsGroup); - this.tabproperties.Controls.Add(this.idgroup); - this.tabproperties.Controls.Add(this.flagsgroup); - this.tabproperties.Controls.Add(this.actiongroup); - this.tabproperties.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.tabproperties.Location = new System.Drawing.Point(4, 23); - this.tabproperties.Name = "tabproperties"; - this.tabproperties.Padding = new System.Windows.Forms.Padding(5); - this.tabproperties.Size = new System.Drawing.Size(549, 621); - this.tabproperties.TabIndex = 0; - this.tabproperties.Text = " Properties "; - this.tabproperties.UseVisualStyleBackColor = true; - // - // settingsGroup - // - this.settingsGroup.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.settingsGroup.Controls.Add(this.alpha); - this.settingsGroup.Controls.Add(label6); - this.settingsGroup.Controls.Add(this.lockNumber); - this.settingsGroup.Controls.Add(label14); - this.settingsGroup.Controls.Add(this.renderStyle); - this.settingsGroup.Controls.Add(label7); - this.settingsGroup.Location = new System.Drawing.Point(8, 183); - this.settingsGroup.Name = "settingsGroup"; - this.settingsGroup.Size = new System.Drawing.Size(533, 66); - this.settingsGroup.TabIndex = 3; - this.settingsGroup.TabStop = false; - this.settingsGroup.Text = " Settings"; - // - // alpha - // - this.alpha.AllowDecimal = true; - this.alpha.AllowNegative = false; - this.alpha.AllowRelative = false; - this.alpha.ButtonStep = 1; - this.alpha.ButtonStepFloat = 0.1F; - this.alpha.Location = new System.Drawing.Point(243, 25); - this.alpha.Name = "alpha"; - this.alpha.Size = new System.Drawing.Size(65, 24); - this.alpha.StepValues = null; - this.alpha.TabIndex = 18; - this.alpha.WhenTextChanged += new System.EventHandler(this.alpha_WhenTextChanged); - // - // lockNumber - // - this.lockNumber.AllowDecimal = false; - this.lockNumber.AllowNegative = false; - this.lockNumber.AllowRelative = false; - this.lockNumber.ButtonStep = 1; - this.lockNumber.ButtonStepFloat = 1F; - this.lockNumber.Location = new System.Drawing.Point(405, 25); - this.lockNumber.Name = "lockNumber"; - this.lockNumber.Size = new System.Drawing.Size(65, 24); - this.lockNumber.StepValues = null; - this.lockNumber.TabIndex = 16; - // - // renderStyle - // - this.renderStyle.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.renderStyle.FormattingEnabled = true; - this.renderStyle.Location = new System.Drawing.Point(92, 26); - this.renderStyle.Name = "renderStyle"; - this.renderStyle.Size = new System.Drawing.Size(86, 22); - this.renderStyle.TabIndex = 12; - this.renderStyle.SelectedIndexChanged += new System.EventHandler(this.cbRenderStyle_SelectedIndexChanged); - // // 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(8, 552); + this.idgroup.Location = new System.Drawing.Point(6, 658); + this.idgroup.Margin = new System.Windows.Forms.Padding(3, 3, 3, 6); this.idgroup.Name = "idgroup"; - this.idgroup.Size = new System.Drawing.Size(533, 66); + 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(6, 19); + this.tagSelector.Location = new System.Drawing.Point(19, 19); this.tagSelector.Name = "tagSelector"; - this.tagSelector.Size = new System.Drawing.Size(444, 35); + this.tagSelector.Size = new System.Drawing.Size(444, 34); this.tagSelector.TabIndex = 0; // - // tabsidedefs - // - this.tabsidedefs.Controls.Add(this.splitter); - this.tabsidedefs.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.tabsidedefs.Location = new System.Drawing.Point(4, 23); - this.tabsidedefs.Name = "tabsidedefs"; - this.tabsidedefs.Padding = new System.Windows.Forms.Padding(5); - this.tabsidedefs.Size = new System.Drawing.Size(549, 621); - this.tabsidedefs.TabIndex = 1; - this.tabsidedefs.Text = " Sidedefs "; - this.tabsidedefs.UseVisualStyleBackColor = true; - // - // splitter - // - this.splitter.Dock = System.Windows.Forms.DockStyle.Fill; - this.splitter.IsSplitterFixed = true; - this.splitter.Location = new System.Drawing.Point(5, 5); - this.splitter.Name = "splitter"; - this.splitter.Orientation = System.Windows.Forms.Orientation.Horizontal; - // - // splitter.Panel1 - // - this.splitter.Panel1.Controls.Add(this.frontside); - this.splitter.Panel1.Controls.Add(this.frontgroup); - // - // splitter.Panel2 - // - this.splitter.Panel2.Controls.Add(this.backside); - this.splitter.Panel2.Controls.Add(this.backgroup); - this.splitter.Size = new System.Drawing.Size(539, 611); - this.splitter.SplitterDistance = 302; - this.splitter.TabIndex = 3; - // // frontside // this.frontside.AutoSize = true; - this.frontside.Location = new System.Drawing.Point(15, 1); + this.frontside.Location = new System.Drawing.Point(11, -2); this.frontside.Name = "frontside"; this.frontside.Size = new System.Drawing.Size(75, 18); this.frontside.TabIndex = 0; @@ -713,27 +450,22 @@ namespace CodeImp.DoomBuilder.Windows // // frontgroup // - this.frontgroup.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) + 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.frontside); this.frontgroup.Controls.Add(this.frontTextureOffset); - this.frontgroup.Controls.Add(this.cbLightAbsoluteFront); - this.frontgroup.Controls.Add(this.labelLightFront); - this.frontgroup.Controls.Add(this.lightFront); this.frontgroup.Controls.Add(this.frontsector); - this.frontgroup.Controls.Add(this.customfrontbutton); 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.udmfPropertiesFront); 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(3, 3); + this.frontgroup.Location = new System.Drawing.Point(6, 6); this.frontgroup.Name = "frontgroup"; - this.frontgroup.Size = new System.Drawing.Size(535, 296); + this.frontgroup.Size = new System.Drawing.Size(541, 160); this.frontgroup.TabIndex = 1; this.frontgroup.TabStop = false; this.frontgroup.Text = " "; @@ -749,33 +481,6 @@ namespace CodeImp.DoomBuilder.Windows this.frontTextureOffset.TabIndex = 41; this.frontTextureOffset.OnValuesChanged += new System.EventHandler(this.frontTextureOffset_OnValuesChanged); // - // cbLightAbsoluteFront - // - this.cbLightAbsoluteFront.AutoSize = true; - this.cbLightAbsoluteFront.Location = new System.Drawing.Point(158, 100); - this.cbLightAbsoluteFront.Name = "cbLightAbsoluteFront"; - this.cbLightAbsoluteFront.Size = new System.Drawing.Size(69, 18); - this.cbLightAbsoluteFront.TabIndex = 27; - this.cbLightAbsoluteFront.Tag = "lightabsolute"; - this.cbLightAbsoluteFront.Text = "Absolute"; - this.cbLightAbsoluteFront.UseVisualStyleBackColor = true; - this.cbLightAbsoluteFront.CheckedChanged += new System.EventHandler(this.cbLightAbsoluteFront_CheckedChanged); - // - // lightFront - // - this.lightFront.AllowDecimal = false; - this.lightFront.AllowNegative = true; - this.lightFront.AllowRelative = true; - this.lightFront.ButtonStep = 16; - this.lightFront.ButtonStepFloat = 1F; - this.lightFront.Location = new System.Drawing.Point(90, 96); - this.lightFront.Name = "lightFront"; - this.lightFront.Size = new System.Drawing.Size(62, 24); - this.lightFront.StepValues = null; - this.lightFront.TabIndex = 26; - this.lightFront.Tag = ""; - this.lightFront.WhenTextChanged += new System.EventHandler(this.lightFront_WhenTextChanged); - // // frontsector // this.frontsector.AllowDecimal = false; @@ -783,22 +488,13 @@ namespace CodeImp.DoomBuilder.Windows this.frontsector.AllowRelative = false; this.frontsector.ButtonStep = 1; this.frontsector.ButtonStepFloat = 1F; + 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; // - // customfrontbutton - // - this.customfrontbutton.Location = new System.Drawing.Point(90, 126); - this.customfrontbutton.Name = "customfrontbutton"; - this.customfrontbutton.Size = new System.Drawing.Size(130, 25); - this.customfrontbutton.TabIndex = 3; - this.customfrontbutton.Text = "Custom fields..."; - this.customfrontbutton.UseVisualStyleBackColor = true; - this.customfrontbutton.Click += new System.EventHandler(this.customfrontbutton_Click); - // // frontlow // this.frontlow.Location = new System.Drawing.Point(434, 37); @@ -832,168 +528,10 @@ namespace CodeImp.DoomBuilder.Windows this.fronthigh.TextureName = ""; this.fronthigh.OnValueChanged += new System.EventHandler(this.fronthigh_OnValueChanged); // - // udmfPropertiesFront - // - this.udmfPropertiesFront.Controls.Add(this.tabFrontOffsets); - this.udmfPropertiesFront.Controls.Add(this.tabFrontFlags); - this.udmfPropertiesFront.ItemSize = new System.Drawing.Size(100, 19); - this.udmfPropertiesFront.Location = new System.Drawing.Point(6, 169); - this.udmfPropertiesFront.Margin = new System.Windows.Forms.Padding(1); - this.udmfPropertiesFront.Name = "udmfPropertiesFront"; - this.udmfPropertiesFront.SelectedIndex = 0; - this.udmfPropertiesFront.Size = new System.Drawing.Size(525, 123); - this.udmfPropertiesFront.TabIndex = 24; - // - // tabFrontOffsets - // - this.tabFrontOffsets.Controls.Add(this.pfcFrontScaleBottom); - this.tabFrontOffsets.Controls.Add(this.pfcFrontScaleMid); - this.tabFrontOffsets.Controls.Add(this.pfcFrontScaleTop); - this.tabFrontOffsets.Controls.Add(this.pfcFrontOffsetBottom); - this.tabFrontOffsets.Controls.Add(this.pfcFrontOffsetMid); - this.tabFrontOffsets.Controls.Add(this.pfcFrontOffsetTop); - this.tabFrontOffsets.Location = new System.Drawing.Point(4, 23); - this.tabFrontOffsets.Name = "tabFrontOffsets"; - this.tabFrontOffsets.Padding = new System.Windows.Forms.Padding(3); - this.tabFrontOffsets.Size = new System.Drawing.Size(517, 96); - this.tabFrontOffsets.TabIndex = 0; - this.tabFrontOffsets.Text = " Offsets & Scale "; - this.tabFrontOffsets.UseVisualStyleBackColor = true; - // - // pfcFrontScaleBottom - // - this.pfcFrontScaleBottom.AllowDecimal = true; - this.pfcFrontScaleBottom.AllowValueLinking = true; - this.pfcFrontScaleBottom.ButtonStep = 1; - this.pfcFrontScaleBottom.ButtonStepFloat = 0.1F; - this.pfcFrontScaleBottom.DefaultValue = 1F; - this.pfcFrontScaleBottom.Field1 = "scalex_bottom"; - this.pfcFrontScaleBottom.Field2 = "scaley_bottom"; - this.pfcFrontScaleBottom.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); - this.pfcFrontScaleBottom.Label = "Lower Scale:"; - this.pfcFrontScaleBottom.LinkValues = false; - this.pfcFrontScaleBottom.Location = new System.Drawing.Point(245, 65); - this.pfcFrontScaleBottom.Name = "pfcFrontScaleBottom"; - this.pfcFrontScaleBottom.Size = new System.Drawing.Size(270, 32); - this.pfcFrontScaleBottom.TabIndex = 40; - this.pfcFrontScaleBottom.OnValuesChanged += new System.EventHandler(this.pfcFrontScaleBottom_OnValuesChanged); - // - // pfcFrontScaleMid - // - this.pfcFrontScaleMid.AllowDecimal = true; - this.pfcFrontScaleMid.AllowValueLinking = true; - this.pfcFrontScaleMid.ButtonStep = 1; - this.pfcFrontScaleMid.ButtonStepFloat = 0.1F; - this.pfcFrontScaleMid.DefaultValue = 1F; - this.pfcFrontScaleMid.Field1 = "scalex_mid"; - this.pfcFrontScaleMid.Field2 = "scaley_mid"; - this.pfcFrontScaleMid.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); - this.pfcFrontScaleMid.Label = "Middle Scale:"; - this.pfcFrontScaleMid.LinkValues = false; - this.pfcFrontScaleMid.Location = new System.Drawing.Point(245, 36); - this.pfcFrontScaleMid.Name = "pfcFrontScaleMid"; - this.pfcFrontScaleMid.Size = new System.Drawing.Size(270, 32); - this.pfcFrontScaleMid.TabIndex = 39; - this.pfcFrontScaleMid.OnValuesChanged += new System.EventHandler(this.pfcFrontScaleMid_OnValuesChanged); - // - // pfcFrontScaleTop - // - this.pfcFrontScaleTop.AllowDecimal = true; - this.pfcFrontScaleTop.AllowValueLinking = true; - this.pfcFrontScaleTop.ButtonStep = 1; - this.pfcFrontScaleTop.ButtonStepFloat = 0.1F; - this.pfcFrontScaleTop.DefaultValue = 1F; - this.pfcFrontScaleTop.Field1 = "scalex_top"; - this.pfcFrontScaleTop.Field2 = "scaley_top"; - this.pfcFrontScaleTop.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); - this.pfcFrontScaleTop.Label = "Upper Scale:"; - this.pfcFrontScaleTop.LinkValues = false; - this.pfcFrontScaleTop.Location = new System.Drawing.Point(245, 6); - this.pfcFrontScaleTop.Name = "pfcFrontScaleTop"; - this.pfcFrontScaleTop.Size = new System.Drawing.Size(270, 30); - this.pfcFrontScaleTop.TabIndex = 38; - this.pfcFrontScaleTop.OnValuesChanged += new System.EventHandler(this.pfcFrontScaleTop_OnValuesChanged); - // - // pfcFrontOffsetBottom - // - this.pfcFrontOffsetBottom.AllowDecimal = true; - this.pfcFrontOffsetBottom.AllowValueLinking = false; - this.pfcFrontOffsetBottom.ButtonStep = 1; - this.pfcFrontOffsetBottom.ButtonStepFloat = 16F; - this.pfcFrontOffsetBottom.DefaultValue = 0F; - this.pfcFrontOffsetBottom.Field1 = "offsetx_bottom"; - this.pfcFrontOffsetBottom.Field2 = "offsety_bottom"; - this.pfcFrontOffsetBottom.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); - this.pfcFrontOffsetBottom.Label = "Lower Offset:"; - this.pfcFrontOffsetBottom.LinkValues = false; - this.pfcFrontOffsetBottom.Location = new System.Drawing.Point(-5, 65); - this.pfcFrontOffsetBottom.Name = "pfcFrontOffsetBottom"; - this.pfcFrontOffsetBottom.Size = new System.Drawing.Size(270, 30); - this.pfcFrontOffsetBottom.TabIndex = 37; - this.pfcFrontOffsetBottom.OnValuesChanged += new System.EventHandler(this.pfcFrontOffsetBottom_OnValuesChanged); - // - // pfcFrontOffsetMid - // - this.pfcFrontOffsetMid.AllowDecimal = true; - this.pfcFrontOffsetMid.AllowValueLinking = false; - this.pfcFrontOffsetMid.ButtonStep = 1; - this.pfcFrontOffsetMid.ButtonStepFloat = 16F; - this.pfcFrontOffsetMid.DefaultValue = 0F; - this.pfcFrontOffsetMid.Field1 = "offsetx_mid"; - this.pfcFrontOffsetMid.Field2 = "offsety_mid"; - this.pfcFrontOffsetMid.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); - this.pfcFrontOffsetMid.Label = "Middle Offset:"; - this.pfcFrontOffsetMid.LinkValues = false; - this.pfcFrontOffsetMid.Location = new System.Drawing.Point(-5, 36); - this.pfcFrontOffsetMid.Name = "pfcFrontOffsetMid"; - this.pfcFrontOffsetMid.Size = new System.Drawing.Size(270, 30); - this.pfcFrontOffsetMid.TabIndex = 36; - this.pfcFrontOffsetMid.OnValuesChanged += new System.EventHandler(this.pfcFrontOffsetMid_OnValuesChanged); - // - // pfcFrontOffsetTop - // - this.pfcFrontOffsetTop.AllowDecimal = true; - this.pfcFrontOffsetTop.AllowValueLinking = false; - this.pfcFrontOffsetTop.ButtonStep = 1; - this.pfcFrontOffsetTop.ButtonStepFloat = 16F; - this.pfcFrontOffsetTop.DefaultValue = 0F; - this.pfcFrontOffsetTop.Field1 = "offsetx_top"; - this.pfcFrontOffsetTop.Field2 = "offsety_top"; - this.pfcFrontOffsetTop.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); - this.pfcFrontOffsetTop.Label = "Upper Offset:"; - this.pfcFrontOffsetTop.LinkValues = false; - this.pfcFrontOffsetTop.Location = new System.Drawing.Point(-5, 6); - this.pfcFrontOffsetTop.Name = "pfcFrontOffsetTop"; - this.pfcFrontOffsetTop.Size = new System.Drawing.Size(270, 28); - this.pfcFrontOffsetTop.TabIndex = 35; - this.pfcFrontOffsetTop.OnValuesChanged += new System.EventHandler(this.pfcFrontOffsetTop_OnValuesChanged); - // - // tabFrontFlags - // - this.tabFrontFlags.Controls.Add(this.flagsFront); - this.tabFrontFlags.Location = new System.Drawing.Point(4, 23); - this.tabFrontFlags.Name = "tabFrontFlags"; - this.tabFrontFlags.Padding = new System.Windows.Forms.Padding(3); - this.tabFrontFlags.Size = new System.Drawing.Size(517, 96); - this.tabFrontFlags.TabIndex = 1; - this.tabFrontFlags.Text = " Flags "; - this.tabFrontFlags.UseVisualStyleBackColor = true; - // - // flagsFront - // - this.flagsFront.AutoScroll = true; - this.flagsFront.Columns = 2; - this.flagsFront.Location = new System.Drawing.Point(15, 6); - this.flagsFront.Name = "flagsFront"; - this.flagsFront.Size = new System.Drawing.Size(496, 84); - this.flagsFront.TabIndex = 0; - this.flagsFront.VerticalSpacing = 3; - this.flagsFront.OnValueChanged += new System.EventHandler(this.flagsFront_OnValueChanged); - // // backside // this.backside.AutoSize = true; - this.backside.Location = new System.Drawing.Point(15, 1); + this.backside.Location = new System.Drawing.Point(11, -2); this.backside.Name = "backside"; this.backside.Size = new System.Drawing.Size(74, 18); this.backside.TabIndex = 0; @@ -1003,15 +541,11 @@ namespace CodeImp.DoomBuilder.Windows // // backgroup // - this.backgroup.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) + 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.backTextureOffset); - this.backgroup.Controls.Add(this.cbLightAbsoluteBack); - this.backgroup.Controls.Add(this.labelLightBack); - this.backgroup.Controls.Add(this.lightBack); + this.backgroup.Controls.Add(this.backside); this.backgroup.Controls.Add(this.backsector); - this.backgroup.Controls.Add(this.custombackbutton); this.backgroup.Controls.Add(label12); this.backgroup.Controls.Add(this.backlow); this.backgroup.Controls.Add(this.backmid); @@ -1019,11 +553,10 @@ namespace CodeImp.DoomBuilder.Windows this.backgroup.Controls.Add(label8); this.backgroup.Controls.Add(label9); this.backgroup.Controls.Add(label10); - this.backgroup.Controls.Add(this.udmfPropertiesBack); this.backgroup.Enabled = false; - this.backgroup.Location = new System.Drawing.Point(3, 3); + this.backgroup.Location = new System.Drawing.Point(6, 172); this.backgroup.Name = "backgroup"; - this.backgroup.Size = new System.Drawing.Size(535, 299); + this.backgroup.Size = new System.Drawing.Size(541, 160); this.backgroup.TabIndex = 1; this.backgroup.TabStop = false; this.backgroup.Text = " "; @@ -1039,43 +572,6 @@ namespace CodeImp.DoomBuilder.Windows this.backTextureOffset.TabIndex = 42; this.backTextureOffset.OnValuesChanged += new System.EventHandler(this.backTextureOffset_OnValuesChanged); // - // cbLightAbsoluteBack - // - this.cbLightAbsoluteBack.AutoSize = true; - this.cbLightAbsoluteBack.Location = new System.Drawing.Point(158, 100); - this.cbLightAbsoluteBack.Name = "cbLightAbsoluteBack"; - this.cbLightAbsoluteBack.Size = new System.Drawing.Size(69, 18); - this.cbLightAbsoluteBack.TabIndex = 30; - this.cbLightAbsoluteBack.Tag = "lightabsolute"; - this.cbLightAbsoluteBack.Text = "Absolute"; - this.cbLightAbsoluteBack.UseVisualStyleBackColor = true; - this.cbLightAbsoluteBack.CheckedChanged += new System.EventHandler(this.cbLightAbsoluteBack_CheckedChanged); - // - // labelLightBack - // - this.labelLightBack.Location = new System.Drawing.Point(8, 101); - this.labelLightBack.Name = "labelLightBack"; - this.labelLightBack.Size = new System.Drawing.Size(80, 14); - this.labelLightBack.TabIndex = 28; - this.labelLightBack.Tag = ""; - this.labelLightBack.Text = "Brightness:"; - this.labelLightBack.TextAlign = System.Drawing.ContentAlignment.TopRight; - // - // lightBack - // - this.lightBack.AllowDecimal = false; - this.lightBack.AllowNegative = true; - this.lightBack.AllowRelative = true; - this.lightBack.ButtonStep = 16; - this.lightBack.ButtonStepFloat = 1F; - this.lightBack.Location = new System.Drawing.Point(90, 96); - this.lightBack.Name = "lightBack"; - this.lightBack.Size = new System.Drawing.Size(62, 24); - this.lightBack.StepValues = null; - this.lightBack.TabIndex = 29; - this.lightBack.Tag = "light"; - this.lightBack.WhenTextChanged += new System.EventHandler(this.lightBack_WhenTextChanged); - // // backsector // this.backsector.AllowDecimal = false; @@ -1083,22 +579,13 @@ namespace CodeImp.DoomBuilder.Windows this.backsector.AllowRelative = false; this.backsector.ButtonStep = 1; this.backsector.ButtonStepFloat = 1F; + 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; // - // custombackbutton - // - this.custombackbutton.Location = new System.Drawing.Point(90, 126); - this.custombackbutton.Name = "custombackbutton"; - this.custombackbutton.Size = new System.Drawing.Size(130, 25); - this.custombackbutton.TabIndex = 3; - this.custombackbutton.Text = "Custom fields..."; - this.custombackbutton.UseVisualStyleBackColor = true; - this.custombackbutton.Click += new System.EventHandler(this.custombackbutton_Click); - // // backlow // this.backlow.Location = new System.Drawing.Point(437, 37); @@ -1132,214 +619,21 @@ namespace CodeImp.DoomBuilder.Windows this.backhigh.TextureName = ""; this.backhigh.OnValueChanged += new System.EventHandler(this.backhigh_OnValueChanged); // - // udmfPropertiesBack + // panel1 // - this.udmfPropertiesBack.Controls.Add(this.tabBackOffsets); - this.udmfPropertiesBack.Controls.Add(this.tabBackFlags); - this.udmfPropertiesBack.ItemSize = new System.Drawing.Size(100, 19); - this.udmfPropertiesBack.Location = new System.Drawing.Point(6, 172); - this.udmfPropertiesBack.Margin = new System.Windows.Forms.Padding(1); - this.udmfPropertiesBack.Name = "udmfPropertiesBack"; - this.udmfPropertiesBack.SelectedIndex = 0; - this.udmfPropertiesBack.Size = new System.Drawing.Size(525, 123); - this.udmfPropertiesBack.TabIndex = 25; - // - // tabBackOffsets - // - this.tabBackOffsets.Controls.Add(this.pfcBackScaleMid); - this.tabBackOffsets.Controls.Add(this.pfcBackScaleTop); - this.tabBackOffsets.Controls.Add(this.pfcBackScaleBottom); - this.tabBackOffsets.Controls.Add(this.pfcBackOffsetBottom); - this.tabBackOffsets.Controls.Add(this.pfcBackOffsetMid); - this.tabBackOffsets.Controls.Add(this.pfcBackOffsetTop); - this.tabBackOffsets.Location = new System.Drawing.Point(4, 23); - this.tabBackOffsets.Name = "tabBackOffsets"; - this.tabBackOffsets.Padding = new System.Windows.Forms.Padding(3); - this.tabBackOffsets.Size = new System.Drawing.Size(517, 96); - this.tabBackOffsets.TabIndex = 0; - this.tabBackOffsets.Text = " Offsets & Scale "; - this.tabBackOffsets.UseVisualStyleBackColor = true; - // - // pfcBackScaleMid - // - this.pfcBackScaleMid.AllowDecimal = true; - this.pfcBackScaleMid.AllowValueLinking = true; - this.pfcBackScaleMid.ButtonStep = 1; - this.pfcBackScaleMid.ButtonStepFloat = 0.1F; - this.pfcBackScaleMid.DefaultValue = 1F; - this.pfcBackScaleMid.Field1 = "scalex_mid"; - this.pfcBackScaleMid.Field2 = "scaley_mid"; - this.pfcBackScaleMid.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); - this.pfcBackScaleMid.Label = "Middle Scale:"; - this.pfcBackScaleMid.LinkValues = false; - this.pfcBackScaleMid.Location = new System.Drawing.Point(245, 36); - this.pfcBackScaleMid.Name = "pfcBackScaleMid"; - this.pfcBackScaleMid.Size = new System.Drawing.Size(270, 32); - this.pfcBackScaleMid.TabIndex = 39; - this.pfcBackScaleMid.OnValuesChanged += new System.EventHandler(this.pfcBackScaleMid_OnValuesChanged); - // - // pfcBackScaleTop - // - this.pfcBackScaleTop.AllowDecimal = true; - this.pfcBackScaleTop.AllowValueLinking = true; - this.pfcBackScaleTop.ButtonStep = 1; - this.pfcBackScaleTop.ButtonStepFloat = 0.1F; - this.pfcBackScaleTop.DefaultValue = 1F; - this.pfcBackScaleTop.Field1 = "scalex_top"; - this.pfcBackScaleTop.Field2 = "scaley_top"; - this.pfcBackScaleTop.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); - this.pfcBackScaleTop.Label = "Upper Scale:"; - this.pfcBackScaleTop.LinkValues = false; - this.pfcBackScaleTop.Location = new System.Drawing.Point(245, 6); - this.pfcBackScaleTop.Name = "pfcBackScaleTop"; - this.pfcBackScaleTop.Size = new System.Drawing.Size(270, 30); - this.pfcBackScaleTop.TabIndex = 38; - this.pfcBackScaleTop.OnValuesChanged += new System.EventHandler(this.pfcBackScaleTop_OnValuesChanged); - // - // pfcBackScaleBottom - // - this.pfcBackScaleBottom.AllowDecimal = true; - this.pfcBackScaleBottom.AllowValueLinking = true; - this.pfcBackScaleBottom.ButtonStep = 1; - this.pfcBackScaleBottom.ButtonStepFloat = 0.1F; - this.pfcBackScaleBottom.DefaultValue = 1F; - this.pfcBackScaleBottom.Field1 = "scalex_bottom"; - this.pfcBackScaleBottom.Field2 = "scaley_bottom"; - this.pfcBackScaleBottom.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); - this.pfcBackScaleBottom.Label = "Lower Scale:"; - this.pfcBackScaleBottom.LinkValues = false; - this.pfcBackScaleBottom.Location = new System.Drawing.Point(245, 65); - this.pfcBackScaleBottom.Name = "pfcBackScaleBottom"; - this.pfcBackScaleBottom.Size = new System.Drawing.Size(270, 32); - this.pfcBackScaleBottom.TabIndex = 40; - this.pfcBackScaleBottom.OnValuesChanged += new System.EventHandler(this.pfcBackScaleBottom_OnValuesChanged); - // - // pfcBackOffsetBottom - // - this.pfcBackOffsetBottom.AllowDecimal = true; - this.pfcBackOffsetBottom.AllowValueLinking = false; - this.pfcBackOffsetBottom.ButtonStep = 1; - this.pfcBackOffsetBottom.ButtonStepFloat = 16F; - this.pfcBackOffsetBottom.DefaultValue = 0F; - this.pfcBackOffsetBottom.Field1 = "offsetx_bottom"; - this.pfcBackOffsetBottom.Field2 = "offsety_bottom"; - this.pfcBackOffsetBottom.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); - this.pfcBackOffsetBottom.Label = "Lower Offset:"; - this.pfcBackOffsetBottom.LinkValues = false; - this.pfcBackOffsetBottom.Location = new System.Drawing.Point(-5, 65); - this.pfcBackOffsetBottom.Name = "pfcBackOffsetBottom"; - this.pfcBackOffsetBottom.Size = new System.Drawing.Size(270, 30); - this.pfcBackOffsetBottom.TabIndex = 37; - this.pfcBackOffsetBottom.OnValuesChanged += new System.EventHandler(this.pfcBackOffsetBottom_OnValuesChanged); - // - // pfcBackOffsetMid - // - this.pfcBackOffsetMid.AllowDecimal = true; - this.pfcBackOffsetMid.AllowValueLinking = false; - this.pfcBackOffsetMid.ButtonStep = 1; - this.pfcBackOffsetMid.ButtonStepFloat = 16F; - this.pfcBackOffsetMid.DefaultValue = 0F; - this.pfcBackOffsetMid.Field1 = "offsetx_mid"; - this.pfcBackOffsetMid.Field2 = "offsety_mid"; - this.pfcBackOffsetMid.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); - this.pfcBackOffsetMid.Label = "Middle Offset:"; - this.pfcBackOffsetMid.LinkValues = false; - this.pfcBackOffsetMid.Location = new System.Drawing.Point(-5, 36); - this.pfcBackOffsetMid.Name = "pfcBackOffsetMid"; - this.pfcBackOffsetMid.Size = new System.Drawing.Size(270, 30); - this.pfcBackOffsetMid.TabIndex = 36; - this.pfcBackOffsetMid.OnValuesChanged += new System.EventHandler(this.pfcBackOffsetMid_OnValuesChanged); - // - // pfcBackOffsetTop - // - this.pfcBackOffsetTop.AllowDecimal = true; - this.pfcBackOffsetTop.AllowValueLinking = false; - this.pfcBackOffsetTop.ButtonStep = 1; - this.pfcBackOffsetTop.ButtonStepFloat = 16F; - this.pfcBackOffsetTop.DefaultValue = 0F; - this.pfcBackOffsetTop.Field1 = "offsetx_top"; - this.pfcBackOffsetTop.Field2 = "offsety_top"; - this.pfcBackOffsetTop.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); - this.pfcBackOffsetTop.Label = "Upper Offset:"; - this.pfcBackOffsetTop.LinkValues = false; - this.pfcBackOffsetTop.Location = new System.Drawing.Point(-5, 6); - this.pfcBackOffsetTop.Name = "pfcBackOffsetTop"; - this.pfcBackOffsetTop.Size = new System.Drawing.Size(270, 28); - this.pfcBackOffsetTop.TabIndex = 35; - this.pfcBackOffsetTop.OnValuesChanged += new System.EventHandler(this.pfcBackOffsetTop_OnValuesChanged); - // - // tabBackFlags - // - this.tabBackFlags.Controls.Add(this.flagsBack); - this.tabBackFlags.Location = new System.Drawing.Point(4, 23); - this.tabBackFlags.Name = "tabBackFlags"; - this.tabBackFlags.Padding = new System.Windows.Forms.Padding(3); - this.tabBackFlags.Size = new System.Drawing.Size(517, 96); - this.tabBackFlags.TabIndex = 1; - this.tabBackFlags.Text = " Flags "; - this.tabBackFlags.UseVisualStyleBackColor = true; - // - // flagsBack - // - this.flagsBack.AutoScroll = true; - this.flagsBack.Columns = 2; - this.flagsBack.Location = new System.Drawing.Point(15, 6); - this.flagsBack.Name = "flagsBack"; - this.flagsBack.Size = new System.Drawing.Size(496, 84); - this.flagsBack.TabIndex = 1; - this.flagsBack.VerticalSpacing = 3; - this.flagsBack.OnValueChanged += new System.EventHandler(this.flagsBack_OnValueChanged); - // - // tabcustom - // - this.tabcustom.Controls.Add(this.fieldslist); - this.tabcustom.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.tabcustom.Location = new System.Drawing.Point(4, 23); - this.tabcustom.Name = "tabcustom"; - this.tabcustom.Padding = new System.Windows.Forms.Padding(3); - this.tabcustom.Size = new System.Drawing.Size(549, 621); - this.tabcustom.TabIndex = 2; - this.tabcustom.Text = "Custom"; - this.tabcustom.UseVisualStyleBackColor = true; - this.tabcustom.MouseEnter += new System.EventHandler(this.tabcustom_MouseEnter); - // - // fieldslist - // - this.fieldslist.AllowInsert = true; - this.fieldslist.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + this.panel1.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.fieldslist.AutoInsertUserPrefix = true; - this.fieldslist.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; - this.fieldslist.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.fieldslist.Location = new System.Drawing.Point(11, 11); - this.fieldslist.Margin = new System.Windows.Forms.Padding(8); - this.fieldslist.Name = "fieldslist"; - this.fieldslist.PropertyColumnVisible = true; - this.fieldslist.PropertyColumnWidth = 150; - this.fieldslist.Size = new System.Drawing.Size(527, 602); - this.fieldslist.TabIndex = 0; - this.fieldslist.TypeColumnVisible = true; - this.fieldslist.TypeColumnWidth = 100; - this.fieldslist.ValueColumnVisible = true; - // - // heightpanel1 - // - this.heightpanel1.BackColor = System.Drawing.Color.Navy; - this.heightpanel1.Location = new System.Drawing.Point(0, -19); - this.heightpanel1.Name = "heightpanel1"; - this.heightpanel1.Size = new System.Drawing.Size(78, 480); - this.heightpanel1.TabIndex = 3; - this.heightpanel1.Visible = false; - // - // heightpanel2 - // - this.heightpanel2.BackColor = System.Drawing.Color.Navy; - this.heightpanel2.Location = new System.Drawing.Point(473, -19); - this.heightpanel2.Name = "heightpanel2"; - this.heightpanel2.Size = new System.Drawing.Size(88, 470); - this.heightpanel2.TabIndex = 4; - this.heightpanel2.Visible = false; + this.panel1.BackColor = System.Drawing.SystemColors.Window; + this.panel1.Controls.Add(this.frontgroup); + this.panel1.Controls.Add(this.backgroup); + this.panel1.Controls.Add(this.flagsgroup); + this.panel1.Controls.Add(this.actiongroup); + this.panel1.Controls.Add(this.idgroup); + this.panel1.Location = new System.Drawing.Point(12, 12); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(553, 746); + this.panel1.TabIndex = 5; // // LinedefEditForm // @@ -1347,12 +641,10 @@ namespace CodeImp.DoomBuilder.Windows 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, 697); - this.Controls.Add(this.tabs); + this.ClientSize = new System.Drawing.Size(577, 796); this.Controls.Add(this.cancel); this.Controls.Add(this.apply); - this.Controls.Add(this.heightpanel1); - this.Controls.Add(this.heightpanel2); + this.Controls.Add(this.panel1); this.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; this.MaximizeBox = false; @@ -1370,30 +662,13 @@ namespace CodeImp.DoomBuilder.Windows this.argspanel.ResumeLayout(false); this.hexenpanel.ResumeLayout(false); this.hexenpanel.PerformLayout(); - this.udmfpanel.ResumeLayout(false); this.flagsgroup.ResumeLayout(false); - this.tabs.ResumeLayout(false); - this.tabproperties.ResumeLayout(false); - this.settingsGroup.ResumeLayout(false); - this.settingsGroup.PerformLayout(); this.idgroup.ResumeLayout(false); - this.tabsidedefs.ResumeLayout(false); - this.splitter.Panel1.ResumeLayout(false); - this.splitter.Panel1.PerformLayout(); - this.splitter.Panel2.ResumeLayout(false); - this.splitter.Panel2.PerformLayout(); - this.splitter.ResumeLayout(false); this.frontgroup.ResumeLayout(false); this.frontgroup.PerformLayout(); - this.udmfPropertiesFront.ResumeLayout(false); - this.tabFrontOffsets.ResumeLayout(false); - this.tabFrontFlags.ResumeLayout(false); this.backgroup.ResumeLayout(false); this.backgroup.PerformLayout(); - this.udmfPropertiesBack.ResumeLayout(false); - this.tabBackOffsets.ResumeLayout(false); - this.tabBackFlags.ResumeLayout(false); - this.tabcustom.ResumeLayout(false); + this.panel1.ResumeLayout(false); this.ResumeLayout(false); } @@ -1407,9 +682,6 @@ namespace CodeImp.DoomBuilder.Windows private CodeImp.DoomBuilder.Controls.CheckboxArrayControl flags; private System.Windows.Forms.Button browseaction; private CodeImp.DoomBuilder.Controls.ActionSelectorControl action; - private System.Windows.Forms.TabControl tabs; - private System.Windows.Forms.TabPage tabproperties; - private System.Windows.Forms.TabPage tabsidedefs; private System.Windows.Forms.GroupBox frontgroup; private System.Windows.Forms.CheckBox frontside; private System.Windows.Forms.CheckBox backside; @@ -1421,12 +693,8 @@ namespace CodeImp.DoomBuilder.Windows private CodeImp.DoomBuilder.Controls.TextureSelectorControl backmid; private CodeImp.DoomBuilder.Controls.TextureSelectorControl backhigh; private System.Windows.Forms.ComboBox activation; - private System.Windows.Forms.Panel udmfpanel; private System.Windows.Forms.Panel hexenpanel; - private System.Windows.Forms.TabPage tabcustom; - private CodeImp.DoomBuilder.Controls.FieldsEditorControl fieldslist; private System.Windows.Forms.GroupBox idgroup; - private CodeImp.DoomBuilder.Controls.CheckboxArrayControl udmfactivates; private System.Windows.Forms.Panel argspanel; private CodeImp.DoomBuilder.Controls.ArgumentBox arg2; private CodeImp.DoomBuilder.Controls.ArgumentBox arg1; @@ -1438,48 +706,12 @@ namespace CodeImp.DoomBuilder.Windows private System.Windows.Forms.Label arg3label; private System.Windows.Forms.Label arg2label; private System.Windows.Forms.Label arg4label; - private System.Windows.Forms.SplitContainer splitter; - private System.Windows.Forms.Button customfrontbutton; - private System.Windows.Forms.Button custombackbutton; - private System.Windows.Forms.Panel heightpanel1; - private System.Windows.Forms.Panel heightpanel2; private CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox frontsector; private CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox backsector; - private System.Windows.Forms.CheckBox cbArgStr; - private System.Windows.Forms.ComboBox scriptNames; private CodeImp.DoomBuilder.GZBuilder.Controls.TagSelector tagSelector; - private System.Windows.Forms.TabControl udmfPropertiesFront; - private System.Windows.Forms.TabPage tabFrontOffsets; - private System.Windows.Forms.TabPage tabFrontFlags; - private CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox lightFront; - private System.Windows.Forms.CheckBox cbLightAbsoluteFront; - private CodeImp.DoomBuilder.GZBuilder.Controls.PairedFieldsControl pfcFrontOffsetTop; - private CodeImp.DoomBuilder.GZBuilder.Controls.PairedFieldsControl pfcFrontOffsetBottom; - private CodeImp.DoomBuilder.GZBuilder.Controls.PairedFieldsControl pfcFrontOffsetMid; - private CodeImp.DoomBuilder.GZBuilder.Controls.PairedFieldsControl pfcFrontScaleBottom; - private CodeImp.DoomBuilder.GZBuilder.Controls.PairedFieldsControl pfcFrontScaleMid; - private CodeImp.DoomBuilder.GZBuilder.Controls.PairedFieldsControl pfcFrontScaleTop; - private System.Windows.Forms.TabControl udmfPropertiesBack; - private System.Windows.Forms.TabPage tabBackOffsets; - private CodeImp.DoomBuilder.GZBuilder.Controls.PairedFieldsControl pfcBackScaleBottom; - private CodeImp.DoomBuilder.GZBuilder.Controls.PairedFieldsControl pfcBackScaleMid; - private CodeImp.DoomBuilder.GZBuilder.Controls.PairedFieldsControl pfcBackScaleTop; - private CodeImp.DoomBuilder.GZBuilder.Controls.PairedFieldsControl pfcBackOffsetBottom; - private CodeImp.DoomBuilder.GZBuilder.Controls.PairedFieldsControl pfcBackOffsetMid; - private CodeImp.DoomBuilder.GZBuilder.Controls.PairedFieldsControl pfcBackOffsetTop; - private System.Windows.Forms.TabPage tabBackFlags; - private System.Windows.Forms.GroupBox settingsGroup; - private System.Windows.Forms.ComboBox renderStyle; - private CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox lockNumber; - private System.Windows.Forms.Label labelLightFront; - private System.Windows.Forms.CheckBox cbLightAbsoluteBack; - private System.Windows.Forms.Label labelLightBack; - private CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox lightBack; - private CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox alpha; private CodeImp.DoomBuilder.GZBuilder.Controls.PairedIntControl frontTextureOffset; private CodeImp.DoomBuilder.GZBuilder.Controls.PairedIntControl backTextureOffset; - private CodeImp.DoomBuilder.Controls.CheckboxArrayControl flagsFront; - private CodeImp.DoomBuilder.Controls.CheckboxArrayControl flagsBack; private System.Windows.Forms.ComboBox scriptNumbers; + private System.Windows.Forms.Panel panel1; } } \ No newline at end of file diff --git a/Source/Core/Windows/LinedefEditForm.cs b/Source/Core/Windows/LinedefEditForm.cs index 9791c89e..a0c59814 100644 --- a/Source/Core/Windows/LinedefEditForm.cs +++ b/Source/Core/Windows/LinedefEditForm.cs @@ -25,8 +25,6 @@ using CodeImp.DoomBuilder.Map; using CodeImp.DoomBuilder.Config; using CodeImp.DoomBuilder.GZBuilder.Data; //mxd using CodeImp.DoomBuilder.Types; -using CodeImp.DoomBuilder.GZBuilder.Tools; -using CodeImp.DoomBuilder.GZBuilder.Controls; //mxd #endregion @@ -50,97 +48,39 @@ namespace CodeImp.DoomBuilder.Windows private ICollection lines; private List linedefProps; //mxd private bool preventchanges; - private string arg0str; //mxd - private bool haveArg0Str; //mxd - private readonly string[] renderstyles; //mxd - - //mxd. Persistent settings - private static bool linkFrontTopScale; - private static bool linkFrontMidScale; - private static bool linkFrontBottomScale; - private static bool linkBackTopScale; - private static bool linkBackMidScale; - private static bool linkBackBottomScale; - - private readonly List frontUdmfControls; //mxd - private readonly List backUdmfControls; //mxd //mxd. Window setup stuff private static Point location = Point.Empty; - private static int activeTab; - private static int activeFrontTab; - private static int activeBackTab; private struct LinedefProperties //mxd { public readonly Dictionary Flags; - public readonly float Alpha; - public readonly SidedefProperties Front; public readonly SidedefProperties Back; - public LinedefProperties(Linedef line) { + public LinedefProperties(Linedef line) + { Front = (line.Front != null ? new SidedefProperties(line.Front) : null); Back = (line.Back != null ? new SidedefProperties(line.Back) : null); - Alpha = UDMFTools.GetFloat(line.Fields, "alpha", 1.0f); Flags = line.GetFlags(); } } private class SidedefProperties //mxd { - public readonly Dictionary Flags; - - public readonly float ScaleTopX; - public readonly float ScaleTopY; - public readonly float ScaleMidX; - public readonly float ScaleMidY; - public readonly float ScaleBottomX; - public readonly float ScaleBottomY; - public readonly int OffsetX; public readonly int OffsetY; - public readonly float OffsetTopX; - public readonly float OffsetTopY; - public readonly float OffsetMidX; - public readonly float OffsetMidY; - public readonly float OffsetBottomX; - public readonly float OffsetBottomY; - - public readonly int Brightness; - public readonly bool AbsoluteBrightness; - public readonly string TextureTop; public readonly string TextureMid; public readonly string TextureLow; - public SidedefProperties(Sidedef side) { - Flags = side.GetFlags(); - + public SidedefProperties(Sidedef side) + { //offset OffsetX = side.OffsetX; OffsetY = side.OffsetY; - Brightness = UDMFTools.GetInteger(side.Fields, "light", 0); - AbsoluteBrightness = side.Fields.GetValue("lightabsolute", false); - - //scales - ScaleTopX = UDMFTools.GetFloat(side.Fields, "scalex_top", 1.0f); - ScaleTopY = UDMFTools.GetFloat(side.Fields, "scaley_top", 1.0f); - ScaleMidX = UDMFTools.GetFloat(side.Fields, "scalex_mid", 1.0f); - ScaleMidY = UDMFTools.GetFloat(side.Fields, "scaley_mid", 1.0f); - ScaleBottomX = UDMFTools.GetFloat(side.Fields, "scalex_bottom", 1.0f); - ScaleBottomY = UDMFTools.GetFloat(side.Fields, "scaley_bottom", 1.0f); - - //offsets - OffsetTopX = UDMFTools.GetFloat(side.Fields, "offsetx_top", 0f); - OffsetTopY = UDMFTools.GetFloat(side.Fields, "offsety_top", 0f); - OffsetMidX = UDMFTools.GetFloat(side.Fields, "offsetx_mid", 0f); - OffsetMidY = UDMFTools.GetFloat(side.Fields, "offsety_mid", 0f); - OffsetBottomX = UDMFTools.GetFloat(side.Fields, "offsetx_bottom", 0f); - OffsetBottomY = UDMFTools.GetFloat(side.Fields, "offsety_bottom", 0f); - //textures TextureTop = side.HighTexture; TextureMid = side.MiddleTexture; @@ -158,35 +98,22 @@ namespace CodeImp.DoomBuilder.Windows InitializeComponent(); //mxd. Widow setup - if(location != Point.Empty) { + if(location != Point.Empty) + { this.StartPosition = FormStartPosition.Manual; this.Location = location; - if (activeTab > 0 && activeTab < tabs.TabCount) { - tabs.SelectTab(activeTab); - } else { - activeTab = 0; - } - if(activeFrontTab > 0) udmfPropertiesFront.SelectTab(activeFrontTab); - if(activeBackTab > 0) udmfPropertiesBack.SelectTab(activeBackTab); } // Fill flags lists foreach(KeyValuePair lf in General.Map.Config.LinedefFlags) flags.Add(lf.Value, lf.Key); - //mxd - foreach(KeyValuePair lf in General.Map.Config.SidedefFlags) { - flagsFront.Add(lf.Value, lf.Key); - flagsBack.Add(lf.Value, lf.Key); - } - // Fill actions list action.GeneralizedCategories = General.Map.Config.GenActionCategories; action.AddInfo(General.Map.Config.SortedLinedefActions.ToArray()); // Fill activations list activation.Items.AddRange(General.Map.Config.LinedefActivates.ToArray()); - foreach(LinedefActivateInfo ai in General.Map.Config.LinedefActivates) udmfactivates.Add(ai.Title, ai); // Initialize image selectors fronthigh.Initialize(); @@ -203,67 +130,9 @@ namespace CodeImp.DoomBuilder.Windows scriptNumbers.Items.Add(si); scriptNumbers.DropDownWidth = Tools.GetDropDownWidth(scriptNumbers); - - if(General.Map.FormatInterface.HasCustomFields) { //mxd - //mxd. Setup script names - scriptNames.Location = arg0.Location; - - foreach(ScriptItem nsi in General.Map.NamedScripts) - scriptNames.Items.Add(nsi); - - scriptNames.DropDownWidth = Tools.GetDropDownWidth(scriptNames); - - // Initialize custom fields editor - fieldslist.Setup("linedef"); - - // Fill universal fields list - fieldslist.ListFixedFields(General.Map.Config.LinedefFields); - - //initialize controls - frontUdmfControls = new List() { pfcFrontOffsetTop, pfcFrontOffsetMid, pfcFrontOffsetBottom, pfcFrontScaleTop, pfcFrontScaleMid, pfcFrontScaleBottom }; - backUdmfControls = new List() { pfcBackOffsetTop, pfcBackOffsetMid, pfcBackOffsetBottom, pfcBackScaleTop, pfcBackScaleMid, pfcBackScaleBottom }; - - // Store renderstyle keys? - if(General.Map.Config.LinedefRenderStyles.Count > 0) { - renderstyles = new string[General.Map.Config.LinedefRenderStyles.Count]; - General.Map.Config.LinedefRenderStyles.Keys.CopyTo(renderstyles, 0); - } else { - renderStyle.Enabled = false; - } - - // Fill renderstyles - foreach(KeyValuePair lf in General.Map.Config.LinedefRenderStyles) { - renderStyle.Items.Add(lf.Value); - } - - //Restore value linking - pfcFrontScaleTop.LinkValues = linkFrontTopScale; - pfcFrontScaleMid.LinkValues = linkFrontMidScale; - pfcFrontScaleBottom.LinkValues = linkFrontBottomScale; - pfcBackScaleTop.LinkValues = linkBackTopScale; - pfcBackScaleMid.LinkValues = linkBackMidScale; - pfcBackScaleBottom.LinkValues = linkBackBottomScale; - } else { - //Hide unused controls - tabs.TabPages.Remove(tabcustom); - - settingsGroup.Visible = false; - customfrontbutton.Visible = false; - custombackbutton.Visible = false; - labelLightFront.Visible = false; - lightFront.Visible = false; - cbLightAbsoluteFront.Visible = false; - labelLightBack.Visible = false; - lightBack.Visible = false; - cbLightAbsoluteBack.Visible = false; - udmfPropertiesFront.Visible = false; - udmfPropertiesBack.Visible = false; - } - // Mixed activations? (UDMF) - if(General.Map.FormatInterface.HasMixedActivations) - udmfpanel.Visible = true; - else if(General.Map.FormatInterface.HasPresetActivations) + // Mixed activations? + if(General.Map.FormatInterface.HasPresetActivations) hexenpanel.Visible = true; // Action arguments? @@ -271,30 +140,25 @@ namespace CodeImp.DoomBuilder.Windows argspanel.Visible = true; // Arrange panels - if(General.Map.FormatInterface.HasPresetActivations) - { - //mxd - actiongroup.Top = settingsGroup.Top; - actiongroup.Height = hexenpanel.Location.Y + hexenpanel.Height; - this.Height = heightpanel1.Height; - } else if(!General.Map.FormatInterface.HasMixedActivations && + if(!General.Map.FormatInterface.HasMixedActivations && !General.Map.FormatInterface.HasActionArgs && !General.Map.FormatInterface.HasPresetActivations) { - actiongroup.Top = settingsGroup.Top; - actiongroup.Height = action.Bottom + action.Top + (actiongroup.Width - actiongroup.ClientRectangle.Width); - this.Height = heightpanel2.Height; + actiongroup.Height = argspanel.Top + argspanel.Margin.Top; //mxd } // Tag? + int addedheight = this.ClientRectangle.Height - panel1.Height + panel1.Top + panel1.Margin.Top + panel1.Margin.Bottom; if(General.Map.FormatInterface.HasLinedefTag) { // Match position after the action group idgroup.Top = actiongroup.Bottom + actiongroup.Margin.Bottom + idgroup.Margin.Top; + this.Height = idgroup.Bottom + idgroup.Margin.Bottom * 2 + addedheight; } else { idgroup.Visible = false; + this.Height = actiongroup.Bottom + actiongroup.Margin.Bottom * 3 + addedheight; } } @@ -305,9 +169,6 @@ namespace CodeImp.DoomBuilder.Windows // This sets up the form to edit the given lines public void Setup(ICollection lines) { - LinedefActivateInfo sai; - Linedef fl; - preventchanges = true; // Keep this list @@ -325,7 +186,7 @@ namespace CodeImp.DoomBuilder.Windows //////////////////////////////////////////////////////////////////////// // Get first line - fl = General.GetByIndex(lines, 0); + Linedef fl = General.GetByIndex(lines, 0); // Flags foreach(CheckBox c in flags.Checkboxes) @@ -335,27 +196,11 @@ namespace CodeImp.DoomBuilder.Windows foreach(LinedefActivateInfo ai in activation.Items) if((fl.Activate & ai.Index) == ai.Index) activation.SelectedItem = ai; - // UDMF Activations - foreach(CheckBox c in udmfactivates.Checkboxes) - { - LinedefActivateInfo ai = (c.Tag as LinedefActivateInfo); - if(fl.Flags.ContainsKey(ai.Key)) c.Checked = fl.Flags[ai.Key]; - } - - //mxd. UDMF Settings - if(General.Map.FormatInterface.HasCustomFields) { - fieldslist.SetValues(fl.Fields, true); // Custom fields - renderStyle.SelectedIndex = Array.IndexOf(renderstyles, fl.Fields.GetValue("renderstyle", "translucent")); - alpha.Text = General.Clamp(fl.Fields.GetValue("alpha", 1.0f), 0f, 1f).ToString(); - lockNumber.Text = fl.Fields.GetValue("locknumber", 0).ToString(); - arg0str = fl.Fields.GetValue("arg0str", string.Empty); - haveArg0Str = !string.IsNullOrEmpty(arg0str); - } - // Action/tags action.Value = fl.Action; - if(General.Map.FormatInterface.HasLinedefTag) {//mxd + if(General.Map.FormatInterface.HasLinedefTag) //mxd + { tagSelector.Setup(UniversalType.LinedefTag); tagSelector.SetTag(fl.Tag); } @@ -380,21 +225,6 @@ namespace CodeImp.DoomBuilder.Windows frontmid.Required = fl.Front.MiddleRequired(); frontlow.Required = fl.Front.LowRequired(); frontsector.Text = fl.Front.Sector.Index.ToString(); - - //mxd - if(General.Map.FormatInterface.HasCustomFields) { - //front settings - foreach(PairedFieldsControl pfc in frontUdmfControls) - pfc.SetValuesFrom(fl.Front.Fields, true); - - lightFront.Text = UDMFTools.GetInteger(fl.Front.Fields, "light", 0).ToString(); - cbLightAbsoluteFront.Checked = fl.Front.Fields.GetValue("lightabsolute", false); - - //flags - foreach(CheckBox c in flagsFront.Checkboxes) - if(fl.Front.Flags.ContainsKey(c.Tag.ToString())) c.Checked = fl.Front.Flags[c.Tag.ToString()]; - } - frontTextureOffset.SetValues(fl.Front.OffsetX, fl.Front.OffsetY, true); //mxd } @@ -408,21 +238,6 @@ namespace CodeImp.DoomBuilder.Windows backmid.Required = fl.Back.MiddleRequired(); backlow.Required = fl.Back.LowRequired(); backsector.Text = fl.Back.Sector.Index.ToString(); - - //mxd - if(General.Map.FormatInterface.HasCustomFields) { - //front settings - foreach(PairedFieldsControl pfc in backUdmfControls) - pfc.SetValuesFrom(fl.Back.Fields, true); - - lightBack.Text = UDMFTools.GetInteger(fl.Back.Fields, "light", 0).ToString(); - cbLightAbsoluteBack.Checked = fl.Back.Fields.GetValue("lightabsolute", false); - - //flags - foreach(CheckBox c in flagsBack.Checkboxes) - if(fl.Back.Flags.ContainsKey(c.Tag.ToString())) c.Checked = fl.Back.Flags[c.Tag.ToString()]; - } - backTextureOffset.SetValues(fl.Back.OffsetX, fl.Back.OffsetY, true); //mxd } @@ -447,47 +262,12 @@ namespace CodeImp.DoomBuilder.Windows // Activations if(activation.Items.Count > 0) { - sai = (activation.Items[0] as LinedefActivateInfo); + LinedefActivateInfo sai = (activation.Items[0] as LinedefActivateInfo); foreach(LinedefActivateInfo ai in activation.Items) if((l.Activate & ai.Index) == ai.Index) sai = ai; if(sai != activation.SelectedItem) activation.SelectedIndex = -1; } - // UDMF Activations - foreach(CheckBox c in udmfactivates.Checkboxes) - { - if(c.CheckState == CheckState.Indeterminate) continue; //mxd - - LinedefActivateInfo ai = (c.Tag as LinedefActivateInfo); - if(l.IsFlagSet(ai.Key) != c.Checked) - { - c.ThreeState = true; - c.CheckState = CheckState.Indeterminate; - } - } - - //mxd. UDMF Settings - if(General.Map.FormatInterface.HasCustomFields) { - if(renderstyles != null) { - if(renderStyle.SelectedIndex > -1 && renderStyle.SelectedIndex != Array.IndexOf(renderstyles, l.Fields.GetValue("renderstyle", "translucent"))) - renderStyle.SelectedIndex = -1; - } - - if(!string.IsNullOrEmpty(alpha.Text) && General.Clamp(alpha.GetResultFloat(1.0f), 0f, 1f) != l.Fields.GetValue("alpha", 1.0f)) - alpha.Text = string.Empty; - - if(!string.IsNullOrEmpty(lockNumber.Text) && lockNumber.GetResult(0) != l.Fields.GetValue("locknumber", 0)) - lockNumber.Text = string.Empty; - - if(arg0str != l.Fields.GetValue("arg0str", string.Empty)) { - haveArg0Str = true; - arg0str = string.Empty; - } - - l.Fields.BeforeFieldsChange(); - fieldslist.SetValues(l.Fields, false); - } - // Action/tags if(l.Action != action.Value) action.Empty = true; if(General.Map.FormatInterface.HasLinedefTag && l.Tag != fl.Tag) tagSelector.ClearTag(); //mxd @@ -517,49 +297,26 @@ namespace CodeImp.DoomBuilder.Windows if(l.Front != null) { //mxd - if (fronthigh.TextureName != l.Front.HighTexture) { + if (fronthigh.TextureName != l.Front.HighTexture) + { if(!fronthigh.Required && l.Front.HighRequired()) fronthigh.Required = true; fronthigh.MultipleTextures = true; //mxd fronthigh.TextureName = string.Empty; } - if (frontmid.TextureName != l.Front.MiddleTexture) { + if (frontmid.TextureName != l.Front.MiddleTexture) + { if(!frontmid.Required && l.Front.MiddleRequired()) frontmid.Required = true; frontmid.MultipleTextures = true; //mxd frontmid.TextureName = string.Empty; } - if (frontlow.TextureName != l.Front.LowTexture) { + if (frontlow.TextureName != l.Front.LowTexture) + { if(!frontlow.Required && l.Front.LowRequired()) frontlow.Required = true; frontlow.MultipleTextures = true; //mxd frontlow.TextureName = string.Empty; } if(frontsector.Text != l.Front.Sector.Index.ToString()) frontsector.Text = string.Empty; - //mxd - if(General.Map.FormatInterface.HasCustomFields) { - foreach(PairedFieldsControl pfc in frontUdmfControls) - pfc.SetValuesFrom(l.Front.Fields, false); - - if(!string.IsNullOrEmpty(lightFront.Text)) { - int light = UDMFTools.GetInteger(l.Front.Fields, "light", 0); - if(light != lightFront.GetResult(light)) lightFront.Text = string.Empty; - } - - if(l.Front.Fields.GetValue("lightabsolute", false) != cbLightAbsoluteFront.Checked) { - cbLightAbsoluteFront.ThreeState = true; - cbLightAbsoluteFront.CheckState = CheckState.Indeterminate; - } - - //flags - foreach(CheckBox c in flagsFront.Checkboxes) { - if(c.CheckState == CheckState.Indeterminate) continue; - if(l.Front.IsFlagSet(c.Tag.ToString()) != c.Checked) { - c.ThreeState = true; - c.CheckState = CheckState.Indeterminate; - } - } - } - - l.Front.Fields.BeforeFieldsChange(); //mxd frontTextureOffset.SetValues(l.Front.OffsetX, l.Front.OffsetY, false); //mxd } @@ -567,49 +324,26 @@ namespace CodeImp.DoomBuilder.Windows if(l.Back != null) { //mxd - if (backhigh.TextureName != l.Back.HighTexture) { + if (backhigh.TextureName != l.Back.HighTexture) + { if(!backhigh.Required && l.Back.HighRequired()) backhigh.Required = true; backhigh.MultipleTextures = true; //mxd backhigh.TextureName = string.Empty; } - if (backmid.TextureName != l.Back.MiddleTexture) { + if (backmid.TextureName != l.Back.MiddleTexture) + { if(!backmid.Required && l.Back.MiddleRequired()) backmid.Required = true; backmid.MultipleTextures = true; //mxd backmid.TextureName = string.Empty; } - if (backlow.TextureName != l.Back.LowTexture) { + if (backlow.TextureName != l.Back.LowTexture) + { if(!backlow.Required && l.Back.LowRequired()) backlow.Required = true; backlow.MultipleTextures = true; //mxd backlow.TextureName = string.Empty; } if(backsector.Text != l.Back.Sector.Index.ToString()) backsector.Text = string.Empty; - //mxd - if(General.Map.FormatInterface.HasCustomFields) { - foreach(PairedFieldsControl pfc in backUdmfControls) - pfc.SetValuesFrom(l.Back.Fields, false); - - if(!string.IsNullOrEmpty(lightBack.Text)) { - int light = UDMFTools.GetInteger(l.Back.Fields, "light", 0); - if(light != lightBack.GetResult(light)) lightBack.Text = string.Empty; - } - - if(l.Back.Fields.GetValue("lightabsolute", false) != cbLightAbsoluteBack.Checked) { - cbLightAbsoluteBack.ThreeState = true; - cbLightAbsoluteBack.CheckState = CheckState.Indeterminate; - } - - //flags - foreach(CheckBox c in flagsBack.Checkboxes) { - if(c.CheckState == CheckState.Indeterminate) continue; - if(l.Back.IsFlagSet(c.Tag.ToString()) != c.Checked) { - c.ThreeState = true; - c.CheckState = CheckState.Indeterminate; - } - } - } - - l.Back.Fields.BeforeFieldsChange(); //mxd backTextureOffset.SetValues(l.Back.OffsetX, l.Back.OffsetY, false); //mxd } @@ -630,47 +364,41 @@ namespace CodeImp.DoomBuilder.Windows updateScriptControls(); //mxd //mxd. Set intial script-related values, if required - if(Array.IndexOf(GZBuilder.GZGeneral.ACS_SPECIALS, action.Value) != -1) { - if(haveArg0Str) { - scriptNames.Text = arg0str; - arg0label.Text = "Script Name:"; - } else { - int a0 = arg0.GetResult(0); - if(a0 > 0) { - for(int i = 0; i < General.Map.NumberedScripts.Count; i++) { - if(General.Map.NumberedScripts[i].Index == a0) { - scriptNumbers.SelectedIndex = i; - break; - } + if(Array.IndexOf(GZBuilder.GZGeneral.ACS_SPECIALS, action.Value) != -1) + { + int a0 = arg0.GetResult(0); + if(a0 > 0) + { + for(int i = 0; i < General.Map.NumberedScripts.Count; i++) + { + if(General.Map.NumberedScripts[i].Index == a0) + { + scriptNumbers.SelectedIndex = i; + break; } - - if(scriptNumbers.SelectedIndex == -1) { - scriptNumbers.Items.Add(new ScriptItem(a0, "Script " + a0)); - scriptNumbers.SelectedIndex = scriptNumbers.Items.Count - 1; - } - } else { - scriptNumbers.Text = arg0.Text; } + + if(scriptNumbers.SelectedIndex == -1) + { + scriptNumbers.Items.Add(new ScriptItem(a0, "Script " + a0)); + scriptNumbers.SelectedIndex = scriptNumbers.Items.Count - 1; + } + } + else + { + scriptNumbers.Text = arg0.Text; } - } else { + } + else + { scriptNumbers.Text = "0"; } } //mxd - private void updateScriptControls() { - if(Array.IndexOf(GZBuilder.GZGeneral.ACS_SPECIALS, action.Value) != -1) { - bool showNamedScripts = General.Map.UDMF && haveArg0Str; - cbArgStr.Visible = General.Map.UDMF; - cbArgStr.Checked = showNamedScripts; - scriptNames.Visible = showNamedScripts; - scriptNumbers.Visible = !showNamedScripts; - } else { - cbArgStr.Visible = false; - scriptNames.Visible = false; - scriptNumbers.Visible = false; - cbArgStr.Checked = false; - } + private void updateScriptControls() + { + scriptNumbers.Visible = (Array.IndexOf(GZBuilder.GZGeneral.ACS_SPECIALS, action.Value) != -1); } #endregion @@ -687,7 +415,8 @@ namespace CodeImp.DoomBuilder.Windows if(General.Map.FormatInterface.HasLinedefTag) { tagSelector.ValidateTag(); //mxd - if(((tagSelector.GetTag(0) < General.Map.FormatInterface.MinTag) || (tagSelector.GetTag(0) > General.Map.FormatInterface.MaxTag))) { + if(((tagSelector.GetTag(0) < General.Map.FormatInterface.MinTag) || (tagSelector.GetTag(0) > General.Map.FormatInterface.MaxTag))) + { General.ShowWarningMessage("Linedef tag must be between " + General.Map.FormatInterface.MinTag + " and " + General.Map.FormatInterface.MaxTag + ".", MessageBoxButtons.OK); return; } @@ -700,28 +429,8 @@ namespace CodeImp.DoomBuilder.Windows return; } - // Check if we have at least one activation flag when there's an action in UDMF map format (mxd) - // Too obnoxious... - /*if (General.Map.UDMF && action.Value != 0) - { - bool haveactivationflag = false; - foreach (CheckBox c in udmfactivates.Checkboxes) - { - if (c.CheckState != CheckState.Unchecked) - { - haveactivationflag = true; - break; - } - } - - if (!haveactivationflag && - General.ShowWarningMessage("You are setting an action without any activation flags.\nIs that OK?", MessageBoxButtons.YesNo) == DialogResult.No) - return; - }*/ - //mxd bool hasAcs = !action.Empty && Array.IndexOf(GZBuilder.GZGeneral.ACS_SPECIALS, action.Value) != -1; - int lockNum = lockNumber.GetResult(0); // Go for all the lines int tagoffset = 0; //mxd @@ -731,39 +440,30 @@ namespace CodeImp.DoomBuilder.Windows if(activation.SelectedIndex > -1) l.Activate = (activation.SelectedItem as LinedefActivateInfo).Index; - // UDMF activations - foreach(CheckBox c in udmfactivates.Checkboxes) - { - LinedefActivateInfo ai = (c.Tag as LinedefActivateInfo); - if(c.CheckState == CheckState.Checked) l.SetFlag(ai.Key, true); - else if(c.CheckState == CheckState.Unchecked) l.SetFlag(ai.Key, false); - } - // Action/tags l.Tag = General.Clamp(tagSelector.GetSmartTag(l.Tag, tagoffset++), General.Map.FormatInterface.MinTag, General.Map.FormatInterface.MaxTag); //mxd - if(!action.Empty) { + if(!action.Empty) + { l.Action = action.Value; //mxd. Script name/number handling - if(hasAcs) { - if(!cbArgStr.Checked) { //apply script number - if(!string.IsNullOrEmpty(scriptNumbers.Text)) { - if(scriptNumbers.SelectedItem != null) - l.Args[0] = ((ScriptItem)scriptNumbers.SelectedItem).Index; - else if(!int.TryParse(scriptNumbers.Text.Trim(), out l.Args[0])) - l.Args[0] = 0; - - if(l.Fields.ContainsKey("arg0str")) l.Fields.Remove("arg0str"); - } - } else { //apply arg0str - if(!string.IsNullOrEmpty(scriptNames.Text)) - l.Fields["arg0str"] = new UniValue(UniversalType.String, scriptNames.Text); + if(hasAcs) + { + if(!string.IsNullOrEmpty(scriptNumbers.Text)) + { + if(scriptNumbers.SelectedItem != null) + l.Args[0] = ((ScriptItem)scriptNumbers.SelectedItem).Index; + else if(!int.TryParse(scriptNumbers.Text.Trim(), out l.Args[0])) + l.Args[0] = 0; } - } else { + } + else + { l.Args[0] = arg0.GetResult(l.Args[0]); - if(l.Fields.ContainsKey("arg0str")) l.Fields.Remove("arg0str"); } - }else{ + } + else + { l.Args[0] = arg0.GetResult(l.Args[0]); } @@ -812,9 +512,8 @@ namespace CodeImp.DoomBuilder.Windows index = backsector.GetResult(index); if((index > -1) && (index < General.Map.Map.Sectors.Count)) { - s = General.Map.Map.GetSectorByIndex(index); - if(s == null) s = General.Map.Map.CreateSector(); - + s = General.Map.Map.GetSectorByIndex(index) ?? General.Map.Map.CreateSector(); + if(s != null) { // Create new sidedef? @@ -825,22 +524,8 @@ namespace CodeImp.DoomBuilder.Windows } } } - - //mxd. UDMF Settings - if(General.Map.FormatInterface.HasCustomFields) { - fieldslist.Apply(l.Fields); - UDMFTools.SetInteger(l.Fields, "locknumber", lockNum, 0); - } } - //mxd. Store value linking - linkFrontTopScale = pfcFrontScaleTop.LinkValues; - linkFrontMidScale = pfcFrontScaleMid.LinkValues; - linkFrontBottomScale = pfcFrontScaleBottom.LinkValues; - linkBackTopScale = pfcBackScaleTop.LinkValues; - linkBackMidScale = pfcBackScaleMid.LinkValues; - linkBackBottomScale = pfcBackScaleBottom.LinkValues; - // Update the used textures General.Map.Data.UpdateUsedTextures(); @@ -897,11 +582,11 @@ namespace CodeImp.DoomBuilder.Windows arg2label.Enabled = General.Map.Config.LinedefActions[showaction].Args[2].Used; arg3label.Enabled = General.Map.Config.LinedefActions[showaction].Args[3].Used; arg4label.Enabled = General.Map.Config.LinedefActions[showaction].Args[4].Used; - if(arg0label.Enabled) arg0.ForeColor = SystemColors.WindowText; else arg0.ForeColor = SystemColors.GrayText; - if(arg1label.Enabled) arg1.ForeColor = SystemColors.WindowText; else arg1.ForeColor = SystemColors.GrayText; - if(arg2label.Enabled) arg2.ForeColor = SystemColors.WindowText; else arg2.ForeColor = SystemColors.GrayText; - if(arg3label.Enabled) arg3.ForeColor = SystemColors.WindowText; else arg3.ForeColor = SystemColors.GrayText; - if(arg4label.Enabled) arg4.ForeColor = SystemColors.WindowText; else arg4.ForeColor = SystemColors.GrayText; + arg0.ForeColor = (arg0label.Enabled ? SystemColors.WindowText : SystemColors.GrayText); + arg1.ForeColor = (arg1label.Enabled ? SystemColors.WindowText : SystemColors.GrayText); + arg2.ForeColor = (arg2label.Enabled ? SystemColors.WindowText : SystemColors.GrayText); + arg3.ForeColor = (arg3label.Enabled ? SystemColors.WindowText : SystemColors.GrayText); + arg4.ForeColor = (arg4label.Enabled ? SystemColors.WindowText : SystemColors.GrayText); arg0.Setup(General.Map.Config.LinedefActions[showaction].Args[0]); arg1.Setup(General.Map.Config.LinedefActions[showaction].Args[1]); arg2.Setup(General.Map.Config.LinedefActions[showaction].Args[2]); @@ -909,14 +594,18 @@ namespace CodeImp.DoomBuilder.Windows arg4.Setup(General.Map.Config.LinedefActions[showaction].Args[4]); // mxd. Apply action's default arguments - if(!preventchanges) { - if(showaction != 0 && General.Map.Config.LinedefActions.ContainsKey(showaction)) { + if(!preventchanges) + { + if(showaction != 0 && General.Map.Config.LinedefActions.ContainsKey(showaction)) + { arg0.SetDefaultValue(); arg1.SetDefaultValue(); arg2.SetDefaultValue(); arg3.SetDefaultValue(); arg4.SetDefaultValue(); - } else { //or set them to 0 + } + else //or set them to 0 + { arg0.SetValue(0); arg1.SetValue(0); arg2.SetValue(0); @@ -934,25 +623,10 @@ namespace CodeImp.DoomBuilder.Windows action.Value = ActionBrowserForm.BrowseAction(this, action.Value); } - //mxd - private void cbArgStr_CheckedChanged(object sender, EventArgs e) { - if(!cbArgStr.Visible) return; - scriptNames.Visible = cbArgStr.Checked; - scriptNumbers.Visible = !cbArgStr.Checked; - arg0label.Text = cbArgStr.Checked ? "Script Name:" : "Script Number:"; - } - - //mxd - private void tabcustom_MouseEnter(object sender, EventArgs e) { - fieldslist.Focus(); - } - //mxd. Store window location - private void LinedefEditForm_FormClosing(object sender, FormClosingEventArgs e) { + private void LinedefEditForm_FormClosing(object sender, FormClosingEventArgs e) + { location = this.Location; - activeTab = tabs.SelectedIndex; - activeFrontTab = udmfPropertiesFront.SelectedIndex; - activeBackTab = udmfPropertiesBack.SelectedIndex; } // Help! @@ -964,46 +638,17 @@ namespace CodeImp.DoomBuilder.Windows #endregion - #region ================== mxd. Realtime events (linedef) - - private void cbRenderStyle_SelectedIndexChanged(object sender, EventArgs e) { - if(preventchanges) return; - - //update values - foreach(Linedef l in lines) - UDMFTools.SetString(l.Fields, "renderstyle", renderstyles[renderStyle.SelectedIndex], "translucent"); - - General.Map.IsChanged = true; - if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty); - } - - private void alpha_WhenTextChanged(object sender, EventArgs e) { - if(preventchanges) return; - int i = 0; - - //restore values - if(string.IsNullOrEmpty(alpha.Text)) { - foreach(Linedef l in lines) - UDMFTools.SetFloat(l.Fields, "alpha", linedefProps[i++].Alpha, 1.0f); - //update values - } else { - foreach(Linedef l in lines) { - float value = General.Clamp(alpha.GetResultFloat(l.Fields.GetValue("alpha", 1.0f)), 0f, 1.0f); - UDMFTools.SetFloat(l.Fields, "alpha", value, 1.0f); - } - } - - General.Map.IsChanged = true; - if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty); - } + #region ================== Linedef realtime events (mxd) private void flags_OnValueChanged(object sender, EventArgs e) { if(preventchanges) return; int i = 0; - foreach(Linedef l in lines) { + foreach(Linedef l in lines) + { // Apply all flags - foreach(CheckBox c in flags.Checkboxes) { + foreach(CheckBox c in flags.Checkboxes) + { if(c.CheckState == CheckState.Checked) l.SetFlag(c.Tag.ToString(), true); else if(c.CheckState == CheckState.Unchecked) @@ -1023,138 +668,26 @@ namespace CodeImp.DoomBuilder.Windows #endregion - #region Reltime events (sides) + #region ================== Sidedef reltime events (mxd) - #region Custom fields changed - - // Custom fields on front sides - private void customfrontbutton_Click(object sender, EventArgs e) { - // Make collection of front sides - List sides = new List(lines.Count); - foreach(Linedef l in lines) if(l.Front != null) sides.Add(l.Front); - - if(!CustomFieldsForm.ShowDialog(this, "Front side custom fields", "sidedef", sides, General.Map.Config.SidedefFields)) return; - - //Apply values - Sidedef fs = General.GetByIndex(sides, 0) as Sidedef; - - //..to the first side - foreach(PairedFieldsControl pfc in frontUdmfControls) - pfc.SetValuesFrom(fs.Fields, true); - - lightFront.Text = UDMFTools.GetInteger(fs.Fields, "light", 0).ToString(); - cbLightAbsoluteFront.ThreeState = false; - cbLightAbsoluteFront.Checked = fs.Fields.GetValue("lightabsolute", false); - - //flags - foreach(CheckBox c in flagsFront.Checkboxes) - if(fs.Flags.ContainsKey(c.Tag.ToString())) c.Checked = fs.Flags[c.Tag.ToString()]; - - //..then to all of them - foreach(Sidedef s in sides){ - foreach(PairedFieldsControl pfc in frontUdmfControls) - pfc.SetValuesFrom(s.Fields, false); - - if(!string.IsNullOrEmpty(lightFront.Text)) { - int light = UDMFTools.GetInteger(s.Fields, "light", 0); - if(light != lightFront.GetResult(light)) lightFront.Text = string.Empty; - } - - if(s.Fields.GetValue("lightabsolute", false) != cbLightAbsoluteFront.Checked) { - cbLightAbsoluteFront.ThreeState = true; - cbLightAbsoluteFront.CheckState = CheckState.Indeterminate; - } - - //flags - foreach(CheckBox c in flagsFront.Checkboxes) { - if(c.CheckState == CheckState.Indeterminate) continue; - - if(s.Flags.ContainsKey(c.Tag.ToString())) { - if(s.Flags[c.Tag.ToString()] != c.Checked) { - c.ThreeState = true; - c.CheckState = CheckState.Indeterminate; - } - } - } - } - - General.Map.IsChanged = true; - if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty); - } - - // Custom fields on back sides - private void custombackbutton_Click(object sender, EventArgs e) { - // Make collection of back sides - List sides = new List(lines.Count); - foreach(Linedef l in lines) if(l.Back != null) sides.Add(l.Back); - - // Edit these - if(!CustomFieldsForm.ShowDialog(this, "Back side custom fields", "sidedef", sides, General.Map.Config.SidedefFields)) return; - - //Apply values - Sidedef fs = General.GetByIndex(sides, 0) as Sidedef; - - //..to the first side - foreach(PairedFieldsControl pfc in backUdmfControls) - pfc.SetValuesFrom(fs.Fields, true); - - lightBack.Text = UDMFTools.GetInteger(fs.Fields, "light", 0).ToString(); - cbLightAbsoluteBack.ThreeState = false; - cbLightAbsoluteBack.Checked = fs.Fields.GetValue("lightabsolute", false); - - //flags - foreach(CheckBox c in flagsBack.Checkboxes) - if(fs.Flags.ContainsKey(c.Tag.ToString())) c.Checked = fs.Flags[c.Tag.ToString()]; - - //..then to all of them - foreach(Sidedef s in sides) { - foreach(PairedFieldsControl pfc in backUdmfControls) - pfc.SetValuesFrom(s.Fields, false); - - if(!string.IsNullOrEmpty(lightBack.Text)) { - int light = UDMFTools.GetInteger(s.Fields, "light", 0); - if(light != lightBack.GetResult(light)) lightBack.Text = string.Empty; - } - - if(s.Fields.GetValue("lightabsolute", false) != cbLightAbsoluteBack.Checked) { - cbLightAbsoluteBack.ThreeState = true; - cbLightAbsoluteBack.CheckState = CheckState.Indeterminate; - } - - //flags - foreach(CheckBox c in flagsBack.Checkboxes) { - if(c.CheckState == CheckState.Indeterminate) continue; - - if(s.Flags.ContainsKey(c.Tag.ToString())) { - if(s.Flags[c.Tag.ToString()] != c.Checked) { - c.ThreeState = true; - c.CheckState = CheckState.Indeterminate; - } - } - } - } - - General.Map.IsChanged = true; - if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty); - } - - #endregion - - #region Texture changed - - private void fronthigh_OnValueChanged(object sender, EventArgs e) { + private void fronthigh_OnValueChanged(object sender, EventArgs e) + { if(preventchanges) return; //restore values - if(string.IsNullOrEmpty(fronthigh.TextureName)) { + if(string.IsNullOrEmpty(fronthigh.TextureName)) + { int i = 0; - foreach(Linedef l in lines) { + foreach(Linedef l in lines) + { if(l.Front != null) l.Front.SetTextureHigh(linedefProps[i].Front != null ? linedefProps[i].Front.TextureTop : "-"); i++; } - //update values - } else { + + } + else //update values + { foreach(Linedef l in lines) if(l.Front != null) l.Front.SetTextureHigh(fronthigh.GetResult(l.Front.HighTexture)); } @@ -1166,19 +699,24 @@ namespace CodeImp.DoomBuilder.Windows if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty); } - private void frontmid_OnValueChanged(object sender, EventArgs e) { + private void frontmid_OnValueChanged(object sender, EventArgs e) + { if(preventchanges) return; //restore values - if(string.IsNullOrEmpty(frontmid.TextureName)) { + if(string.IsNullOrEmpty(frontmid.TextureName)) + { int i = 0; - foreach(Linedef l in lines) { + foreach(Linedef l in lines) + { if(l.Front != null) l.Front.SetTextureMid(linedefProps[i].Front != null ? linedefProps[i].Front.TextureMid : "-"); i++; } - //update values - } else { + + } + else //update values + { foreach(Linedef l in lines) if(l.Front != null) l.Front.SetTextureMid(frontmid.GetResult(l.Front.MiddleTexture)); } @@ -1190,19 +728,24 @@ namespace CodeImp.DoomBuilder.Windows if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty); } - private void frontlow_OnValueChanged(object sender, EventArgs e) { + private void frontlow_OnValueChanged(object sender, EventArgs e) + { if(preventchanges) return; //restore values - if(string.IsNullOrEmpty(frontlow.TextureName)) { + if(string.IsNullOrEmpty(frontlow.TextureName)) + { int i = 0; - foreach(Linedef l in lines) { + foreach(Linedef l in lines) + { if(l.Front != null) l.Front.SetTextureLow(linedefProps[i].Front != null ? linedefProps[i].Front.TextureLow : "-"); i++; } - //update values - } else { + + } + else //update values + { foreach(Linedef l in lines) if(l.Front != null) l.Front.SetTextureLow(frontlow.GetResult(l.Front.LowTexture)); } @@ -1214,19 +757,24 @@ namespace CodeImp.DoomBuilder.Windows if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty); } - private void backhigh_OnValueChanged(object sender, EventArgs e) { + private void backhigh_OnValueChanged(object sender, EventArgs e) + { if(preventchanges) return; //restore values - if(string.IsNullOrEmpty(backhigh.TextureName)) { + if(string.IsNullOrEmpty(backhigh.TextureName)) + { int i = 0; - foreach(Linedef l in lines) { + foreach(Linedef l in lines) + { if(l.Back != null) l.Back.SetTextureHigh(linedefProps[i].Back != null ? linedefProps[i].Back.TextureTop : "-"); i++; } - //update values - } else { + + } + else //update values + { foreach(Linedef l in lines) if(l.Back != null) l.Back.SetTextureHigh(backhigh.GetResult(l.Back.HighTexture)); } @@ -1238,19 +786,24 @@ namespace CodeImp.DoomBuilder.Windows if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty); } - private void backmid_OnValueChanged(object sender, EventArgs e) { + private void backmid_OnValueChanged(object sender, EventArgs e) + { if(preventchanges) return; //restore values - if(string.IsNullOrEmpty(backmid.TextureName)) { + if(string.IsNullOrEmpty(backmid.TextureName)) + { int i = 0; - foreach(Linedef l in lines) { + foreach(Linedef l in lines) + { if(l.Back != null) l.Back.SetTextureMid(linedefProps[i].Back != null ? linedefProps[i].Back.TextureMid : "-"); i++; } - //update values - } else { + + } + else //update values + { foreach(Linedef l in lines) if(l.Back != null) l.Back.SetTextureMid(backmid.GetResult(l.Back.MiddleTexture)); } @@ -1262,19 +815,24 @@ namespace CodeImp.DoomBuilder.Windows if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty); } - private void backlow_OnValueChanged(object sender, EventArgs e) { + private void backlow_OnValueChanged(object sender, EventArgs e) + { if(preventchanges) return; //restore values - if(string.IsNullOrEmpty(backlow.TextureName)) { + if(string.IsNullOrEmpty(backlow.TextureName)) + { int i = 0; - foreach(Linedef l in lines) { + foreach(Linedef l in lines) + { if(l.Back != null) l.Back.SetTextureLow(linedefProps[i].Back != null ? linedefProps[i].Back.TextureLow : "-"); i++; } - //update values - } else { + + } + else //update values + { foreach(Linedef l in lines) if(l.Back != null) l.Back.SetTextureLow(backlow.GetResult(l.Back.LowTexture)); } @@ -1286,155 +844,23 @@ namespace CodeImp.DoomBuilder.Windows if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty); } - #endregion - - #region Brightness changed - - private void lightFront_WhenTextChanged(object sender, EventArgs e) { - if(preventchanges) return; - int i = 0; - - //restore values - if(string.IsNullOrEmpty(lightFront.Text)) { - foreach(Linedef l in lines) { - if(l.Front != null) - UDMFTools.SetInteger(l.Front.Fields, "light", (linedefProps[i].Front != null ? linedefProps[i].Front.Brightness : 0), 0); - i++; - } - //update values - } else { - foreach(Linedef l in lines) { - if(l.Front != null) { - bool absolute = false; - if(cbLightAbsoluteFront.CheckState == CheckState.Indeterminate) { - absolute = l.Front.Fields.GetValue("lightabsolute", false); - } else if(cbLightAbsoluteFront.CheckState == CheckState.Checked) { - absolute = true; - } - - int value = General.Clamp(lightFront.GetResult((linedefProps[i].Front != null ? linedefProps[i].Front.Brightness : 0)), (absolute ? 0 : -255), 255); - UDMFTools.SetInteger(l.Front.Fields, "light", value, 0); - } - i++; - } - } - - General.Map.IsChanged = true; - if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty); - } - - private void lightBack_WhenTextChanged(object sender, EventArgs e) { - if(preventchanges) return; - int i = 0; - - //restore values - if(string.IsNullOrEmpty(lightBack.Text)) { - foreach(Linedef l in lines) { - if(l.Back != null) - UDMFTools.SetInteger(l.Back.Fields, "light", (linedefProps[i].Back != null ? linedefProps[i].Back.Brightness : 0), 0); - i++; - } - //update values - } else { - foreach(Linedef l in lines) { - if(l.Back != null) { - bool absolute = false; - if(cbLightAbsoluteBack.CheckState == CheckState.Indeterminate) { - absolute = l.Back.Fields.GetValue("lightabsolute", false); - } else if(cbLightAbsoluteBack.CheckState == CheckState.Checked) { - absolute = true; - } - - int value = General.Clamp(lightBack.GetResult((linedefProps[i].Back != null ? linedefProps[i].Back.Brightness : 0)), (absolute ? 0 : -255), 255); - UDMFTools.SetInteger(l.Back.Fields, "light", value, 0); - } - i++; - } - } - - General.Map.IsChanged = true; - if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty); - } - - private void cbLightAbsoluteFront_CheckedChanged(object sender, EventArgs e) { - if(preventchanges) return; - - if(cbLightAbsoluteFront.Checked) { - foreach(Linedef l in lines) { - if(l.Front == null) continue; - l.Front.Fields["lightabsolute"] = new UniValue(UniversalType.Boolean, true); - } - } else if(cbLightAbsoluteFront.CheckState == CheckState.Indeterminate) { - int i = 0; - - foreach(Linedef l in lines) { - if(l.Front != null) { - if(linedefProps[i].Front != null && linedefProps[i].Front.AbsoluteBrightness) { - l.Front.Fields["lightabsolute"] = new UniValue(UniversalType.Boolean, true); - } else if(l.Front.Fields.ContainsKey("lightabsolute")) { - l.Front.Fields.Remove("lightabsolute"); - } - } - i++; - } - } else { - foreach(Linedef l in lines) { - if(l.Front == null) continue; - if(l.Front.Fields.ContainsKey("lightabsolute")) l.Front.Fields.Remove("lightabsolute"); - } - } - - General.Map.IsChanged = true; - if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty); - } - - private void cbLightAbsoluteBack_CheckedChanged(object sender, EventArgs e) { - if(preventchanges) return; - - if(cbLightAbsoluteBack.Checked) { - foreach(Linedef l in lines) { - if(l.Back == null) continue; - l.Back.Fields["lightabsolute"] = new UniValue(UniversalType.Boolean, true); - } - } else if(cbLightAbsoluteBack.CheckState == CheckState.Indeterminate) { - int i = 0; - - foreach(Linedef l in lines) { - if(l.Back != null) { - if(linedefProps[i].Back != null && linedefProps[i].Back.AbsoluteBrightness) { - l.Back.Fields["lightabsolute"] = new UniValue(UniversalType.Boolean, true); - } else if(l.Back.Fields.ContainsKey("lightabsolute")) { - l.Back.Fields.Remove("lightabsolute"); - } - } - i++; - } - } else { - foreach(Linedef l in lines) { - if(l.Back == null) continue; - if(l.Back.Fields.ContainsKey("lightabsolute")) l.Back.Fields.Remove("lightabsolute"); - } - } - - General.Map.IsChanged = true; - if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty); - } - - #endregion - - #region Global texture offsets changed - - private void frontTextureOffset_OnValuesChanged(object sender, EventArgs e) { + private void frontTextureOffset_OnValuesChanged(object sender, EventArgs e) + { if(preventchanges) return; int i = 0; - foreach(Linedef l in lines) { - if(l.Front != null) { - if(linedefProps[i].Front != null) { + foreach(Linedef l in lines) + { + if(l.Front != null) + { + if(linedefProps[i].Front != null) + { l.Front.OffsetX = frontTextureOffset.GetValue1(linedefProps[i].Front.OffsetX); l.Front.OffsetY = frontTextureOffset.GetValue2(linedefProps[i].Front.OffsetY); - } else { + } + else + { l.Front.OffsetX = frontTextureOffset.GetValue1(0); l.Front.OffsetY = frontTextureOffset.GetValue2(0); } @@ -1447,17 +873,23 @@ namespace CodeImp.DoomBuilder.Windows if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty); } - private void backTextureOffset_OnValuesChanged(object sender, EventArgs e) { + private void backTextureOffset_OnValuesChanged(object sender, EventArgs e) + { if(preventchanges) return; int i = 0; - foreach(Linedef l in lines) { - if(l.Back != null) { - if(linedefProps[i].Back != null) { + foreach(Linedef l in lines) + { + if(l.Back != null) + { + if(linedefProps[i].Back != null) + { l.Back.OffsetX = backTextureOffset.GetValue1(linedefProps[i].Back.OffsetX); l.Back.OffsetY = backTextureOffset.GetValue2(linedefProps[i].Back.OffsetY); - } else { + } + else + { l.Back.OffsetX = backTextureOffset.GetValue1(0); l.Back.OffsetY = backTextureOffset.GetValue2(0); } @@ -1470,287 +902,6 @@ namespace CodeImp.DoomBuilder.Windows if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty); } - #endregion - - #region Texture offsets changed - - private void pfcFrontOffsetTop_OnValuesChanged(object sender, EventArgs e) { - if(preventchanges) return; - int i = 0; - - foreach(Linedef l in lines) { - if(l.Front != null) { - float oldX = linedefProps[i].Front != null ? linedefProps[i].Front.OffsetTopX : 0f; - float oldY = linedefProps[i].Front != null ? linedefProps[i].Front.OffsetTopY : 0f; - pfcFrontOffsetTop.ApplyTo(l.Front.Fields, General.Map.FormatInterface.MinTextureOffset, General.Map.FormatInterface.MaxTextureOffset, oldX, oldY); - } - i++; - } - - General.Map.IsChanged = true; - if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty); - } - - private void pfcFrontOffsetMid_OnValuesChanged(object sender, EventArgs e) { - if(preventchanges) return; - int i = 0; - - foreach(Linedef l in lines) { - if(l.Front != null) { - float oldX = linedefProps[i].Front != null ? linedefProps[i].Front.OffsetMidX : 0f; - float oldY = linedefProps[i].Front != null ? linedefProps[i].Front.OffsetMidY : 0f; - pfcFrontOffsetMid.ApplyTo(l.Front.Fields, General.Map.FormatInterface.MinTextureOffset, General.Map.FormatInterface.MaxTextureOffset, oldX, oldY); - } - - i++; - } - - General.Map.IsChanged = true; - if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty); - } - - private void pfcFrontOffsetBottom_OnValuesChanged(object sender, EventArgs e) { - if(preventchanges) return; - int i = 0; - - foreach(Linedef l in lines) { - if(l.Front != null) { - float oldX = linedefProps[i].Front != null ? linedefProps[i].Front.OffsetBottomX : 0f; - float oldY = linedefProps[i].Front != null ? linedefProps[i].Front.OffsetBottomY : 0f; - pfcFrontOffsetBottom.ApplyTo(l.Front.Fields, General.Map.FormatInterface.MinTextureOffset, General.Map.FormatInterface.MaxTextureOffset, oldX, oldY); - } - - i++; - } - - General.Map.IsChanged = true; - if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty); - } - - private void pfcBackOffsetTop_OnValuesChanged(object sender, EventArgs e) { - if(preventchanges) return; - int i = 0; - - foreach(Linedef l in lines) { - if(l.Back != null) { - float oldX = linedefProps[i].Back != null ? linedefProps[i].Back.OffsetTopX : 0f; - float oldY = linedefProps[i].Back != null ? linedefProps[i].Back.OffsetTopY : 0f; - pfcBackOffsetTop.ApplyTo(l.Back.Fields, General.Map.FormatInterface.MinTextureOffset, General.Map.FormatInterface.MaxTextureOffset, oldX, oldY); - } - - i++; - } - - General.Map.IsChanged = true; - if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty); - } - - private void pfcBackOffsetMid_OnValuesChanged(object sender, EventArgs e) { - if(preventchanges) return; - int i = 0; - - foreach(Linedef l in lines) { - if(l.Back != null) { - float oldX = linedefProps[i].Back != null ? linedefProps[i].Back.OffsetMidX : 0f; - float oldY = linedefProps[i].Back != null ? linedefProps[i].Back.OffsetMidY : 0f; - pfcBackOffsetMid.ApplyTo(l.Back.Fields, General.Map.FormatInterface.MinTextureOffset, General.Map.FormatInterface.MaxTextureOffset, oldX, oldY); - } - - i++; - } - - General.Map.IsChanged = true; - if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty); - } - - private void pfcBackOffsetBottom_OnValuesChanged(object sender, EventArgs e) { - if(preventchanges) return; - int i = 0; - - foreach(Linedef l in lines) { - if(l.Back != null) { - float oldX = linedefProps[i].Back != null ? linedefProps[i].Back.OffsetBottomX : 0f; - float oldY = linedefProps[i].Back != null ? linedefProps[i].Back.OffsetBottomY : 0f; - pfcBackOffsetBottom.ApplyTo(l.Back.Fields, General.Map.FormatInterface.MinTextureOffset, General.Map.FormatInterface.MaxTextureOffset, oldX, oldY); - } - - i++; - } - - General.Map.IsChanged = true; - if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty); - } - - #endregion - - #region Scale changed - - private void pfcFrontScaleTop_OnValuesChanged(object sender, EventArgs e) { - if(preventchanges) return; - int i = 0; - - foreach(Linedef l in lines) { - if(l.Front != null) { - float oldX = linedefProps[i].Front != null ? linedefProps[i].Front.ScaleTopX : 1.0f; - float oldY = linedefProps[i].Front != null ? linedefProps[i].Front.ScaleTopY : 1.0f; - pfcFrontScaleTop.ApplyTo(l.Front.Fields, General.Map.FormatInterface.MinTextureOffset, General.Map.FormatInterface.MaxTextureOffset, oldX, oldY); - } - - i++; - } - - General.Map.IsChanged = true; - if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty); - } - - private void pfcFrontScaleMid_OnValuesChanged(object sender, EventArgs e) { - if(preventchanges) return; - int i = 0; - - foreach(Linedef l in lines) { - if(l.Front != null) { - float oldX = linedefProps[i].Front != null ? linedefProps[i].Front.ScaleMidX : 1.0f; - float oldY = linedefProps[i].Front != null ? linedefProps[i].Front.ScaleMidY : 1.0f; - pfcFrontScaleMid.ApplyTo(l.Front.Fields, General.Map.FormatInterface.MinTextureOffset, General.Map.FormatInterface.MaxTextureOffset, oldX, oldY); - } - - i++; - } - - General.Map.IsChanged = true; - if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty); - } - - private void pfcFrontScaleBottom_OnValuesChanged(object sender, EventArgs e) { - if(preventchanges) return; - int i = 0; - - foreach(Linedef l in lines) { - if(l.Front != null) { - float oldX = linedefProps[i].Front != null ? linedefProps[i].Front.ScaleBottomX : 1.0f; - float oldY = linedefProps[i].Front != null ? linedefProps[i].Front.ScaleBottomY : 1.0f; - pfcFrontScaleBottom.ApplyTo(l.Front.Fields, General.Map.FormatInterface.MinTextureOffset, General.Map.FormatInterface.MaxTextureOffset, oldX, oldY); - } - - i++; - } - - General.Map.IsChanged = true; - if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty); - } - - private void pfcBackScaleTop_OnValuesChanged(object sender, EventArgs e) { - if(preventchanges) return; - int i = 0; - - foreach(Linedef l in lines) { - if(l.Back != null) { - float oldX = linedefProps[i].Back != null ? linedefProps[i].Back.ScaleTopX : 1.0f; - float oldY = linedefProps[i].Back != null ? linedefProps[i].Back.ScaleTopY : 1.0f; - pfcBackScaleTop.ApplyTo(l.Back.Fields, General.Map.FormatInterface.MinTextureOffset, General.Map.FormatInterface.MaxTextureOffset, oldX, oldY); - } - - i++; - } - - General.Map.IsChanged = true; - if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty); - } - - private void pfcBackScaleMid_OnValuesChanged(object sender, EventArgs e) { - if(preventchanges) return; - int i = 0; - - foreach(Linedef l in lines) { - if(l.Back != null) { - float oldX = linedefProps[i].Back != null ? linedefProps[i].Back.ScaleMidX : 1.0f; - float oldY = linedefProps[i].Back != null ? linedefProps[i].Back.ScaleMidY : 1.0f; - pfcBackScaleMid.ApplyTo(l.Back.Fields, General.Map.FormatInterface.MinTextureOffset, General.Map.FormatInterface.MaxTextureOffset, oldX, oldY); - } - - i++; - } - - General.Map.IsChanged = true; - if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty); - } - - private void pfcBackScaleBottom_OnValuesChanged(object sender, EventArgs e) { - if(preventchanges) return; - int i = 0; - - foreach(Linedef l in lines) { - if(l.Back != null) { - float oldX = linedefProps[i].Back != null ? linedefProps[i].Back.ScaleBottomX : 1.0f; - float oldY = linedefProps[i].Back != null ? linedefProps[i].Back.ScaleBottomY : 1.0f; - pfcBackScaleBottom.ApplyTo(l.Back.Fields, General.Map.FormatInterface.MinTextureOffset, General.Map.FormatInterface.MaxTextureOffset, oldX, oldY); - } - - i++; - } - - General.Map.IsChanged = true; - if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty); - } - - #endregion - - #region Flags cahnged - - private void flagsFront_OnValueChanged(object sender, EventArgs e) { - if(preventchanges) return; - int i = 0; - - foreach(Linedef l in lines) { - if(l.Front == null) continue; - - // Apply all flags - foreach(CheckBox c in flagsFront.Checkboxes) { - if(c.CheckState == CheckState.Checked) - l.Front.SetFlag(c.Tag.ToString(), true); - else if(c.CheckState == CheckState.Unchecked) - l.Front.SetFlag(c.Tag.ToString(), false); - else if(linedefProps[i].Front.Flags.ContainsKey(c.Tag.ToString())) - l.Front.SetFlag(c.Tag.ToString(), linedefProps[i].Front.Flags[c.Tag.ToString()]); - else //linedefs created in the editor have empty Flags by default - l.Front.SetFlag(c.Tag.ToString(), false); - } - - i++; - } - - General.Map.IsChanged = true; - if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty); - } - - private void flagsBack_OnValueChanged(object sender, EventArgs e) { - if(preventchanges) return; - int i = 0; - - foreach(Linedef l in lines) { - if(l.Back == null) continue; - - // Apply all flags - foreach(CheckBox c in flagsBack.Checkboxes) { - if(c.CheckState == CheckState.Checked) - l.Back.SetFlag(c.Tag.ToString(), true); - else if(c.CheckState == CheckState.Unchecked) - l.Back.SetFlag(c.Tag.ToString(), false); - else if(linedefProps[i].Back.Flags.ContainsKey(c.Tag.ToString())) - l.Back.SetFlag(c.Tag.ToString(), linedefProps[i].Back.Flags[c.Tag.ToString()]); - else //linedefs created in the editor have empty Flags by default - l.Back.SetFlag(c.Tag.ToString(), false); - } - - i++; - } - - General.Map.IsChanged = true; - if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty); - } - - #endregion - #endregion } diff --git a/Source/Core/Windows/LinedefEditForm.resx b/Source/Core/Windows/LinedefEditForm.resx index 96333b03..6741326a 100644 --- a/Source/Core/Windows/LinedefEditForm.resx +++ b/Source/Core/Windows/LinedefEditForm.resx @@ -171,36 +171,9 @@ False - - False - - - False - - - False - - - True - True - - True - - - True - - - True - - - True - - - True - True @@ -210,9 +183,6 @@ True - - True - True @@ -222,13 +192,4 @@ True - - True - - - True - - - True - \ No newline at end of file diff --git a/Source/Core/Windows/LinedefEditFormUDMF.Designer.cs b/Source/Core/Windows/LinedefEditFormUDMF.Designer.cs new file mode 100644 index 00000000..8b5927fe --- /dev/null +++ b/Source/Core/Windows/LinedefEditFormUDMF.Designer.cs @@ -0,0 +1,1460 @@ +namespace CodeImp.DoomBuilder.Windows +{ + partial class LinedefEditFormUDMF + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if(disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + System.Windows.Forms.Label label2; + System.Windows.Forms.Label label3; + System.Windows.Forms.Label label4; + System.Windows.Forms.Label label5; + System.Windows.Forms.Label label8; + System.Windows.Forms.Label label9; + System.Windows.Forms.Label label10; + System.Windows.Forms.Label label11; + System.Windows.Forms.Label label12; + System.Windows.Forms.Label label7; + System.Windows.Forms.Label label14; + System.Windows.Forms.Label label6; + this.labelLightFront = new System.Windows.Forms.Label(); + this.cancel = new System.Windows.Forms.Button(); + this.apply = new System.Windows.Forms.Button(); + this.actiongroup = new System.Windows.Forms.GroupBox(); + this.argspanel = new System.Windows.Forms.Panel(); + this.scriptNumbers = new System.Windows.Forms.ComboBox(); + this.scriptNames = new System.Windows.Forms.ComboBox(); + this.arg2 = new CodeImp.DoomBuilder.Controls.ArgumentBox(); + this.arg1 = new CodeImp.DoomBuilder.Controls.ArgumentBox(); + this.arg0 = new CodeImp.DoomBuilder.Controls.ArgumentBox(); + this.arg3 = new CodeImp.DoomBuilder.Controls.ArgumentBox(); + this.arg4 = new CodeImp.DoomBuilder.Controls.ArgumentBox(); + this.arg1label = new System.Windows.Forms.Label(); + this.arg3label = new System.Windows.Forms.Label(); + this.arg2label = new System.Windows.Forms.Label(); + this.arg4label = new System.Windows.Forms.Label(); + this.cbArgStr = new System.Windows.Forms.CheckBox(); + this.arg0label = new System.Windows.Forms.Label(); + this.action = new CodeImp.DoomBuilder.Controls.ActionSelectorControl(); + this.browseaction = new System.Windows.Forms.Button(); + this.udmfactivates = new CodeImp.DoomBuilder.Controls.CheckboxArrayControl(); + this.flagsgroup = new System.Windows.Forms.GroupBox(); + this.flags = new CodeImp.DoomBuilder.Controls.CheckboxArrayControl(); + this.tabs = new System.Windows.Forms.TabControl(); + this.tabproperties = new System.Windows.Forms.TabPage(); + this.settingsGroup = new System.Windows.Forms.GroupBox(); + this.alpha = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox(); + this.lockNumber = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox(); + this.renderStyle = new System.Windows.Forms.ComboBox(); + this.activationGroup = new System.Windows.Forms.GroupBox(); + this.missingactivation = new System.Windows.Forms.PictureBox(); + this.idgroup = new System.Windows.Forms.GroupBox(); + this.tagSelector = new CodeImp.DoomBuilder.GZBuilder.Controls.TagSelector(); + this.tabsidedefs = new System.Windows.Forms.TabPage(); + this.splitter = new System.Windows.Forms.SplitContainer(); + this.frontside = new System.Windows.Forms.CheckBox(); + this.frontgroup = new System.Windows.Forms.GroupBox(); + this.frontTextureOffset = new CodeImp.DoomBuilder.GZBuilder.Controls.PairedIntControl(); + this.cbLightAbsoluteFront = new System.Windows.Forms.CheckBox(); + this.lightFront = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox(); + this.frontsector = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox(); + this.customfrontbutton = new System.Windows.Forms.Button(); + this.frontlow = new CodeImp.DoomBuilder.Controls.TextureSelectorControl(); + this.frontmid = new CodeImp.DoomBuilder.Controls.TextureSelectorControl(); + this.fronthigh = new CodeImp.DoomBuilder.Controls.TextureSelectorControl(); + this.udmfPropertiesFront = new System.Windows.Forms.TabControl(); + this.tabFrontOffsets = new System.Windows.Forms.TabPage(); + this.pfcFrontScaleBottom = new CodeImp.DoomBuilder.GZBuilder.Controls.PairedFieldsControl(); + this.pfcFrontScaleMid = new CodeImp.DoomBuilder.GZBuilder.Controls.PairedFieldsControl(); + this.pfcFrontScaleTop = new CodeImp.DoomBuilder.GZBuilder.Controls.PairedFieldsControl(); + this.pfcFrontOffsetBottom = new CodeImp.DoomBuilder.GZBuilder.Controls.PairedFieldsControl(); + this.pfcFrontOffsetMid = new CodeImp.DoomBuilder.GZBuilder.Controls.PairedFieldsControl(); + this.pfcFrontOffsetTop = new CodeImp.DoomBuilder.GZBuilder.Controls.PairedFieldsControl(); + this.tabFrontFlags = new System.Windows.Forms.TabPage(); + this.flagsFront = new CodeImp.DoomBuilder.Controls.CheckboxArrayControl(); + this.backside = new System.Windows.Forms.CheckBox(); + this.backgroup = new System.Windows.Forms.GroupBox(); + this.backTextureOffset = new CodeImp.DoomBuilder.GZBuilder.Controls.PairedIntControl(); + this.cbLightAbsoluteBack = new System.Windows.Forms.CheckBox(); + this.labelLightBack = new System.Windows.Forms.Label(); + this.lightBack = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox(); + this.backsector = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox(); + this.custombackbutton = new System.Windows.Forms.Button(); + this.backlow = new CodeImp.DoomBuilder.Controls.TextureSelectorControl(); + this.backmid = new CodeImp.DoomBuilder.Controls.TextureSelectorControl(); + this.backhigh = new CodeImp.DoomBuilder.Controls.TextureSelectorControl(); + this.udmfPropertiesBack = new System.Windows.Forms.TabControl(); + this.tabBackOffsets = new System.Windows.Forms.TabPage(); + this.pfcBackScaleMid = new CodeImp.DoomBuilder.GZBuilder.Controls.PairedFieldsControl(); + this.pfcBackScaleTop = new CodeImp.DoomBuilder.GZBuilder.Controls.PairedFieldsControl(); + this.pfcBackScaleBottom = new CodeImp.DoomBuilder.GZBuilder.Controls.PairedFieldsControl(); + this.pfcBackOffsetBottom = new CodeImp.DoomBuilder.GZBuilder.Controls.PairedFieldsControl(); + this.pfcBackOffsetMid = new CodeImp.DoomBuilder.GZBuilder.Controls.PairedFieldsControl(); + this.pfcBackOffsetTop = new CodeImp.DoomBuilder.GZBuilder.Controls.PairedFieldsControl(); + this.tabBackFlags = new System.Windows.Forms.TabPage(); + this.flagsBack = new CodeImp.DoomBuilder.Controls.CheckboxArrayControl(); + this.tabcustom = new System.Windows.Forms.TabPage(); + this.fieldslist = new CodeImp.DoomBuilder.Controls.FieldsEditorControl(); + this.tooltip = new System.Windows.Forms.ToolTip(this.components); + label2 = new System.Windows.Forms.Label(); + label3 = new System.Windows.Forms.Label(); + label4 = new System.Windows.Forms.Label(); + label5 = new System.Windows.Forms.Label(); + label8 = new System.Windows.Forms.Label(); + label9 = new System.Windows.Forms.Label(); + label10 = new System.Windows.Forms.Label(); + label11 = new System.Windows.Forms.Label(); + label12 = new System.Windows.Forms.Label(); + label7 = new System.Windows.Forms.Label(); + label14 = new System.Windows.Forms.Label(); + label6 = new System.Windows.Forms.Label(); + this.actiongroup.SuspendLayout(); + this.argspanel.SuspendLayout(); + this.flagsgroup.SuspendLayout(); + this.tabs.SuspendLayout(); + this.tabproperties.SuspendLayout(); + this.settingsGroup.SuspendLayout(); + this.activationGroup.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.missingactivation)).BeginInit(); + this.idgroup.SuspendLayout(); + this.tabsidedefs.SuspendLayout(); + this.splitter.Panel1.SuspendLayout(); + this.splitter.Panel2.SuspendLayout(); + this.splitter.SuspendLayout(); + this.frontgroup.SuspendLayout(); + this.udmfPropertiesFront.SuspendLayout(); + this.tabFrontOffsets.SuspendLayout(); + this.tabFrontFlags.SuspendLayout(); + this.backgroup.SuspendLayout(); + this.udmfPropertiesBack.SuspendLayout(); + this.tabBackOffsets.SuspendLayout(); + this.tabBackFlags.SuspendLayout(); + this.tabcustom.SuspendLayout(); + this.SuspendLayout(); + // + // label2 + // + label2.AutoSize = true; + label2.Location = new System.Drawing.Point(15, 30); + label2.Name = "label2"; + label2.Size = new System.Drawing.Size(41, 14); + label2.TabIndex = 9; + label2.Text = "Action:"; + // + // label3 + // + label3.Location = new System.Drawing.Point(252, 18); + label3.Name = "label3"; + label3.Size = new System.Drawing.Size(83, 16); + label3.TabIndex = 3; + label3.Text = "Upper"; + label3.TextAlign = System.Drawing.ContentAlignment.TopCenter; + // + // label4 + // + label4.Location = new System.Drawing.Point(343, 18); + label4.Name = "label4"; + label4.Size = new System.Drawing.Size(83, 16); + label4.TabIndex = 4; + label4.Text = "Middle"; + label4.TextAlign = System.Drawing.ContentAlignment.TopCenter; + // + // label5 + // + label5.Location = new System.Drawing.Point(434, 18); + label5.Name = "label5"; + label5.Size = new System.Drawing.Size(83, 16); + label5.TabIndex = 5; + label5.Text = "Lower"; + label5.TextAlign = System.Drawing.ContentAlignment.TopCenter; + // + // label8 + // + label8.Location = new System.Drawing.Point(437, 18); + 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, 18); + 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, 18); + label10.Name = "label10"; + label10.Size = new System.Drawing.Size(83, 16); + label10.TabIndex = 3; + label10.Text = "Upper"; + label10.TextAlign = System.Drawing.ContentAlignment.TopCenter; + // + // label11 + // + label11.Location = new System.Drawing.Point(8, 42); + label11.Name = "label11"; + label11.Size = new System.Drawing.Size(80, 14); + label11.TabIndex = 13; + label11.Text = "Sector Index:"; + label11.TextAlign = System.Drawing.ContentAlignment.TopRight; + // + // label12 + // + label12.Location = new System.Drawing.Point(8, 42); + label12.Name = "label12"; + label12.Size = new System.Drawing.Size(80, 14); + label12.TabIndex = 16; + label12.Text = "Sector Index:"; + label12.TextAlign = System.Drawing.ContentAlignment.TopRight; + // + // label7 + // + label7.AutoSize = true; + label7.Location = new System.Drawing.Point(15, 30); + label7.Name = "label7"; + label7.Size = new System.Drawing.Size(71, 14); + label7.TabIndex = 11; + label7.Text = "Render style:"; + // + // label14 + // + label14.AutoSize = true; + label14.Location = new System.Drawing.Point(330, 30); + label14.Name = "label14"; + label14.Size = new System.Drawing.Size(73, 14); + label14.TabIndex = 15; + label14.Text = "Lock Number:"; + // + // label6 + // + label6.AutoSize = true; + label6.Location = new System.Drawing.Point(199, 30); + label6.Name = "label6"; + label6.Size = new System.Drawing.Size(38, 14); + label6.TabIndex = 17; + label6.Text = "Alpha:"; + // + // labelLightFront + // + this.labelLightFront.Location = new System.Drawing.Point(8, 101); + this.labelLightFront.Name = "labelLightFront"; + this.labelLightFront.Size = new System.Drawing.Size(80, 14); + this.labelLightFront.TabIndex = 25; + this.labelLightFront.Tag = ""; + this.labelLightFront.Text = "Brightness:"; + this.labelLightFront.TextAlign = System.Drawing.ContentAlignment.TopRight; + // + // cancel + // + this.cancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.cancel.Location = new System.Drawing.Point(335, 665); + 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); + // + // apply + // + this.apply.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.apply.Location = new System.Drawing.Point(453, 665); + 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); + // + // 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.argspanel); + this.actiongroup.Controls.Add(label2); + this.actiongroup.Controls.Add(this.action); + this.actiongroup.Controls.Add(this.browseaction); + this.actiongroup.Location = new System.Drawing.Point(8, 247); + this.actiongroup.Name = "actiongroup"; + this.actiongroup.Size = new System.Drawing.Size(533, 142); + this.actiongroup.TabIndex = 1; + this.actiongroup.TabStop = false; + this.actiongroup.Text = " Action "; + // + // argspanel + // + this.argspanel.Controls.Add(this.scriptNumbers); + this.argspanel.Controls.Add(this.scriptNames); + this.argspanel.Controls.Add(this.arg2); + this.argspanel.Controls.Add(this.arg1); + this.argspanel.Controls.Add(this.arg0); + this.argspanel.Controls.Add(this.arg3); + this.argspanel.Controls.Add(this.arg4); + this.argspanel.Controls.Add(this.arg1label); + this.argspanel.Controls.Add(this.arg3label); + this.argspanel.Controls.Add(this.arg2label); + this.argspanel.Controls.Add(this.arg4label); + this.argspanel.Controls.Add(this.cbArgStr); + this.argspanel.Controls.Add(this.arg0label); + this.argspanel.Location = new System.Drawing.Point(6, 54); + this.argspanel.Name = "argspanel"; + this.argspanel.Size = new System.Drawing.Size(521, 83); + this.argspanel.TabIndex = 2; + // + // scriptNumbers + // + this.scriptNumbers.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest; + this.scriptNumbers.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems; + this.scriptNumbers.BackColor = System.Drawing.Color.LemonChiffon; + this.scriptNumbers.FormattingEnabled = true; + this.scriptNumbers.Location = new System.Drawing.Point(407, 55); + this.scriptNumbers.Name = "scriptNumbers"; + this.scriptNumbers.Size = new System.Drawing.Size(120, 22); + this.scriptNumbers.TabIndex = 39; + // + // scriptNames + // + this.scriptNames.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest; + this.scriptNames.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems; + this.scriptNames.BackColor = System.Drawing.Color.Honeydew; + this.scriptNames.FormattingEnabled = true; + this.scriptNames.Location = new System.Drawing.Point(283, 55); + this.scriptNames.Name = "scriptNames"; + this.scriptNames.Size = new System.Drawing.Size(120, 22); + this.scriptNames.TabIndex = 38; + // + // arg2 + // + this.arg2.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.arg2.Location = new System.Drawing.Point(157, 55); + this.arg2.Name = "arg2"; + this.arg2.Size = new System.Drawing.Size(120, 24); + this.arg2.TabIndex = 2; + // + // arg1 + // + this.arg1.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.arg1.Location = new System.Drawing.Point(157, 29); + this.arg1.Name = "arg1"; + this.arg1.Size = new System.Drawing.Size(120, 24); + this.arg1.TabIndex = 1; + // + // arg0 + // + this.arg0.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.arg0.Location = new System.Drawing.Point(157, 3); + this.arg0.Name = "arg0"; + this.arg0.Size = new System.Drawing.Size(120, 24); + this.arg0.TabIndex = 0; + // + // arg3 + // + this.arg3.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.arg3.Location = new System.Drawing.Point(398, 3); + this.arg3.Name = "arg3"; + this.arg3.Size = new System.Drawing.Size(120, 24); + this.arg3.TabIndex = 3; + // + // arg4 + // + this.arg4.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.arg4.Location = new System.Drawing.Point(398, 29); + this.arg4.Name = "arg4"; + this.arg4.Size = new System.Drawing.Size(120, 24); + this.arg4.TabIndex = 4; + // + // arg1label + // + this.arg1label.Location = new System.Drawing.Point(-28, 34); + this.arg1label.Name = "arg1label"; + this.arg1label.Size = new System.Drawing.Size(179, 14); + this.arg1label.TabIndex = 33; + this.arg1label.Text = "Argument 2:"; + this.arg1label.TextAlign = System.Drawing.ContentAlignment.TopRight; + this.arg1label.UseMnemonic = false; + // + // arg3label + // + this.arg3label.Location = new System.Drawing.Point(213, 8); + this.arg3label.Name = "arg3label"; + this.arg3label.Size = new System.Drawing.Size(179, 14); + this.arg3label.TabIndex = 36; + this.arg3label.Text = "Argument 4:"; + this.arg3label.TextAlign = System.Drawing.ContentAlignment.TopRight; + this.arg3label.UseMnemonic = false; + // + // arg2label + // + this.arg2label.Location = new System.Drawing.Point(-28, 60); + this.arg2label.Name = "arg2label"; + this.arg2label.Size = new System.Drawing.Size(179, 14); + this.arg2label.TabIndex = 35; + this.arg2label.Text = "Argument 3:"; + this.arg2label.TextAlign = System.Drawing.ContentAlignment.TopRight; + this.arg2label.UseMnemonic = false; + // + // arg4label + // + this.arg4label.Location = new System.Drawing.Point(213, 34); + this.arg4label.Name = "arg4label"; + this.arg4label.Size = new System.Drawing.Size(179, 14); + this.arg4label.TabIndex = 34; + this.arg4label.Text = "Argument 5:"; + this.arg4label.TextAlign = System.Drawing.ContentAlignment.TopRight; + this.arg4label.UseMnemonic = false; + // + // cbArgStr + // + this.cbArgStr.Location = new System.Drawing.Point(8, -4); + this.cbArgStr.Name = "cbArgStr"; + this.cbArgStr.Size = new System.Drawing.Size(63, 40); + this.cbArgStr.TabIndex = 37; + this.cbArgStr.Text = "Named script"; + this.cbArgStr.UseVisualStyleBackColor = true; + this.cbArgStr.CheckedChanged += new System.EventHandler(this.cbArgStr_CheckedChanged); + // + // arg0label + // + this.arg0label.Location = new System.Drawing.Point(-28, 8); + this.arg0label.Name = "arg0label"; + this.arg0label.Size = new System.Drawing.Size(179, 14); + this.arg0label.TabIndex = 32; + this.arg0label.Text = "Argument 1:"; + this.arg0label.TextAlign = System.Drawing.ContentAlignment.TopRight; + this.arg0label.UseMnemonic = false; + // + // 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, 27); + this.action.Name = "action"; + this.action.Size = new System.Drawing.Size(428, 21); + this.action.TabIndex = 0; + this.action.Value = 402; + this.action.ValueChanges += new System.EventHandler(this.action_ValueChanges); + // + // browseaction + // + this.browseaction.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.browseaction.Image = global::CodeImp.DoomBuilder.Properties.Resources.List; + this.browseaction.Location = new System.Drawing.Point(496, 25); + this.browseaction.Name = "browseaction"; + this.browseaction.Padding = new System.Windows.Forms.Padding(0, 0, 1, 3); + this.browseaction.Size = new System.Drawing.Size(28, 25); + this.browseaction.TabIndex = 1; + this.browseaction.Text = " "; + this.browseaction.UseVisualStyleBackColor = true; + this.browseaction.Click += new System.EventHandler(this.browseaction_Click); + // + // udmfactivates + // + this.udmfactivates.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.udmfactivates.AutoScroll = true; + this.udmfactivates.Columns = 2; + this.udmfactivates.Location = new System.Drawing.Point(18, 19); + this.udmfactivates.Name = "udmfactivates"; + this.udmfactivates.Size = new System.Drawing.Size(509, 133); + this.udmfactivates.TabIndex = 0; + this.udmfactivates.VerticalSpacing = 1; + // + // 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(8, 3); + this.flagsgroup.Name = "flagsgroup"; + this.flagsgroup.Size = new System.Drawing.Size(533, 174); + 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(18, 17); + this.flags.Name = "flags"; + this.flags.Size = new System.Drawing.Size(509, 152); + this.flags.TabIndex = 0; + this.flags.VerticalSpacing = 1; + this.flags.OnValueChanged += new System.EventHandler(this.flags_OnValueChanged); + // + // tabs + // + this.tabs.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.tabs.Controls.Add(this.tabproperties); + this.tabs.Controls.Add(this.tabsidedefs); + this.tabs.Controls.Add(this.tabcustom); + this.tabs.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.tabs.Location = new System.Drawing.Point(10, 10); + this.tabs.Margin = new System.Windows.Forms.Padding(1); + this.tabs.Name = "tabs"; + this.tabs.SelectedIndex = 0; + this.tabs.Size = new System.Drawing.Size(557, 648); + this.tabs.SizeMode = System.Windows.Forms.TabSizeMode.Fixed; + this.tabs.TabIndex = 0; + // + // tabproperties + // + this.tabproperties.Controls.Add(this.flagsgroup); + this.tabproperties.Controls.Add(this.settingsGroup); + this.tabproperties.Controls.Add(this.actiongroup); + this.tabproperties.Controls.Add(this.activationGroup); + this.tabproperties.Controls.Add(this.idgroup); + this.tabproperties.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.tabproperties.Location = new System.Drawing.Point(4, 23); + this.tabproperties.Name = "tabproperties"; + this.tabproperties.Padding = new System.Windows.Forms.Padding(5); + this.tabproperties.Size = new System.Drawing.Size(549, 621); + this.tabproperties.TabIndex = 0; + this.tabproperties.Text = " Properties "; + this.tabproperties.UseVisualStyleBackColor = true; + // + // settingsGroup + // + this.settingsGroup.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.settingsGroup.Controls.Add(this.alpha); + this.settingsGroup.Controls.Add(label6); + this.settingsGroup.Controls.Add(this.lockNumber); + this.settingsGroup.Controls.Add(label14); + this.settingsGroup.Controls.Add(this.renderStyle); + this.settingsGroup.Controls.Add(label7); + this.settingsGroup.Location = new System.Drawing.Point(8, 183); + this.settingsGroup.Name = "settingsGroup"; + this.settingsGroup.Size = new System.Drawing.Size(533, 58); + this.settingsGroup.TabIndex = 3; + this.settingsGroup.TabStop = false; + this.settingsGroup.Text = " Settings"; + // + // alpha + // + this.alpha.AllowDecimal = true; + this.alpha.AllowNegative = false; + this.alpha.AllowRelative = false; + this.alpha.ButtonStep = 1; + this.alpha.ButtonStepFloat = 0.1F; + this.alpha.ButtonStepsWrapAround = false; + this.alpha.Location = new System.Drawing.Point(243, 25); + this.alpha.Name = "alpha"; + this.alpha.Size = new System.Drawing.Size(65, 24); + this.alpha.StepValues = null; + this.alpha.TabIndex = 18; + this.alpha.WhenTextChanged += new System.EventHandler(this.alpha_WhenTextChanged); + // + // lockNumber + // + this.lockNumber.AllowDecimal = false; + this.lockNumber.AllowNegative = false; + this.lockNumber.AllowRelative = false; + this.lockNumber.ButtonStep = 1; + this.lockNumber.ButtonStepFloat = 1F; + this.lockNumber.ButtonStepsWrapAround = false; + this.lockNumber.Location = new System.Drawing.Point(405, 25); + this.lockNumber.Name = "lockNumber"; + this.lockNumber.Size = new System.Drawing.Size(65, 24); + this.lockNumber.StepValues = null; + this.lockNumber.TabIndex = 16; + // + // renderStyle + // + this.renderStyle.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.renderStyle.FormattingEnabled = true; + this.renderStyle.Location = new System.Drawing.Point(92, 26); + this.renderStyle.Name = "renderStyle"; + this.renderStyle.Size = new System.Drawing.Size(86, 22); + this.renderStyle.TabIndex = 12; + this.renderStyle.SelectedIndexChanged += new System.EventHandler(this.cbRenderStyle_SelectedIndexChanged); + // + // activationGroup + // + this.activationGroup.Controls.Add(this.missingactivation); + this.activationGroup.Controls.Add(this.udmfactivates); + this.activationGroup.Location = new System.Drawing.Point(8, 395); + this.activationGroup.Name = "activationGroup"; + this.activationGroup.Size = new System.Drawing.Size(533, 158); + this.activationGroup.TabIndex = 1; + this.activationGroup.TabStop = false; + this.activationGroup.Text = " Activation "; + // + // missingactivation + // + this.missingactivation.BackColor = System.Drawing.SystemColors.Window; + this.missingactivation.Image = global::CodeImp.DoomBuilder.Properties.Resources.Warning; + this.missingactivation.Location = new System.Drawing.Point(64, -2); + this.missingactivation.Name = "missingactivation"; + this.missingactivation.Size = new System.Drawing.Size(16, 16); + this.missingactivation.TabIndex = 4; + this.missingactivation.TabStop = false; + this.tooltip.SetToolTip(this.missingactivation, "Selected action requires activation!"); + this.missingactivation.Visible = false; + // + // 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(8, 559); + this.idgroup.Name = "idgroup"; + this.idgroup.Size = new System.Drawing.Size(533, 58); + this.idgroup.TabIndex = 2; + this.idgroup.TabStop = false; + this.idgroup.Text = " Identification "; + // + // tagSelector + // + this.tagSelector.Location = new System.Drawing.Point(6, 19); + this.tagSelector.Name = "tagSelector"; + this.tagSelector.Size = new System.Drawing.Size(444, 35); + this.tagSelector.TabIndex = 0; + // + // tabsidedefs + // + this.tabsidedefs.Controls.Add(this.splitter); + this.tabsidedefs.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.tabsidedefs.Location = new System.Drawing.Point(4, 23); + this.tabsidedefs.Name = "tabsidedefs"; + this.tabsidedefs.Padding = new System.Windows.Forms.Padding(5); + this.tabsidedefs.Size = new System.Drawing.Size(549, 621); + this.tabsidedefs.TabIndex = 1; + this.tabsidedefs.Text = " Sidedefs "; + this.tabsidedefs.UseVisualStyleBackColor = true; + // + // splitter + // + this.splitter.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitter.IsSplitterFixed = true; + this.splitter.Location = new System.Drawing.Point(5, 5); + this.splitter.Name = "splitter"; + this.splitter.Orientation = System.Windows.Forms.Orientation.Horizontal; + // + // splitter.Panel1 + // + this.splitter.Panel1.Controls.Add(this.frontside); + this.splitter.Panel1.Controls.Add(this.frontgroup); + // + // splitter.Panel2 + // + this.splitter.Panel2.Controls.Add(this.backside); + this.splitter.Panel2.Controls.Add(this.backgroup); + this.splitter.Size = new System.Drawing.Size(539, 611); + this.splitter.SplitterDistance = 302; + this.splitter.TabIndex = 3; + // + // frontside + // + this.frontside.AutoSize = true; + this.frontside.Location = new System.Drawing.Point(15, 1); + this.frontside.Name = "frontside"; + this.frontside.Size = new System.Drawing.Size(75, 18); + 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.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.frontgroup.Controls.Add(this.frontTextureOffset); + this.frontgroup.Controls.Add(this.cbLightAbsoluteFront); + this.frontgroup.Controls.Add(this.labelLightFront); + this.frontgroup.Controls.Add(this.lightFront); + this.frontgroup.Controls.Add(this.frontsector); + this.frontgroup.Controls.Add(this.customfrontbutton); + 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.udmfPropertiesFront); + 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(3, 3); + this.frontgroup.Name = "frontgroup"; + this.frontgroup.Size = new System.Drawing.Size(535, 296); + this.frontgroup.TabIndex = 1; + this.frontgroup.TabStop = false; + this.frontgroup.Text = " "; + // + // frontTextureOffset + // + this.frontTextureOffset.ButtonStep = 16; + this.frontTextureOffset.DefaultValue = 0; + this.frontTextureOffset.Label = "Texture Offset:"; + this.frontTextureOffset.Location = new System.Drawing.Point(3, 65); + this.frontTextureOffset.Name = "frontTextureOffset"; + this.frontTextureOffset.Size = new System.Drawing.Size(247, 26); + this.frontTextureOffset.TabIndex = 41; + this.frontTextureOffset.OnValuesChanged += new System.EventHandler(this.frontTextureOffset_OnValuesChanged); + // + // cbLightAbsoluteFront + // + this.cbLightAbsoluteFront.AutoSize = true; + this.cbLightAbsoluteFront.Location = new System.Drawing.Point(158, 100); + this.cbLightAbsoluteFront.Name = "cbLightAbsoluteFront"; + this.cbLightAbsoluteFront.Size = new System.Drawing.Size(69, 18); + this.cbLightAbsoluteFront.TabIndex = 27; + this.cbLightAbsoluteFront.Tag = "lightabsolute"; + this.cbLightAbsoluteFront.Text = "Absolute"; + this.cbLightAbsoluteFront.UseVisualStyleBackColor = true; + this.cbLightAbsoluteFront.CheckedChanged += new System.EventHandler(this.cbLightAbsoluteFront_CheckedChanged); + // + // lightFront + // + this.lightFront.AllowDecimal = false; + this.lightFront.AllowNegative = true; + this.lightFront.AllowRelative = true; + this.lightFront.ButtonStep = 16; + this.lightFront.ButtonStepFloat = 1F; + this.lightFront.ButtonStepsWrapAround = false; + this.lightFront.Location = new System.Drawing.Point(90, 96); + this.lightFront.Name = "lightFront"; + this.lightFront.Size = new System.Drawing.Size(62, 24); + this.lightFront.StepValues = null; + this.lightFront.TabIndex = 26; + this.lightFront.Tag = ""; + this.lightFront.WhenTextChanged += new System.EventHandler(this.lightFront_WhenTextChanged); + // + // frontsector + // + this.frontsector.AllowDecimal = false; + this.frontsector.AllowNegative = false; + this.frontsector.AllowRelative = false; + this.frontsector.ButtonStep = 1; + this.frontsector.ButtonStepFloat = 1F; + 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; + // + // customfrontbutton + // + this.customfrontbutton.Location = new System.Drawing.Point(90, 126); + this.customfrontbutton.Name = "customfrontbutton"; + this.customfrontbutton.Size = new System.Drawing.Size(130, 25); + this.customfrontbutton.TabIndex = 3; + this.customfrontbutton.Text = "Custom fields..."; + this.customfrontbutton.UseVisualStyleBackColor = true; + this.customfrontbutton.Click += new System.EventHandler(this.customfrontbutton_Click); + // + // frontlow + // + this.frontlow.Location = new System.Drawing.Point(434, 37); + this.frontlow.MultipleTextures = false; + this.frontlow.Name = "frontlow"; + this.frontlow.Required = false; + this.frontlow.Size = new System.Drawing.Size(83, 112); + this.frontlow.TabIndex = 6; + this.frontlow.TextureName = ""; + this.frontlow.OnValueChanged += new System.EventHandler(this.frontlow_OnValueChanged); + // + // frontmid + // + this.frontmid.Location = new System.Drawing.Point(343, 37); + this.frontmid.MultipleTextures = false; + this.frontmid.Name = "frontmid"; + this.frontmid.Required = false; + this.frontmid.Size = new System.Drawing.Size(83, 112); + this.frontmid.TabIndex = 5; + this.frontmid.TextureName = ""; + this.frontmid.OnValueChanged += new System.EventHandler(this.frontmid_OnValueChanged); + // + // fronthigh + // + this.fronthigh.Location = new System.Drawing.Point(252, 37); + this.fronthigh.MultipleTextures = false; + this.fronthigh.Name = "fronthigh"; + this.fronthigh.Required = false; + this.fronthigh.Size = new System.Drawing.Size(83, 112); + this.fronthigh.TabIndex = 4; + this.fronthigh.TextureName = ""; + this.fronthigh.OnValueChanged += new System.EventHandler(this.fronthigh_OnValueChanged); + // + // udmfPropertiesFront + // + this.udmfPropertiesFront.Controls.Add(this.tabFrontOffsets); + this.udmfPropertiesFront.Controls.Add(this.tabFrontFlags); + this.udmfPropertiesFront.ItemSize = new System.Drawing.Size(100, 19); + this.udmfPropertiesFront.Location = new System.Drawing.Point(6, 169); + this.udmfPropertiesFront.Margin = new System.Windows.Forms.Padding(1); + this.udmfPropertiesFront.Name = "udmfPropertiesFront"; + this.udmfPropertiesFront.SelectedIndex = 0; + this.udmfPropertiesFront.Size = new System.Drawing.Size(525, 123); + this.udmfPropertiesFront.TabIndex = 24; + // + // tabFrontOffsets + // + this.tabFrontOffsets.Controls.Add(this.pfcFrontScaleBottom); + this.tabFrontOffsets.Controls.Add(this.pfcFrontScaleMid); + this.tabFrontOffsets.Controls.Add(this.pfcFrontScaleTop); + this.tabFrontOffsets.Controls.Add(this.pfcFrontOffsetBottom); + this.tabFrontOffsets.Controls.Add(this.pfcFrontOffsetMid); + this.tabFrontOffsets.Controls.Add(this.pfcFrontOffsetTop); + this.tabFrontOffsets.Location = new System.Drawing.Point(4, 23); + this.tabFrontOffsets.Name = "tabFrontOffsets"; + this.tabFrontOffsets.Padding = new System.Windows.Forms.Padding(3); + this.tabFrontOffsets.Size = new System.Drawing.Size(517, 96); + this.tabFrontOffsets.TabIndex = 0; + this.tabFrontOffsets.Text = " Offsets & Scale "; + this.tabFrontOffsets.UseVisualStyleBackColor = true; + // + // pfcFrontScaleBottom + // + this.pfcFrontScaleBottom.AllowDecimal = true; + this.pfcFrontScaleBottom.AllowValueLinking = true; + this.pfcFrontScaleBottom.ButtonStep = 1; + this.pfcFrontScaleBottom.ButtonStepFloat = 0.1F; + this.pfcFrontScaleBottom.DefaultValue = 1F; + this.pfcFrontScaleBottom.Field1 = "scalex_bottom"; + this.pfcFrontScaleBottom.Field2 = "scaley_bottom"; + this.pfcFrontScaleBottom.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); + this.pfcFrontScaleBottom.Label = "Lower Scale:"; + this.pfcFrontScaleBottom.LinkValues = false; + this.pfcFrontScaleBottom.Location = new System.Drawing.Point(245, 65); + this.pfcFrontScaleBottom.Name = "pfcFrontScaleBottom"; + this.pfcFrontScaleBottom.Size = new System.Drawing.Size(270, 32); + this.pfcFrontScaleBottom.TabIndex = 40; + this.pfcFrontScaleBottom.OnValuesChanged += new System.EventHandler(this.pfcFrontScaleBottom_OnValuesChanged); + // + // pfcFrontScaleMid + // + this.pfcFrontScaleMid.AllowDecimal = true; + this.pfcFrontScaleMid.AllowValueLinking = true; + this.pfcFrontScaleMid.ButtonStep = 1; + this.pfcFrontScaleMid.ButtonStepFloat = 0.1F; + this.pfcFrontScaleMid.DefaultValue = 1F; + this.pfcFrontScaleMid.Field1 = "scalex_mid"; + this.pfcFrontScaleMid.Field2 = "scaley_mid"; + this.pfcFrontScaleMid.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); + this.pfcFrontScaleMid.Label = "Middle Scale:"; + this.pfcFrontScaleMid.LinkValues = false; + this.pfcFrontScaleMid.Location = new System.Drawing.Point(245, 36); + this.pfcFrontScaleMid.Name = "pfcFrontScaleMid"; + this.pfcFrontScaleMid.Size = new System.Drawing.Size(270, 32); + this.pfcFrontScaleMid.TabIndex = 39; + this.pfcFrontScaleMid.OnValuesChanged += new System.EventHandler(this.pfcFrontScaleMid_OnValuesChanged); + // + // pfcFrontScaleTop + // + this.pfcFrontScaleTop.AllowDecimal = true; + this.pfcFrontScaleTop.AllowValueLinking = true; + this.pfcFrontScaleTop.ButtonStep = 1; + this.pfcFrontScaleTop.ButtonStepFloat = 0.1F; + this.pfcFrontScaleTop.DefaultValue = 1F; + this.pfcFrontScaleTop.Field1 = "scalex_top"; + this.pfcFrontScaleTop.Field2 = "scaley_top"; + this.pfcFrontScaleTop.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); + this.pfcFrontScaleTop.Label = "Upper Scale:"; + this.pfcFrontScaleTop.LinkValues = false; + this.pfcFrontScaleTop.Location = new System.Drawing.Point(245, 6); + this.pfcFrontScaleTop.Name = "pfcFrontScaleTop"; + this.pfcFrontScaleTop.Size = new System.Drawing.Size(270, 30); + this.pfcFrontScaleTop.TabIndex = 38; + this.pfcFrontScaleTop.OnValuesChanged += new System.EventHandler(this.pfcFrontScaleTop_OnValuesChanged); + // + // pfcFrontOffsetBottom + // + this.pfcFrontOffsetBottom.AllowDecimal = true; + this.pfcFrontOffsetBottom.AllowValueLinking = false; + this.pfcFrontOffsetBottom.ButtonStep = 1; + this.pfcFrontOffsetBottom.ButtonStepFloat = 16F; + this.pfcFrontOffsetBottom.DefaultValue = 0F; + this.pfcFrontOffsetBottom.Field1 = "offsetx_bottom"; + this.pfcFrontOffsetBottom.Field2 = "offsety_bottom"; + this.pfcFrontOffsetBottom.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); + this.pfcFrontOffsetBottom.Label = "Lower Offset:"; + this.pfcFrontOffsetBottom.LinkValues = false; + this.pfcFrontOffsetBottom.Location = new System.Drawing.Point(-5, 65); + this.pfcFrontOffsetBottom.Name = "pfcFrontOffsetBottom"; + this.pfcFrontOffsetBottom.Size = new System.Drawing.Size(270, 30); + this.pfcFrontOffsetBottom.TabIndex = 37; + this.pfcFrontOffsetBottom.OnValuesChanged += new System.EventHandler(this.pfcFrontOffsetBottom_OnValuesChanged); + // + // pfcFrontOffsetMid + // + this.pfcFrontOffsetMid.AllowDecimal = true; + this.pfcFrontOffsetMid.AllowValueLinking = false; + this.pfcFrontOffsetMid.ButtonStep = 1; + this.pfcFrontOffsetMid.ButtonStepFloat = 16F; + this.pfcFrontOffsetMid.DefaultValue = 0F; + this.pfcFrontOffsetMid.Field1 = "offsetx_mid"; + this.pfcFrontOffsetMid.Field2 = "offsety_mid"; + this.pfcFrontOffsetMid.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); + this.pfcFrontOffsetMid.Label = "Middle Offset:"; + this.pfcFrontOffsetMid.LinkValues = false; + this.pfcFrontOffsetMid.Location = new System.Drawing.Point(-5, 36); + this.pfcFrontOffsetMid.Name = "pfcFrontOffsetMid"; + this.pfcFrontOffsetMid.Size = new System.Drawing.Size(270, 30); + this.pfcFrontOffsetMid.TabIndex = 36; + this.pfcFrontOffsetMid.OnValuesChanged += new System.EventHandler(this.pfcFrontOffsetMid_OnValuesChanged); + // + // pfcFrontOffsetTop + // + this.pfcFrontOffsetTop.AllowDecimal = true; + this.pfcFrontOffsetTop.AllowValueLinking = false; + this.pfcFrontOffsetTop.ButtonStep = 1; + this.pfcFrontOffsetTop.ButtonStepFloat = 16F; + this.pfcFrontOffsetTop.DefaultValue = 0F; + this.pfcFrontOffsetTop.Field1 = "offsetx_top"; + this.pfcFrontOffsetTop.Field2 = "offsety_top"; + this.pfcFrontOffsetTop.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); + this.pfcFrontOffsetTop.Label = "Upper Offset:"; + this.pfcFrontOffsetTop.LinkValues = false; + this.pfcFrontOffsetTop.Location = new System.Drawing.Point(-5, 6); + this.pfcFrontOffsetTop.Name = "pfcFrontOffsetTop"; + this.pfcFrontOffsetTop.Size = new System.Drawing.Size(270, 28); + this.pfcFrontOffsetTop.TabIndex = 35; + this.pfcFrontOffsetTop.OnValuesChanged += new System.EventHandler(this.pfcFrontOffsetTop_OnValuesChanged); + // + // tabFrontFlags + // + this.tabFrontFlags.Controls.Add(this.flagsFront); + this.tabFrontFlags.Location = new System.Drawing.Point(4, 23); + this.tabFrontFlags.Name = "tabFrontFlags"; + this.tabFrontFlags.Padding = new System.Windows.Forms.Padding(3); + this.tabFrontFlags.Size = new System.Drawing.Size(517, 96); + this.tabFrontFlags.TabIndex = 1; + this.tabFrontFlags.Text = " Flags "; + this.tabFrontFlags.UseVisualStyleBackColor = true; + // + // flagsFront + // + this.flagsFront.AutoScroll = true; + this.flagsFront.Columns = 2; + this.flagsFront.Location = new System.Drawing.Point(15, 6); + this.flagsFront.Name = "flagsFront"; + this.flagsFront.Size = new System.Drawing.Size(496, 84); + this.flagsFront.TabIndex = 0; + this.flagsFront.VerticalSpacing = 3; + this.flagsFront.OnValueChanged += new System.EventHandler(this.flagsFront_OnValueChanged); + // + // backside + // + this.backside.AutoSize = true; + this.backside.Location = new System.Drawing.Point(15, 1); + this.backside.Name = "backside"; + this.backside.Size = new System.Drawing.Size(74, 18); + this.backside.TabIndex = 0; + this.backside.Text = "Back Side"; + this.backside.UseVisualStyleBackColor = true; + this.backside.CheckStateChanged += new System.EventHandler(this.backside_CheckStateChanged); + // + // backgroup + // + 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.backTextureOffset); + this.backgroup.Controls.Add(this.cbLightAbsoluteBack); + this.backgroup.Controls.Add(this.labelLightBack); + this.backgroup.Controls.Add(this.lightBack); + this.backgroup.Controls.Add(this.backsector); + this.backgroup.Controls.Add(this.custombackbutton); + 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(label8); + this.backgroup.Controls.Add(label9); + this.backgroup.Controls.Add(label10); + this.backgroup.Controls.Add(this.udmfPropertiesBack); + this.backgroup.Enabled = false; + this.backgroup.Location = new System.Drawing.Point(3, 3); + this.backgroup.Name = "backgroup"; + this.backgroup.Size = new System.Drawing.Size(535, 299); + this.backgroup.TabIndex = 1; + this.backgroup.TabStop = false; + this.backgroup.Text = " "; + // + // backTextureOffset + // + this.backTextureOffset.ButtonStep = 16; + this.backTextureOffset.DefaultValue = 0; + this.backTextureOffset.Label = "Texture Offset:"; + this.backTextureOffset.Location = new System.Drawing.Point(3, 65); + this.backTextureOffset.Name = "backTextureOffset"; + this.backTextureOffset.Size = new System.Drawing.Size(247, 28); + this.backTextureOffset.TabIndex = 42; + this.backTextureOffset.OnValuesChanged += new System.EventHandler(this.backTextureOffset_OnValuesChanged); + // + // cbLightAbsoluteBack + // + this.cbLightAbsoluteBack.AutoSize = true; + this.cbLightAbsoluteBack.Location = new System.Drawing.Point(158, 100); + this.cbLightAbsoluteBack.Name = "cbLightAbsoluteBack"; + this.cbLightAbsoluteBack.Size = new System.Drawing.Size(69, 18); + this.cbLightAbsoluteBack.TabIndex = 30; + this.cbLightAbsoluteBack.Tag = "lightabsolute"; + this.cbLightAbsoluteBack.Text = "Absolute"; + this.cbLightAbsoluteBack.UseVisualStyleBackColor = true; + this.cbLightAbsoluteBack.CheckedChanged += new System.EventHandler(this.cbLightAbsoluteBack_CheckedChanged); + // + // labelLightBack + // + this.labelLightBack.Location = new System.Drawing.Point(8, 101); + this.labelLightBack.Name = "labelLightBack"; + this.labelLightBack.Size = new System.Drawing.Size(80, 14); + this.labelLightBack.TabIndex = 28; + this.labelLightBack.Tag = ""; + this.labelLightBack.Text = "Brightness:"; + this.labelLightBack.TextAlign = System.Drawing.ContentAlignment.TopRight; + // + // lightBack + // + this.lightBack.AllowDecimal = false; + this.lightBack.AllowNegative = true; + this.lightBack.AllowRelative = true; + this.lightBack.ButtonStep = 16; + this.lightBack.ButtonStepFloat = 1F; + this.lightBack.ButtonStepsWrapAround = false; + this.lightBack.Location = new System.Drawing.Point(90, 96); + this.lightBack.Name = "lightBack"; + this.lightBack.Size = new System.Drawing.Size(62, 24); + this.lightBack.StepValues = null; + this.lightBack.TabIndex = 29; + this.lightBack.Tag = "light"; + this.lightBack.WhenTextChanged += new System.EventHandler(this.lightBack_WhenTextChanged); + // + // backsector + // + this.backsector.AllowDecimal = false; + this.backsector.AllowNegative = false; + this.backsector.AllowRelative = false; + this.backsector.ButtonStep = 1; + this.backsector.ButtonStepFloat = 1F; + 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; + // + // custombackbutton + // + this.custombackbutton.Location = new System.Drawing.Point(90, 126); + this.custombackbutton.Name = "custombackbutton"; + this.custombackbutton.Size = new System.Drawing.Size(130, 25); + this.custombackbutton.TabIndex = 3; + this.custombackbutton.Text = "Custom fields..."; + this.custombackbutton.UseVisualStyleBackColor = true; + this.custombackbutton.Click += new System.EventHandler(this.custombackbutton_Click); + // + // backlow + // + this.backlow.Location = new System.Drawing.Point(437, 37); + this.backlow.MultipleTextures = false; + this.backlow.Name = "backlow"; + this.backlow.Required = false; + this.backlow.Size = new System.Drawing.Size(83, 112); + this.backlow.TabIndex = 6; + this.backlow.TextureName = ""; + this.backlow.OnValueChanged += new System.EventHandler(this.backlow_OnValueChanged); + // + // backmid + // + this.backmid.Location = new System.Drawing.Point(346, 37); + this.backmid.MultipleTextures = false; + this.backmid.Name = "backmid"; + this.backmid.Required = false; + this.backmid.Size = new System.Drawing.Size(83, 112); + this.backmid.TabIndex = 5; + this.backmid.TextureName = ""; + this.backmid.OnValueChanged += new System.EventHandler(this.backmid_OnValueChanged); + // + // backhigh + // + this.backhigh.Location = new System.Drawing.Point(255, 37); + this.backhigh.MultipleTextures = false; + this.backhigh.Name = "backhigh"; + this.backhigh.Required = false; + this.backhigh.Size = new System.Drawing.Size(83, 112); + this.backhigh.TabIndex = 4; + this.backhigh.TextureName = ""; + this.backhigh.OnValueChanged += new System.EventHandler(this.backhigh_OnValueChanged); + // + // udmfPropertiesBack + // + this.udmfPropertiesBack.Controls.Add(this.tabBackOffsets); + this.udmfPropertiesBack.Controls.Add(this.tabBackFlags); + this.udmfPropertiesBack.ItemSize = new System.Drawing.Size(100, 19); + this.udmfPropertiesBack.Location = new System.Drawing.Point(6, 172); + this.udmfPropertiesBack.Margin = new System.Windows.Forms.Padding(1); + this.udmfPropertiesBack.Name = "udmfPropertiesBack"; + this.udmfPropertiesBack.SelectedIndex = 0; + this.udmfPropertiesBack.Size = new System.Drawing.Size(525, 123); + this.udmfPropertiesBack.TabIndex = 25; + // + // tabBackOffsets + // + this.tabBackOffsets.Controls.Add(this.pfcBackScaleMid); + this.tabBackOffsets.Controls.Add(this.pfcBackScaleTop); + this.tabBackOffsets.Controls.Add(this.pfcBackScaleBottom); + this.tabBackOffsets.Controls.Add(this.pfcBackOffsetBottom); + this.tabBackOffsets.Controls.Add(this.pfcBackOffsetMid); + this.tabBackOffsets.Controls.Add(this.pfcBackOffsetTop); + this.tabBackOffsets.Location = new System.Drawing.Point(4, 23); + this.tabBackOffsets.Name = "tabBackOffsets"; + this.tabBackOffsets.Padding = new System.Windows.Forms.Padding(3); + this.tabBackOffsets.Size = new System.Drawing.Size(517, 96); + this.tabBackOffsets.TabIndex = 0; + this.tabBackOffsets.Text = " Offsets & Scale "; + this.tabBackOffsets.UseVisualStyleBackColor = true; + // + // pfcBackScaleMid + // + this.pfcBackScaleMid.AllowDecimal = true; + this.pfcBackScaleMid.AllowValueLinking = true; + this.pfcBackScaleMid.ButtonStep = 1; + this.pfcBackScaleMid.ButtonStepFloat = 0.1F; + this.pfcBackScaleMid.DefaultValue = 1F; + this.pfcBackScaleMid.Field1 = "scalex_mid"; + this.pfcBackScaleMid.Field2 = "scaley_mid"; + this.pfcBackScaleMid.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); + this.pfcBackScaleMid.Label = "Middle Scale:"; + this.pfcBackScaleMid.LinkValues = false; + this.pfcBackScaleMid.Location = new System.Drawing.Point(245, 36); + this.pfcBackScaleMid.Name = "pfcBackScaleMid"; + this.pfcBackScaleMid.Size = new System.Drawing.Size(270, 32); + this.pfcBackScaleMid.TabIndex = 39; + this.pfcBackScaleMid.OnValuesChanged += new System.EventHandler(this.pfcBackScaleMid_OnValuesChanged); + // + // pfcBackScaleTop + // + this.pfcBackScaleTop.AllowDecimal = true; + this.pfcBackScaleTop.AllowValueLinking = true; + this.pfcBackScaleTop.ButtonStep = 1; + this.pfcBackScaleTop.ButtonStepFloat = 0.1F; + this.pfcBackScaleTop.DefaultValue = 1F; + this.pfcBackScaleTop.Field1 = "scalex_top"; + this.pfcBackScaleTop.Field2 = "scaley_top"; + this.pfcBackScaleTop.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); + this.pfcBackScaleTop.Label = "Upper Scale:"; + this.pfcBackScaleTop.LinkValues = false; + this.pfcBackScaleTop.Location = new System.Drawing.Point(245, 6); + this.pfcBackScaleTop.Name = "pfcBackScaleTop"; + this.pfcBackScaleTop.Size = new System.Drawing.Size(270, 30); + this.pfcBackScaleTop.TabIndex = 38; + this.pfcBackScaleTop.OnValuesChanged += new System.EventHandler(this.pfcBackScaleTop_OnValuesChanged); + // + // pfcBackScaleBottom + // + this.pfcBackScaleBottom.AllowDecimal = true; + this.pfcBackScaleBottom.AllowValueLinking = true; + this.pfcBackScaleBottom.ButtonStep = 1; + this.pfcBackScaleBottom.ButtonStepFloat = 0.1F; + this.pfcBackScaleBottom.DefaultValue = 1F; + this.pfcBackScaleBottom.Field1 = "scalex_bottom"; + this.pfcBackScaleBottom.Field2 = "scaley_bottom"; + this.pfcBackScaleBottom.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); + this.pfcBackScaleBottom.Label = "Lower Scale:"; + this.pfcBackScaleBottom.LinkValues = false; + this.pfcBackScaleBottom.Location = new System.Drawing.Point(245, 65); + this.pfcBackScaleBottom.Name = "pfcBackScaleBottom"; + this.pfcBackScaleBottom.Size = new System.Drawing.Size(270, 32); + this.pfcBackScaleBottom.TabIndex = 40; + this.pfcBackScaleBottom.OnValuesChanged += new System.EventHandler(this.pfcBackScaleBottom_OnValuesChanged); + // + // pfcBackOffsetBottom + // + this.pfcBackOffsetBottom.AllowDecimal = true; + this.pfcBackOffsetBottom.AllowValueLinking = false; + this.pfcBackOffsetBottom.ButtonStep = 1; + this.pfcBackOffsetBottom.ButtonStepFloat = 16F; + this.pfcBackOffsetBottom.DefaultValue = 0F; + this.pfcBackOffsetBottom.Field1 = "offsetx_bottom"; + this.pfcBackOffsetBottom.Field2 = "offsety_bottom"; + this.pfcBackOffsetBottom.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); + this.pfcBackOffsetBottom.Label = "Lower Offset:"; + this.pfcBackOffsetBottom.LinkValues = false; + this.pfcBackOffsetBottom.Location = new System.Drawing.Point(-5, 65); + this.pfcBackOffsetBottom.Name = "pfcBackOffsetBottom"; + this.pfcBackOffsetBottom.Size = new System.Drawing.Size(270, 30); + this.pfcBackOffsetBottom.TabIndex = 37; + this.pfcBackOffsetBottom.OnValuesChanged += new System.EventHandler(this.pfcBackOffsetBottom_OnValuesChanged); + // + // pfcBackOffsetMid + // + this.pfcBackOffsetMid.AllowDecimal = true; + this.pfcBackOffsetMid.AllowValueLinking = false; + this.pfcBackOffsetMid.ButtonStep = 1; + this.pfcBackOffsetMid.ButtonStepFloat = 16F; + this.pfcBackOffsetMid.DefaultValue = 0F; + this.pfcBackOffsetMid.Field1 = "offsetx_mid"; + this.pfcBackOffsetMid.Field2 = "offsety_mid"; + this.pfcBackOffsetMid.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); + this.pfcBackOffsetMid.Label = "Middle Offset:"; + this.pfcBackOffsetMid.LinkValues = false; + this.pfcBackOffsetMid.Location = new System.Drawing.Point(-5, 36); + this.pfcBackOffsetMid.Name = "pfcBackOffsetMid"; + this.pfcBackOffsetMid.Size = new System.Drawing.Size(270, 30); + this.pfcBackOffsetMid.TabIndex = 36; + this.pfcBackOffsetMid.OnValuesChanged += new System.EventHandler(this.pfcBackOffsetMid_OnValuesChanged); + // + // pfcBackOffsetTop + // + this.pfcBackOffsetTop.AllowDecimal = true; + this.pfcBackOffsetTop.AllowValueLinking = false; + this.pfcBackOffsetTop.ButtonStep = 1; + this.pfcBackOffsetTop.ButtonStepFloat = 16F; + this.pfcBackOffsetTop.DefaultValue = 0F; + this.pfcBackOffsetTop.Field1 = "offsetx_top"; + this.pfcBackOffsetTop.Field2 = "offsety_top"; + this.pfcBackOffsetTop.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); + this.pfcBackOffsetTop.Label = "Upper Offset:"; + this.pfcBackOffsetTop.LinkValues = false; + this.pfcBackOffsetTop.Location = new System.Drawing.Point(-5, 6); + this.pfcBackOffsetTop.Name = "pfcBackOffsetTop"; + this.pfcBackOffsetTop.Size = new System.Drawing.Size(270, 28); + this.pfcBackOffsetTop.TabIndex = 35; + this.pfcBackOffsetTop.OnValuesChanged += new System.EventHandler(this.pfcBackOffsetTop_OnValuesChanged); + // + // tabBackFlags + // + this.tabBackFlags.Controls.Add(this.flagsBack); + this.tabBackFlags.Location = new System.Drawing.Point(4, 23); + this.tabBackFlags.Name = "tabBackFlags"; + this.tabBackFlags.Padding = new System.Windows.Forms.Padding(3); + this.tabBackFlags.Size = new System.Drawing.Size(517, 96); + this.tabBackFlags.TabIndex = 1; + this.tabBackFlags.Text = " Flags "; + this.tabBackFlags.UseVisualStyleBackColor = true; + // + // flagsBack + // + this.flagsBack.AutoScroll = true; + this.flagsBack.Columns = 2; + this.flagsBack.Location = new System.Drawing.Point(15, 6); + this.flagsBack.Name = "flagsBack"; + this.flagsBack.Size = new System.Drawing.Size(496, 84); + this.flagsBack.TabIndex = 1; + this.flagsBack.VerticalSpacing = 3; + this.flagsBack.OnValueChanged += new System.EventHandler(this.flagsBack_OnValueChanged); + // + // tabcustom + // + this.tabcustom.Controls.Add(this.fieldslist); + this.tabcustom.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.tabcustom.Location = new System.Drawing.Point(4, 23); + this.tabcustom.Name = "tabcustom"; + this.tabcustom.Padding = new System.Windows.Forms.Padding(3); + this.tabcustom.Size = new System.Drawing.Size(549, 621); + this.tabcustom.TabIndex = 2; + this.tabcustom.Text = "Custom"; + this.tabcustom.UseVisualStyleBackColor = true; + this.tabcustom.MouseEnter += new System.EventHandler(this.tabcustom_MouseEnter); + // + // fieldslist + // + this.fieldslist.AllowInsert = true; + this.fieldslist.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.fieldslist.AutoInsertUserPrefix = true; + this.fieldslist.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; + this.fieldslist.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.fieldslist.Location = new System.Drawing.Point(11, 11); + this.fieldslist.Margin = new System.Windows.Forms.Padding(8); + this.fieldslist.Name = "fieldslist"; + this.fieldslist.PropertyColumnVisible = true; + this.fieldslist.PropertyColumnWidth = 150; + this.fieldslist.Size = new System.Drawing.Size(527, 602); + this.fieldslist.TabIndex = 0; + this.fieldslist.TypeColumnVisible = true; + this.fieldslist.TypeColumnWidth = 100; + this.fieldslist.ValueColumnVisible = true; + // + // tooltip + // + this.tooltip.AutomaticDelay = 10; + this.tooltip.AutoPopDelay = 3000; + this.tooltip.InitialDelay = 10; + this.tooltip.IsBalloon = true; + this.tooltip.ReshowDelay = 100; + this.tooltip.UseAnimation = false; + this.tooltip.UseFading = false; + // + // LinedefEditFormUDMF + // + 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, 697); + this.Controls.Add(this.tabs); + this.Controls.Add(this.cancel); + this.Controls.Add(this.apply); + this.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "LinedefEditFormUDMF"; + this.Opacity = 0; + 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.actiongroup.ResumeLayout(false); + this.actiongroup.PerformLayout(); + this.argspanel.ResumeLayout(false); + this.flagsgroup.ResumeLayout(false); + this.tabs.ResumeLayout(false); + this.tabproperties.ResumeLayout(false); + this.settingsGroup.ResumeLayout(false); + this.settingsGroup.PerformLayout(); + this.activationGroup.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.missingactivation)).EndInit(); + this.idgroup.ResumeLayout(false); + this.tabsidedefs.ResumeLayout(false); + this.splitter.Panel1.ResumeLayout(false); + this.splitter.Panel1.PerformLayout(); + this.splitter.Panel2.ResumeLayout(false); + this.splitter.Panel2.PerformLayout(); + this.splitter.ResumeLayout(false); + this.frontgroup.ResumeLayout(false); + this.frontgroup.PerformLayout(); + this.udmfPropertiesFront.ResumeLayout(false); + this.tabFrontOffsets.ResumeLayout(false); + this.tabFrontFlags.ResumeLayout(false); + this.backgroup.ResumeLayout(false); + this.backgroup.PerformLayout(); + this.udmfPropertiesBack.ResumeLayout(false); + this.tabBackOffsets.ResumeLayout(false); + this.tabBackFlags.ResumeLayout(false); + this.tabcustom.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Button cancel; + private System.Windows.Forms.Button apply; + private System.Windows.Forms.GroupBox actiongroup; + private System.Windows.Forms.GroupBox flagsgroup; + private CodeImp.DoomBuilder.Controls.CheckboxArrayControl flags; + private System.Windows.Forms.Button browseaction; + private CodeImp.DoomBuilder.Controls.ActionSelectorControl action; + private System.Windows.Forms.TabControl tabs; + private System.Windows.Forms.TabPage tabproperties; + private System.Windows.Forms.TabPage tabsidedefs; + private System.Windows.Forms.GroupBox frontgroup; + private System.Windows.Forms.CheckBox frontside; + private System.Windows.Forms.CheckBox backside; + private System.Windows.Forms.GroupBox backgroup; + private CodeImp.DoomBuilder.Controls.TextureSelectorControl frontlow; + private CodeImp.DoomBuilder.Controls.TextureSelectorControl frontmid; + private CodeImp.DoomBuilder.Controls.TextureSelectorControl fronthigh; + private CodeImp.DoomBuilder.Controls.TextureSelectorControl backlow; + private CodeImp.DoomBuilder.Controls.TextureSelectorControl backmid; + private CodeImp.DoomBuilder.Controls.TextureSelectorControl backhigh; + private System.Windows.Forms.TabPage tabcustom; + private CodeImp.DoomBuilder.Controls.FieldsEditorControl fieldslist; + private System.Windows.Forms.GroupBox idgroup; + private CodeImp.DoomBuilder.Controls.CheckboxArrayControl udmfactivates; + private System.Windows.Forms.Panel argspanel; + private CodeImp.DoomBuilder.Controls.ArgumentBox arg2; + private CodeImp.DoomBuilder.Controls.ArgumentBox arg1; + private CodeImp.DoomBuilder.Controls.ArgumentBox arg0; + private CodeImp.DoomBuilder.Controls.ArgumentBox arg3; + private CodeImp.DoomBuilder.Controls.ArgumentBox arg4; + private System.Windows.Forms.Label arg1label; + private System.Windows.Forms.Label arg0label; + private System.Windows.Forms.Label arg3label; + private System.Windows.Forms.Label arg2label; + private System.Windows.Forms.Label arg4label; + private System.Windows.Forms.SplitContainer splitter; + private System.Windows.Forms.Button customfrontbutton; + private System.Windows.Forms.Button custombackbutton; + private CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox frontsector; + private CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox backsector; + private System.Windows.Forms.CheckBox cbArgStr; + private System.Windows.Forms.ComboBox scriptNames; + private CodeImp.DoomBuilder.GZBuilder.Controls.TagSelector tagSelector; + private System.Windows.Forms.TabControl udmfPropertiesFront; + private System.Windows.Forms.TabPage tabFrontOffsets; + private System.Windows.Forms.TabPage tabFrontFlags; + private CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox lightFront; + private System.Windows.Forms.CheckBox cbLightAbsoluteFront; + private CodeImp.DoomBuilder.GZBuilder.Controls.PairedFieldsControl pfcFrontOffsetTop; + private CodeImp.DoomBuilder.GZBuilder.Controls.PairedFieldsControl pfcFrontOffsetBottom; + private CodeImp.DoomBuilder.GZBuilder.Controls.PairedFieldsControl pfcFrontOffsetMid; + private CodeImp.DoomBuilder.GZBuilder.Controls.PairedFieldsControl pfcFrontScaleBottom; + private CodeImp.DoomBuilder.GZBuilder.Controls.PairedFieldsControl pfcFrontScaleMid; + private CodeImp.DoomBuilder.GZBuilder.Controls.PairedFieldsControl pfcFrontScaleTop; + private System.Windows.Forms.TabControl udmfPropertiesBack; + private System.Windows.Forms.TabPage tabBackOffsets; + private CodeImp.DoomBuilder.GZBuilder.Controls.PairedFieldsControl pfcBackScaleBottom; + private CodeImp.DoomBuilder.GZBuilder.Controls.PairedFieldsControl pfcBackScaleMid; + private CodeImp.DoomBuilder.GZBuilder.Controls.PairedFieldsControl pfcBackScaleTop; + private CodeImp.DoomBuilder.GZBuilder.Controls.PairedFieldsControl pfcBackOffsetBottom; + private CodeImp.DoomBuilder.GZBuilder.Controls.PairedFieldsControl pfcBackOffsetMid; + private CodeImp.DoomBuilder.GZBuilder.Controls.PairedFieldsControl pfcBackOffsetTop; + private System.Windows.Forms.TabPage tabBackFlags; + private System.Windows.Forms.GroupBox settingsGroup; + private System.Windows.Forms.ComboBox renderStyle; + private CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox lockNumber; + private System.Windows.Forms.Label labelLightFront; + private System.Windows.Forms.CheckBox cbLightAbsoluteBack; + private System.Windows.Forms.Label labelLightBack; + private CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox lightBack; + private CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox alpha; + private CodeImp.DoomBuilder.GZBuilder.Controls.PairedIntControl frontTextureOffset; + private CodeImp.DoomBuilder.GZBuilder.Controls.PairedIntControl backTextureOffset; + private CodeImp.DoomBuilder.Controls.CheckboxArrayControl flagsFront; + private CodeImp.DoomBuilder.Controls.CheckboxArrayControl flagsBack; + private System.Windows.Forms.ComboBox scriptNumbers; + private System.Windows.Forms.GroupBox activationGroup; + private System.Windows.Forms.PictureBox missingactivation; + private System.Windows.Forms.ToolTip tooltip; + } +} \ No newline at end of file diff --git a/Source/Core/Windows/LinedefEditFormUDMF.cs b/Source/Core/Windows/LinedefEditFormUDMF.cs new file mode 100644 index 00000000..d8ccec69 --- /dev/null +++ b/Source/Core/Windows/LinedefEditFormUDMF.cs @@ -0,0 +1,1911 @@ + +#region ================== Copyright (c) 2007 Pascal vd Heiden + +/* + * Copyright (c) 2007 Pascal vd Heiden, www.codeimp.com + * This program is released under GNU General Public License + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + +#endregion + +#region ================== Namespaces + +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Windows.Forms; +using CodeImp.DoomBuilder.Geometry; +using CodeImp.DoomBuilder.Map; +using CodeImp.DoomBuilder.Config; +using CodeImp.DoomBuilder.GZBuilder.Data; //mxd +using CodeImp.DoomBuilder.Types; +using CodeImp.DoomBuilder.GZBuilder.Tools; +using CodeImp.DoomBuilder.GZBuilder.Controls; //mxd + +#endregion + +namespace CodeImp.DoomBuilder.Windows +{ + internal partial class LinedefEditFormUDMF : DelayedForm + { + #region ================== Events + + public event EventHandler OnValuesChanged; //mxd + + #endregion + + #region ================== Constants + + + #endregion + + #region ================== Variables + + private ICollection lines; + private List linedefProps; //mxd + private bool preventchanges; + private string arg0str; //mxd + private bool haveArg0Str; //mxd + private readonly string[] renderstyles; //mxd + + //mxd. Persistent settings + private static bool linkFrontTopScale; + private static bool linkFrontMidScale; + private static bool linkFrontBottomScale; + private static bool linkBackTopScale; + private static bool linkBackMidScale; + private static bool linkBackBottomScale; + + private readonly List frontUdmfControls; //mxd + private readonly List backUdmfControls; //mxd + + //mxd. Window setup stuff + private static Point location = Point.Empty; + private static int activeTab; + private static int activeFrontTab; + private static int activeBackTab; + + private struct LinedefProperties //mxd + { + public readonly Dictionary Flags; + public readonly float Alpha; + + public readonly SidedefProperties Front; + public readonly SidedefProperties Back; + + public LinedefProperties(Linedef line) + { + Front = (line.Front != null ? new SidedefProperties(line.Front) : null); + Back = (line.Back != null ? new SidedefProperties(line.Back) : null); + Alpha = UDMFTools.GetFloat(line.Fields, "alpha", 1.0f); + Flags = line.GetFlags(); + } + } + + private class SidedefProperties //mxd + { + public readonly Dictionary Flags; + + public readonly float ScaleTopX; + public readonly float ScaleTopY; + public readonly float ScaleMidX; + public readonly float ScaleMidY; + public readonly float ScaleBottomX; + public readonly float ScaleBottomY; + + public readonly int OffsetX; + public readonly int OffsetY; + + public readonly float OffsetTopX; + public readonly float OffsetTopY; + public readonly float OffsetMidX; + public readonly float OffsetMidY; + public readonly float OffsetBottomX; + public readonly float OffsetBottomY; + + public readonly int Brightness; + public readonly bool AbsoluteBrightness; + + public readonly string TextureTop; + public readonly string TextureMid; + public readonly string TextureLow; + + public SidedefProperties(Sidedef side) + { + Flags = side.GetFlags(); + + //offset + OffsetX = side.OffsetX; + OffsetY = side.OffsetY; + + Brightness = UDMFTools.GetInteger(side.Fields, "light", 0); + AbsoluteBrightness = side.Fields.GetValue("lightabsolute", false); + + //scales + ScaleTopX = UDMFTools.GetFloat(side.Fields, "scalex_top", 1.0f); + ScaleTopY = UDMFTools.GetFloat(side.Fields, "scaley_top", 1.0f); + ScaleMidX = UDMFTools.GetFloat(side.Fields, "scalex_mid", 1.0f); + ScaleMidY = UDMFTools.GetFloat(side.Fields, "scaley_mid", 1.0f); + ScaleBottomX = UDMFTools.GetFloat(side.Fields, "scalex_bottom", 1.0f); + ScaleBottomY = UDMFTools.GetFloat(side.Fields, "scaley_bottom", 1.0f); + + //offsets + OffsetTopX = UDMFTools.GetFloat(side.Fields, "offsetx_top", 0f); + OffsetTopY = UDMFTools.GetFloat(side.Fields, "offsety_top", 0f); + OffsetMidX = UDMFTools.GetFloat(side.Fields, "offsetx_mid", 0f); + OffsetMidY = UDMFTools.GetFloat(side.Fields, "offsety_mid", 0f); + OffsetBottomX = UDMFTools.GetFloat(side.Fields, "offsetx_bottom", 0f); + OffsetBottomY = UDMFTools.GetFloat(side.Fields, "offsety_bottom", 0f); + + //textures + TextureTop = side.HighTexture; + TextureMid = side.MiddleTexture; + TextureLow = side.LowTexture; + } + } + + #endregion + + #region ================== Constructor + + public LinedefEditFormUDMF() + { + // Initialize + InitializeComponent(); + + //mxd. Widow setup + if(location != Point.Empty) + { + this.StartPosition = FormStartPosition.Manual; + this.Location = location; + if (activeTab > 0 && activeTab < tabs.TabCount) + { + tabs.SelectTab(activeTab); + } + else + { + activeTab = 0; + } + if(activeFrontTab > 0) udmfPropertiesFront.SelectTab(activeFrontTab); + if(activeBackTab > 0) udmfPropertiesBack.SelectTab(activeBackTab); + } + + // Fill flags lists + foreach(KeyValuePair lf in General.Map.Config.LinedefFlags) + flags.Add(lf.Value, lf.Key); + + //mxd + foreach(KeyValuePair lf in General.Map.Config.SidedefFlags) + { + flagsFront.Add(lf.Value, lf.Key); + flagsBack.Add(lf.Value, lf.Key); + } + + // Fill actions list + action.GeneralizedCategories = General.Map.Config.GenActionCategories; + action.AddInfo(General.Map.Config.SortedLinedefActions.ToArray()); + + // Fill activations list + foreach(LinedefActivateInfo ai in General.Map.Config.LinedefActivates) udmfactivates.Add(ai.Title, ai); + + // Initialize image selectors + fronthigh.Initialize(); + frontmid.Initialize(); + frontlow.Initialize(); + backhigh.Initialize(); + backmid.Initialize(); + backlow.Initialize(); + + //mxd. Setup script numbers + scriptNumbers.Location = arg0.Location; + + foreach(ScriptItem si in General.Map.NumberedScripts) + scriptNumbers.Items.Add(si); + + scriptNumbers.DropDownWidth = Tools.GetDropDownWidth(scriptNumbers); + + if(General.Map.FormatInterface.HasCustomFields) //mxd + { + //mxd. Setup script names + scriptNames.Location = arg0.Location; + + foreach(ScriptItem nsi in General.Map.NamedScripts) + scriptNames.Items.Add(nsi); + + scriptNames.DropDownWidth = Tools.GetDropDownWidth(scriptNames); + + // Initialize custom fields editor + fieldslist.Setup("linedef"); + + // Fill universal fields list + fieldslist.ListFixedFields(General.Map.Config.LinedefFields); + + //initialize controls + frontUdmfControls = new List { pfcFrontOffsetTop, pfcFrontOffsetMid, pfcFrontOffsetBottom, pfcFrontScaleTop, pfcFrontScaleMid, pfcFrontScaleBottom }; + backUdmfControls = new List { pfcBackOffsetTop, pfcBackOffsetMid, pfcBackOffsetBottom, pfcBackScaleTop, pfcBackScaleMid, pfcBackScaleBottom }; + + // Store renderstyle keys? + if(General.Map.Config.LinedefRenderStyles.Count > 0) + { + renderstyles = new string[General.Map.Config.LinedefRenderStyles.Count]; + General.Map.Config.LinedefRenderStyles.Keys.CopyTo(renderstyles, 0); + } + else + { + renderStyle.Enabled = false; + } + + // Fill renderstyles + foreach(KeyValuePair lf in General.Map.Config.LinedefRenderStyles) + renderStyle.Items.Add(lf.Value); + + //Restore value linking + pfcFrontScaleTop.LinkValues = linkFrontTopScale; + pfcFrontScaleMid.LinkValues = linkFrontMidScale; + pfcFrontScaleBottom.LinkValues = linkFrontBottomScale; + pfcBackScaleTop.LinkValues = linkBackTopScale; + pfcBackScaleMid.LinkValues = linkBackMidScale; + pfcBackScaleBottom.LinkValues = linkBackBottomScale; + } + else + { + //Hide unused controls + tabs.TabPages.Remove(tabcustom); + + settingsGroup.Visible = false; + customfrontbutton.Visible = false; + custombackbutton.Visible = false; + labelLightFront.Visible = false; + lightFront.Visible = false; + cbLightAbsoluteFront.Visible = false; + labelLightBack.Visible = false; + lightBack.Visible = false; + cbLightAbsoluteBack.Visible = false; + udmfPropertiesFront.Visible = false; + udmfPropertiesBack.Visible = false; + } + } + + #endregion + + #region ================== Methods + + // This sets up the form to edit the given lines + public void Setup(ICollection lines) + { + preventchanges = true; + + // Keep this list + this.lines = lines; + if(lines.Count > 1) this.Text = "Edit Linedefs (" + lines.Count + ")"; + linedefProps = new List(); + + //mxd. Make undo + string undodesc = "linedef"; + if(lines.Count > 1) undodesc = lines.Count + " linedefs"; + General.Map.UndoRedo.CreateUndo("Edit " + undodesc); + + //////////////////////////////////////////////////////////////////////// + // Set all options to the first linedef properties + //////////////////////////////////////////////////////////////////////// + + // Get first line + Linedef fl = General.GetByIndex(lines, 0); + + // Flags + foreach(CheckBox c in flags.Checkboxes) + if(fl.Flags.ContainsKey(c.Tag.ToString())) c.Checked = fl.Flags[c.Tag.ToString()]; + + // UDMF Activations + foreach(CheckBox c in udmfactivates.Checkboxes) + { + LinedefActivateInfo ai = (c.Tag as LinedefActivateInfo); + if(fl.Flags.ContainsKey(ai.Key)) c.Checked = fl.Flags[ai.Key]; + } + + //mxd. UDMF Settings + if(General.Map.FormatInterface.HasCustomFields) + { + fieldslist.SetValues(fl.Fields, true); // Custom fields + renderStyle.SelectedIndex = Array.IndexOf(renderstyles, fl.Fields.GetValue("renderstyle", "translucent")); + alpha.Text = General.Clamp(fl.Fields.GetValue("alpha", 1.0f), 0f, 1f).ToString(); + lockNumber.Text = fl.Fields.GetValue("locknumber", 0).ToString(); + arg0str = fl.Fields.GetValue("arg0str", string.Empty); + haveArg0Str = !string.IsNullOrEmpty(arg0str); + } + + // Action/tags + action.Value = fl.Action; + + if(General.Map.FormatInterface.HasLinedefTag) //mxd + { + tagSelector.Setup(UniversalType.LinedefTag); + tagSelector.SetTag(fl.Tag); + } + + arg0.SetValue(fl.Args[0]); + arg1.SetValue(fl.Args[1]); + arg2.SetValue(fl.Args[2]); + arg3.SetValue(fl.Args[3]); + arg4.SetValue(fl.Args[4]); + + // Front side and back side checkboxes + frontside.Checked = (fl.Front != null); + backside.Checked = (fl.Back != null); + + // Front settings + if(fl.Front != null) + { + fronthigh.TextureName = fl.Front.HighTexture; + frontmid.TextureName = fl.Front.MiddleTexture; + frontlow.TextureName = fl.Front.LowTexture; + fronthigh.Required = fl.Front.HighRequired(); + frontmid.Required = fl.Front.MiddleRequired(); + frontlow.Required = fl.Front.LowRequired(); + frontsector.Text = fl.Front.Sector.Index.ToString(); + + //mxd + if(General.Map.FormatInterface.HasCustomFields) + { + //front settings + foreach(PairedFieldsControl pfc in frontUdmfControls) + pfc.SetValuesFrom(fl.Front.Fields, true); + + lightFront.Text = UDMFTools.GetInteger(fl.Front.Fields, "light", 0).ToString(); + cbLightAbsoluteFront.Checked = fl.Front.Fields.GetValue("lightabsolute", false); + + //flags + foreach(CheckBox c in flagsFront.Checkboxes) + if(fl.Front.Flags.ContainsKey(c.Tag.ToString())) c.Checked = fl.Front.Flags[c.Tag.ToString()]; + } + + frontTextureOffset.SetValues(fl.Front.OffsetX, fl.Front.OffsetY, true); //mxd + } + + // Back settings + if(fl.Back != null) + { + backhigh.TextureName = fl.Back.HighTexture; + backmid.TextureName = fl.Back.MiddleTexture; + backlow.TextureName = fl.Back.LowTexture; + backhigh.Required = fl.Back.HighRequired(); + backmid.Required = fl.Back.MiddleRequired(); + backlow.Required = fl.Back.LowRequired(); + backsector.Text = fl.Back.Sector.Index.ToString(); + + //mxd + if(General.Map.FormatInterface.HasCustomFields) + { + //front settings + foreach(PairedFieldsControl pfc in backUdmfControls) + pfc.SetValuesFrom(fl.Back.Fields, true); + + lightBack.Text = UDMFTools.GetInteger(fl.Back.Fields, "light", 0).ToString(); + cbLightAbsoluteBack.Checked = fl.Back.Fields.GetValue("lightabsolute", false); + + //flags + foreach(CheckBox c in flagsBack.Checkboxes) + if(fl.Back.Flags.ContainsKey(c.Tag.ToString())) c.Checked = fl.Back.Flags[c.Tag.ToString()]; + } + + backTextureOffset.SetValues(fl.Back.OffsetX, fl.Back.OffsetY, true); //mxd + } + + //////////////////////////////////////////////////////////////////////// + // Now go for all lines and change the options when a setting is different + //////////////////////////////////////////////////////////////////////// + + // Go for all lines + foreach(Linedef l in lines) + { + // Flags + foreach(CheckBox c in flags.Checkboxes) + { + if(c.CheckState == CheckState.Indeterminate) continue; //mxd + if(l.IsFlagSet(c.Tag.ToString()) != c.Checked) + { + c.ThreeState = true; + c.CheckState = CheckState.Indeterminate; + } + } + + // UDMF Activations + foreach(CheckBox c in udmfactivates.Checkboxes) + { + if(c.CheckState == CheckState.Indeterminate) continue; //mxd + + LinedefActivateInfo ai = (c.Tag as LinedefActivateInfo); + if(l.IsFlagSet(ai.Key) != c.Checked) + { + c.ThreeState = true; + c.CheckState = CheckState.Indeterminate; + } + } + + //mxd. UDMF Settings + if(General.Map.FormatInterface.HasCustomFields) + { + if(renderstyles != null) + { + if(renderStyle.SelectedIndex > -1 && renderStyle.SelectedIndex != Array.IndexOf(renderstyles, l.Fields.GetValue("renderstyle", "translucent"))) + renderStyle.SelectedIndex = -1; + } + + if(!string.IsNullOrEmpty(alpha.Text) && General.Clamp(alpha.GetResultFloat(1.0f), 0f, 1f) != l.Fields.GetValue("alpha", 1.0f)) + alpha.Text = string.Empty; + + if(!string.IsNullOrEmpty(lockNumber.Text) && lockNumber.GetResult(0) != l.Fields.GetValue("locknumber", 0)) + lockNumber.Text = string.Empty; + + if(arg0str != l.Fields.GetValue("arg0str", string.Empty)) + { + haveArg0Str = true; + arg0str = string.Empty; + } + + l.Fields.BeforeFieldsChange(); + fieldslist.SetValues(l.Fields, false); + } + + // Action/tags + if(l.Action != action.Value) action.Empty = true; + if(General.Map.FormatInterface.HasLinedefTag && l.Tag != fl.Tag) tagSelector.ClearTag(); //mxd + if(l.Args[0] != arg0.GetResult(-1)) arg0.ClearValue(); + if(l.Args[1] != arg1.GetResult(-1)) arg1.ClearValue(); + if(l.Args[2] != arg2.GetResult(-1)) arg2.ClearValue(); + if(l.Args[3] != arg3.GetResult(-1)) arg3.ClearValue(); + if(l.Args[4] != arg4.GetResult(-1)) arg4.ClearValue(); + + // Front side checkbox + if((l.Front != null) != frontside.Checked) + { + frontside.ThreeState = true; + frontside.CheckState = CheckState.Indeterminate; + frontside.AutoCheck = false; + } + + // Back side checkbox + if((l.Back != null) != backside.Checked) + { + backside.ThreeState = true; + backside.CheckState = CheckState.Indeterminate; + backside.AutoCheck = false; + } + + // Front settings + if(l.Front != null) + { + //mxd + if (fronthigh.TextureName != l.Front.HighTexture) + { + if(!fronthigh.Required && l.Front.HighRequired()) fronthigh.Required = true; + fronthigh.MultipleTextures = true; //mxd + fronthigh.TextureName = string.Empty; + } + if (frontmid.TextureName != l.Front.MiddleTexture) + { + if(!frontmid.Required && l.Front.MiddleRequired()) frontmid.Required = true; + frontmid.MultipleTextures = true; //mxd + frontmid.TextureName = string.Empty; + } + if (frontlow.TextureName != l.Front.LowTexture) + { + if(!frontlow.Required && l.Front.LowRequired()) frontlow.Required = true; + frontlow.MultipleTextures = true; //mxd + frontlow.TextureName = string.Empty; + } + if(frontsector.Text != l.Front.Sector.Index.ToString()) frontsector.Text = string.Empty; + + //mxd + if(General.Map.FormatInterface.HasCustomFields) + { + foreach(PairedFieldsControl pfc in frontUdmfControls) + pfc.SetValuesFrom(l.Front.Fields, false); + + if(!string.IsNullOrEmpty(lightFront.Text)) + { + int light = UDMFTools.GetInteger(l.Front.Fields, "light", 0); + if(light != lightFront.GetResult(light)) lightFront.Text = string.Empty; + } + + if(l.Front.Fields.GetValue("lightabsolute", false) != cbLightAbsoluteFront.Checked) + { + cbLightAbsoluteFront.ThreeState = true; + cbLightAbsoluteFront.CheckState = CheckState.Indeterminate; + } + + //flags + foreach(CheckBox c in flagsFront.Checkboxes) + { + if(c.CheckState == CheckState.Indeterminate) continue; + if(l.Front.IsFlagSet(c.Tag.ToString()) != c.Checked) + { + c.ThreeState = true; + c.CheckState = CheckState.Indeterminate; + } + } + } + + l.Front.Fields.BeforeFieldsChange(); //mxd + frontTextureOffset.SetValues(l.Front.OffsetX, l.Front.OffsetY, false); //mxd + } + + // Back settings + if(l.Back != null) + { + //mxd + if (backhigh.TextureName != l.Back.HighTexture) + { + if(!backhigh.Required && l.Back.HighRequired()) backhigh.Required = true; + backhigh.MultipleTextures = true; //mxd + backhigh.TextureName = string.Empty; + } + if (backmid.TextureName != l.Back.MiddleTexture) + { + if(!backmid.Required && l.Back.MiddleRequired()) backmid.Required = true; + backmid.MultipleTextures = true; //mxd + backmid.TextureName = string.Empty; + } + if (backlow.TextureName != l.Back.LowTexture) { + if(!backlow.Required && l.Back.LowRequired()) backlow.Required = true; + backlow.MultipleTextures = true; //mxd + backlow.TextureName = string.Empty; + } + if(backsector.Text != l.Back.Sector.Index.ToString()) backsector.Text = string.Empty; + + //mxd + if(General.Map.FormatInterface.HasCustomFields) + { + foreach(PairedFieldsControl pfc in backUdmfControls) + pfc.SetValuesFrom(l.Back.Fields, false); + + if(!string.IsNullOrEmpty(lightBack.Text)) + { + int light = UDMFTools.GetInteger(l.Back.Fields, "light", 0); + if(light != lightBack.GetResult(light)) lightBack.Text = string.Empty; + } + + if(l.Back.Fields.GetValue("lightabsolute", false) != cbLightAbsoluteBack.Checked) + { + cbLightAbsoluteBack.ThreeState = true; + cbLightAbsoluteBack.CheckState = CheckState.Indeterminate; + } + + //flags + foreach(CheckBox c in flagsBack.Checkboxes) + { + if(c.CheckState == CheckState.Indeterminate) continue; + if(l.Back.IsFlagSet(c.Tag.ToString()) != c.Checked) + { + c.ThreeState = true; + c.CheckState = CheckState.Indeterminate; + } + } + } + + l.Back.Fields.BeforeFieldsChange(); //mxd + backTextureOffset.SetValues(l.Back.OffsetX, l.Back.OffsetY, false); //mxd + } + + //mxd + linedefProps.Add(new LinedefProperties(l)); + } + + // Refresh controls so that they show their image + backhigh.Refresh(); + backmid.Refresh(); + backlow.Refresh(); + fronthigh.Refresh(); + frontmid.Refresh(); + frontlow.Refresh(); + + preventchanges = false; + + updateScriptControls(); //mxd + + //mxd. Set intial script-related values, if required + if(Array.IndexOf(GZBuilder.GZGeneral.ACS_SPECIALS, action.Value) != -1) + { + if(haveArg0Str) + { + scriptNames.Text = arg0str; + arg0label.Text = "Script Name:"; + } + else + { + int a0 = arg0.GetResult(0); + if(a0 > 0) + { + for(int i = 0; i < General.Map.NumberedScripts.Count; i++) + { + if(General.Map.NumberedScripts[i].Index == a0) + { + scriptNumbers.SelectedIndex = i; + break; + } + } + + if(scriptNumbers.SelectedIndex == -1) + { + scriptNumbers.Items.Add(new ScriptItem(a0, "Script " + a0)); + scriptNumbers.SelectedIndex = scriptNumbers.Items.Count - 1; + } + } + else + { + scriptNumbers.Text = arg0.Text; + } + } + } + else + { + scriptNumbers.Text = "0"; + } + } + + //mxd + private void updateScriptControls() + { + if(Array.IndexOf(GZBuilder.GZGeneral.ACS_SPECIALS, action.Value) != -1) + { + bool showNamedScripts = General.Map.UDMF && haveArg0Str; + cbArgStr.Visible = General.Map.UDMF; + cbArgStr.Checked = showNamedScripts; + scriptNames.Visible = showNamedScripts; + scriptNumbers.Visible = !showNamedScripts; + } + else + { + cbArgStr.Visible = false; + scriptNames.Visible = false; + scriptNumbers.Visible = false; + cbArgStr.Checked = false; + } + } + + #endregion + + #region ================== Events + + // Apply clicked + private void apply_Click(object sender, EventArgs e) + { + Sector s; + int index; + + // Verify the tag + if(General.Map.FormatInterface.HasLinedefTag) + { + tagSelector.ValidateTag(); //mxd + if(((tagSelector.GetTag(0) < General.Map.FormatInterface.MinTag) || (tagSelector.GetTag(0) > General.Map.FormatInterface.MaxTag))) { + General.ShowWarningMessage("Linedef tag must be between " + General.Map.FormatInterface.MinTag + " and " + General.Map.FormatInterface.MaxTag + ".", MessageBoxButtons.OK); + return; + } + } + + // Verify the action + if((action.Value < General.Map.FormatInterface.MinAction) || (action.Value > General.Map.FormatInterface.MaxAction)) + { + General.ShowWarningMessage("Linedef action must be between " + General.Map.FormatInterface.MinAction + " and " + General.Map.FormatInterface.MaxAction + ".", MessageBoxButtons.OK); + return; + } + + //mxd + bool hasAcs = !action.Empty && Array.IndexOf(GZBuilder.GZGeneral.ACS_SPECIALS, action.Value) != -1; + int lockNum = lockNumber.GetResult(0); + + // Go for all the lines + int tagoffset = 0; //mxd + foreach(Linedef l in lines) + { + // UDMF activations + foreach(CheckBox c in udmfactivates.Checkboxes) + { + LinedefActivateInfo ai = (c.Tag as LinedefActivateInfo); + if(c.CheckState == CheckState.Checked) l.SetFlag(ai.Key, true); + else if(c.CheckState == CheckState.Unchecked) l.SetFlag(ai.Key, false); + } + + // Action/tags + l.Tag = General.Clamp(tagSelector.GetSmartTag(l.Tag, tagoffset++), General.Map.FormatInterface.MinTag, General.Map.FormatInterface.MaxTag); //mxd + if(!action.Empty) + { + l.Action = action.Value; + + //mxd. Script name/number handling + if(hasAcs) + { + //apply script number + if(!cbArgStr.Checked) + { + if(!string.IsNullOrEmpty(scriptNumbers.Text)) + { + if(scriptNumbers.SelectedItem != null) + l.Args[0] = ((ScriptItem)scriptNumbers.SelectedItem).Index; + else if(!int.TryParse(scriptNumbers.Text.Trim(), out l.Args[0])) + l.Args[0] = 0; + + if(l.Fields.ContainsKey("arg0str")) l.Fields.Remove("arg0str"); + } + } + else //apply arg0str + { + if(!string.IsNullOrEmpty(scriptNames.Text)) + l.Fields["arg0str"] = new UniValue(UniversalType.String, scriptNames.Text); + } + } + else + { + l.Args[0] = arg0.GetResult(l.Args[0]); + if(l.Fields.ContainsKey("arg0str")) l.Fields.Remove("arg0str"); + } + } + else + { + l.Args[0] = arg0.GetResult(l.Args[0]); + } + + l.Args[1] = arg1.GetResult(l.Args[1]); + l.Args[2] = arg2.GetResult(l.Args[2]); + l.Args[3] = arg3.GetResult(l.Args[3]); + l.Args[4] = arg4.GetResult(l.Args[4]); + + // Remove front side? + if((l.Front != null) && (frontside.CheckState == CheckState.Unchecked)) + { + l.Front.Dispose(); + } + // Create or modify front side? + else if(frontside.CheckState == CheckState.Checked) + { + // Make sure we have a valid sector (make a new one if needed) + if(l.Front != null) index = l.Front.Sector.Index; else index = -1; + index = frontsector.GetResult(index); + if((index > -1) && (index < General.Map.Map.Sectors.Count)) + { + s = General.Map.Map.GetSectorByIndex(index); + if(s == null) s = General.Map.Map.CreateSector(); + + if(s != null) + { + // Create new sidedef? + if(l.Front == null) General.Map.Map.CreateSidedef(l, true, s); + + // Change sector? + if(l.Front != null && l.Front.Sector != s) l.Front.SetSector(s); + } + } + } + + // Remove back side? + if((l.Back != null) && (backside.CheckState == CheckState.Unchecked)) + { + l.Back.Dispose(); + } + // Create or modify back side? + else if(backside.CheckState == CheckState.Checked) + { + // Make sure we have a valid sector (make a new one if needed) + if(l.Back != null) index = l.Back.Sector.Index; else index = -1; + index = backsector.GetResult(index); + if((index > -1) && (index < General.Map.Map.Sectors.Count)) + { + s = General.Map.Map.GetSectorByIndex(index); + if(s == null) s = General.Map.Map.CreateSector(); + + if(s != null) + { + // Create new sidedef? + if(l.Back == null) General.Map.Map.CreateSidedef(l, false, s); + + // Change sector? + if(l.Back != null && l.Back.Sector != s) l.Back.SetSector(s); + } + } + } + + //mxd. UDMF Settings + if(General.Map.FormatInterface.HasCustomFields) + { + fieldslist.Apply(l.Fields); + UDMFTools.SetInteger(l.Fields, "locknumber", lockNum, 0); + } + } + + //mxd. Store value linking + linkFrontTopScale = pfcFrontScaleTop.LinkValues; + linkFrontMidScale = pfcFrontScaleMid.LinkValues; + linkFrontBottomScale = pfcFrontScaleBottom.LinkValues; + linkBackTopScale = pfcBackScaleTop.LinkValues; + linkBackMidScale = pfcBackScaleMid.LinkValues; + linkBackBottomScale = pfcBackScaleBottom.LinkValues; + + // Update the used textures + General.Map.Data.UpdateUsedTextures(); + + // Done + General.Map.IsChanged = true; + if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty); //mxd + this.DialogResult = DialogResult.OK; + this.Close(); + } + + // Cancel clicked + private void cancel_Click(object sender, EventArgs e) + { + //mxd. Let's pretend nothing of this really happened... + General.Map.UndoRedo.WithdrawUndo(); + + // Be gone + this.DialogResult = DialogResult.Cancel; + this.Close(); + } + + // Front side (un)checked + private void frontside_CheckStateChanged(object sender, EventArgs e) + { + // Enable/disable panel + // NOTE: Also enabled when checkbox is grayed! + frontgroup.Enabled = (frontside.CheckState != CheckState.Unchecked); + } + + // Back side (un)checked + private void backside_CheckStateChanged(object sender, EventArgs e) + { + // Enable/disable panel + // NOTE: Also enabled when checkbox is grayed! + backgroup.Enabled = (backside.CheckState != CheckState.Unchecked); + } + + // Action changes + private void action_ValueChanges(object sender, EventArgs e) + { + int showaction = 0; + + // Only when line type is known + if(General.Map.Config.LinedefActions.ContainsKey(action.Value)) showaction = action.Value; + + // Change the argument descriptions + arg0label.Text = General.Map.Config.LinedefActions[showaction].Args[0].Title + ":"; + arg1label.Text = General.Map.Config.LinedefActions[showaction].Args[1].Title + ":"; + arg2label.Text = General.Map.Config.LinedefActions[showaction].Args[2].Title + ":"; + arg3label.Text = General.Map.Config.LinedefActions[showaction].Args[3].Title + ":"; + arg4label.Text = General.Map.Config.LinedefActions[showaction].Args[4].Title + ":"; + arg0label.Enabled = General.Map.Config.LinedefActions[showaction].Args[0].Used; + arg1label.Enabled = General.Map.Config.LinedefActions[showaction].Args[1].Used; + arg2label.Enabled = General.Map.Config.LinedefActions[showaction].Args[2].Used; + arg3label.Enabled = General.Map.Config.LinedefActions[showaction].Args[3].Used; + arg4label.Enabled = General.Map.Config.LinedefActions[showaction].Args[4].Used; + arg0.ForeColor = (arg0label.Enabled ? SystemColors.WindowText : SystemColors.GrayText); + arg1.ForeColor = (arg1label.Enabled ? SystemColors.WindowText : SystemColors.GrayText); + arg2.ForeColor = (arg2label.Enabled ? SystemColors.WindowText : SystemColors.GrayText); + arg3.ForeColor = (arg3label.Enabled ? SystemColors.WindowText : SystemColors.GrayText); + arg4.ForeColor = (arg4label.Enabled ? SystemColors.WindowText : SystemColors.GrayText); + arg0.Setup(General.Map.Config.LinedefActions[showaction].Args[0]); + arg1.Setup(General.Map.Config.LinedefActions[showaction].Args[1]); + arg2.Setup(General.Map.Config.LinedefActions[showaction].Args[2]); + arg3.Setup(General.Map.Config.LinedefActions[showaction].Args[3]); + arg4.Setup(General.Map.Config.LinedefActions[showaction].Args[4]); + + // mxd. Apply action's default arguments + if(!preventchanges) + { + if(showaction != 0 && General.Map.Config.LinedefActions.ContainsKey(showaction)) + { + arg0.SetDefaultValue(); + arg1.SetDefaultValue(); + arg2.SetDefaultValue(); + arg3.SetDefaultValue(); + arg4.SetDefaultValue(); + } + else //or set them to 0 + { + arg0.SetValue(0); + arg1.SetValue(0); + arg2.SetValue(0); + arg3.SetValue(0); + arg4.SetValue(0); + } + } + + //mxd. Display a warning if we have an action and no activation flags + if (action.Value != 0) + { + bool haveactivationflag = false; + foreach (CheckBox c in udmfactivates.Checkboxes) + { + if (c.CheckState != CheckState.Unchecked) + { + haveactivationflag = true; + break; + } + } + + //TODO: check if action actually requires activation :) + missingactivation.Visible = !haveactivationflag; + activationGroup.ForeColor = (!haveactivationflag ? Color.DarkRed : SystemColors.ControlText); + } + else + { + missingactivation.Visible = false; + activationGroup.ForeColor = SystemColors.ControlText; + } + + if(!preventchanges) updateScriptControls(); //mxd + } + + // Browse Action clicked + private void browseaction_Click(object sender, EventArgs e) + { + action.Value = ActionBrowserForm.BrowseAction(this, action.Value); + } + + //mxd + private void cbArgStr_CheckedChanged(object sender, EventArgs e) + { + if(!cbArgStr.Visible) return; + scriptNames.Visible = cbArgStr.Checked; + scriptNumbers.Visible = !cbArgStr.Checked; + arg0label.Text = cbArgStr.Checked ? "Script Name:" : "Script Number:"; + } + + //mxd + private void tabcustom_MouseEnter(object sender, EventArgs e) + { + fieldslist.Focus(); + } + + //mxd. Store window location + private void LinedefEditForm_FormClosing(object sender, FormClosingEventArgs e) + { + location = this.Location; + activeTab = tabs.SelectedIndex; + activeFrontTab = udmfPropertiesFront.SelectedIndex; + activeBackTab = udmfPropertiesBack.SelectedIndex; + } + + // Help! + private void LinedefEditForm_HelpRequested(object sender, HelpEventArgs hlpevent) + { + General.ShowHelp("w_linedefedit.html"); + hlpevent.Handled = true; + } + + #endregion + + #region ================== mxd. Realtime events (linedef) + + private void cbRenderStyle_SelectedIndexChanged(object sender, EventArgs e) + { + if(preventchanges) return; + + //update values + foreach(Linedef l in lines) + UDMFTools.SetString(l.Fields, "renderstyle", renderstyles[renderStyle.SelectedIndex], "translucent"); + + General.Map.IsChanged = true; + if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty); + } + + private void alpha_WhenTextChanged(object sender, EventArgs e) + { + if(preventchanges) return; + int i = 0; + + //restore values + if(string.IsNullOrEmpty(alpha.Text)) + { + foreach(Linedef l in lines) + UDMFTools.SetFloat(l.Fields, "alpha", linedefProps[i++].Alpha, 1.0f); + } + else //update values + { + foreach(Linedef l in lines) + { + float value = General.Clamp(alpha.GetResultFloat(l.Fields.GetValue("alpha", 1.0f)), 0f, 1.0f); + UDMFTools.SetFloat(l.Fields, "alpha", value, 1.0f); + } + } + + General.Map.IsChanged = true; + if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty); + } + + private void flags_OnValueChanged(object sender, EventArgs e) + { + if(preventchanges) return; + int i = 0; + + foreach(Linedef l in lines) + { + // Apply all flags + foreach(CheckBox c in flags.Checkboxes) + { + if(c.CheckState == CheckState.Checked) + l.SetFlag(c.Tag.ToString(), true); + else if(c.CheckState == CheckState.Unchecked) + l.SetFlag(c.Tag.ToString(), false); + else if(linedefProps[i].Flags.ContainsKey(c.Tag.ToString())) + l.SetFlag(c.Tag.ToString(), linedefProps[i].Flags[c.Tag.ToString()]); + else //linedefs created in the editor have empty Flags by default + l.SetFlag(c.Tag.ToString(), false); + } + + i++; + } + + General.Map.IsChanged = true; + if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty); + } + + #endregion + + #region Reltime events (sides) + + #region Custom fields changed + + // Custom fields on front sides + private void customfrontbutton_Click(object sender, EventArgs e) + { + // Make collection of front sides + List sides = new List(lines.Count); + foreach(Linedef l in lines) if(l.Front != null) sides.Add(l.Front); + + if(!CustomFieldsForm.ShowDialog(this, "Front side custom fields", "sidedef", sides, General.Map.Config.SidedefFields)) return; + + //Apply values + Sidedef fs = General.GetByIndex(sides, 0) as Sidedef; + + //..to the first side + foreach(PairedFieldsControl pfc in frontUdmfControls) + pfc.SetValuesFrom(fs.Fields, true); + + lightFront.Text = UDMFTools.GetInteger(fs.Fields, "light", 0).ToString(); + cbLightAbsoluteFront.ThreeState = false; + cbLightAbsoluteFront.Checked = fs.Fields.GetValue("lightabsolute", false); + + //flags + foreach(CheckBox c in flagsFront.Checkboxes) + if(fs.Flags.ContainsKey(c.Tag.ToString())) c.Checked = fs.Flags[c.Tag.ToString()]; + + //..then to all of them + foreach(Sidedef s in sides) + { + foreach(PairedFieldsControl pfc in frontUdmfControls) + pfc.SetValuesFrom(s.Fields, false); + + if(!string.IsNullOrEmpty(lightFront.Text)) + { + int light = UDMFTools.GetInteger(s.Fields, "light", 0); + if(light != lightFront.GetResult(light)) lightFront.Text = string.Empty; + } + + if(s.Fields.GetValue("lightabsolute", false) != cbLightAbsoluteFront.Checked) + { + cbLightAbsoluteFront.ThreeState = true; + cbLightAbsoluteFront.CheckState = CheckState.Indeterminate; + } + + //flags + foreach(CheckBox c in flagsFront.Checkboxes) + { + if(c.CheckState == CheckState.Indeterminate) continue; + + if(s.Flags.ContainsKey(c.Tag.ToString())) + { + if(s.Flags[c.Tag.ToString()] != c.Checked) + { + c.ThreeState = true; + c.CheckState = CheckState.Indeterminate; + } + } + } + } + + General.Map.IsChanged = true; + if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty); + } + + // Custom fields on back sides + private void custombackbutton_Click(object sender, EventArgs e) + { + // Make collection of back sides + List sides = new List(lines.Count); + foreach(Linedef l in lines) if(l.Back != null) sides.Add(l.Back); + + // Edit these + if(!CustomFieldsForm.ShowDialog(this, "Back side custom fields", "sidedef", sides, General.Map.Config.SidedefFields)) return; + + //Apply values + Sidedef fs = General.GetByIndex(sides, 0) as Sidedef; + + //..to the first side + foreach(PairedFieldsControl pfc in backUdmfControls) + pfc.SetValuesFrom(fs.Fields, true); + + lightBack.Text = UDMFTools.GetInteger(fs.Fields, "light", 0).ToString(); + cbLightAbsoluteBack.ThreeState = false; + cbLightAbsoluteBack.Checked = fs.Fields.GetValue("lightabsolute", false); + + //flags + foreach(CheckBox c in flagsBack.Checkboxes) + if(fs.Flags.ContainsKey(c.Tag.ToString())) c.Checked = fs.Flags[c.Tag.ToString()]; + + //..then to all of them + foreach(Sidedef s in sides) + { + foreach(PairedFieldsControl pfc in backUdmfControls) + pfc.SetValuesFrom(s.Fields, false); + + if(!string.IsNullOrEmpty(lightBack.Text)) + { + int light = UDMFTools.GetInteger(s.Fields, "light", 0); + if(light != lightBack.GetResult(light)) lightBack.Text = string.Empty; + } + + if(s.Fields.GetValue("lightabsolute", false) != cbLightAbsoluteBack.Checked) + { + cbLightAbsoluteBack.ThreeState = true; + cbLightAbsoluteBack.CheckState = CheckState.Indeterminate; + } + + //flags + foreach(CheckBox c in flagsBack.Checkboxes) + { + if(c.CheckState == CheckState.Indeterminate) continue; + + if(s.Flags.ContainsKey(c.Tag.ToString()) && s.Flags[c.Tag.ToString()] != c.Checked) + { + c.ThreeState = true; + c.CheckState = CheckState.Indeterminate; + } + } + } + + General.Map.IsChanged = true; + if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty); + } + + #endregion + + #region Texture changed + + private void fronthigh_OnValueChanged(object sender, EventArgs e) + { + if(preventchanges) return; + + //restore values + if(string.IsNullOrEmpty(fronthigh.TextureName)) + { + int i = 0; + + foreach(Linedef l in lines) + { + if(l.Front != null) l.Front.SetTextureHigh(linedefProps[i].Front != null ? linedefProps[i].Front.TextureTop : "-"); + i++; + } + } + else //update values + { + foreach(Linedef l in lines) + if(l.Front != null) l.Front.SetTextureHigh(fronthigh.GetResult(l.Front.HighTexture)); + } + + // Update the used textures + General.Map.Data.UpdateUsedTextures(); + + General.Map.IsChanged = true; + if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty); + } + + private void frontmid_OnValueChanged(object sender, EventArgs e) + { + if(preventchanges) return; + + //restore values + if(string.IsNullOrEmpty(frontmid.TextureName)) + { + int i = 0; + + foreach(Linedef l in lines) + { + if(l.Front != null) l.Front.SetTextureMid(linedefProps[i].Front != null ? linedefProps[i].Front.TextureMid : "-"); + i++; + } + } + else //update values + { + foreach(Linedef l in lines) + if(l.Front != null) l.Front.SetTextureMid(frontmid.GetResult(l.Front.MiddleTexture)); + } + + // Update the used textures + General.Map.Data.UpdateUsedTextures(); + + General.Map.IsChanged = true; + if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty); + } + + private void frontlow_OnValueChanged(object sender, EventArgs e) + { + if(preventchanges) return; + + //restore values + if(string.IsNullOrEmpty(frontlow.TextureName)) + { + int i = 0; + + foreach(Linedef l in lines) + { + if(l.Front != null) l.Front.SetTextureLow(linedefProps[i].Front != null ? linedefProps[i].Front.TextureLow : "-"); + i++; + } + } + else //update values + { + foreach(Linedef l in lines) + if(l.Front != null) l.Front.SetTextureLow(frontlow.GetResult(l.Front.LowTexture)); + } + + // Update the used textures + General.Map.Data.UpdateUsedTextures(); + + General.Map.IsChanged = true; + if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty); + } + + private void backhigh_OnValueChanged(object sender, EventArgs e) + { + if(preventchanges) return; + + //restore values + if(string.IsNullOrEmpty(backhigh.TextureName)) + { + int i = 0; + + foreach(Linedef l in lines) + { + if(l.Back != null) l.Back.SetTextureHigh(linedefProps[i].Back != null ? linedefProps[i].Back.TextureTop : "-"); + i++; + } + } + else //update values + { + foreach(Linedef l in lines) + if(l.Back != null) l.Back.SetTextureHigh(backhigh.GetResult(l.Back.HighTexture)); + } + + // Update the used textures + General.Map.Data.UpdateUsedTextures(); + + General.Map.IsChanged = true; + if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty); + } + + private void backmid_OnValueChanged(object sender, EventArgs e) { + if(preventchanges) return; + + //restore values + if(string.IsNullOrEmpty(backmid.TextureName)) + { + int i = 0; + + foreach(Linedef l in lines) + { + if(l.Back != null) l.Back.SetTextureMid(linedefProps[i].Back != null ? linedefProps[i].Back.TextureMid : "-"); + i++; + } + } + else //update values + { + foreach(Linedef l in lines) + if(l.Back != null) l.Back.SetTextureMid(backmid.GetResult(l.Back.MiddleTexture)); + } + + // Update the used textures + General.Map.Data.UpdateUsedTextures(); + + General.Map.IsChanged = true; + if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty); + } + + private void backlow_OnValueChanged(object sender, EventArgs e) { + if(preventchanges) return; + + //restore values + if(string.IsNullOrEmpty(backlow.TextureName)) + { + int i = 0; + + foreach(Linedef l in lines) + { + if(l.Back != null) l.Back.SetTextureLow(linedefProps[i].Back != null ? linedefProps[i].Back.TextureLow : "-"); + i++; + } + } + else //update values + { + foreach(Linedef l in lines) + if(l.Back != null) l.Back.SetTextureLow(backlow.GetResult(l.Back.LowTexture)); + } + + // Update the used textures + General.Map.Data.UpdateUsedTextures(); + + General.Map.IsChanged = true; + if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty); + } + + #endregion + + #region Brightness changed + + private void lightFront_WhenTextChanged(object sender, EventArgs e) + { + if(preventchanges) return; + int i = 0; + + //restore values + if(string.IsNullOrEmpty(lightFront.Text)) + { + foreach(Linedef l in lines) + { + if(l.Front != null) + UDMFTools.SetInteger(l.Front.Fields, "light", (linedefProps[i].Front != null ? linedefProps[i].Front.Brightness : 0), 0); + i++; + } + } + else //update values + { + foreach(Linedef l in lines) + { + if(l.Front != null) + { + bool absolute = false; + if(cbLightAbsoluteFront.CheckState == CheckState.Indeterminate) + { + absolute = l.Front.Fields.GetValue("lightabsolute", false); + } + else if(cbLightAbsoluteFront.CheckState == CheckState.Checked) + { + absolute = true; + } + + int value = General.Clamp(lightFront.GetResult((linedefProps[i].Front != null ? linedefProps[i].Front.Brightness : 0)), (absolute ? 0 : -255), 255); + UDMFTools.SetInteger(l.Front.Fields, "light", value, 0); + } + i++; + } + } + + General.Map.IsChanged = true; + if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty); + } + + private void lightBack_WhenTextChanged(object sender, EventArgs e) + { + if(preventchanges) return; + int i = 0; + + //restore values + if(string.IsNullOrEmpty(lightBack.Text)) + { + foreach(Linedef l in lines) + { + if(l.Back != null) + UDMFTools.SetInteger(l.Back.Fields, "light", (linedefProps[i].Back != null ? linedefProps[i].Back.Brightness : 0), 0); + i++; + } + } + else //update values + { + foreach(Linedef l in lines) + { + if(l.Back != null) + { + bool absolute = false; + if(cbLightAbsoluteBack.CheckState == CheckState.Indeterminate) + { + absolute = l.Back.Fields.GetValue("lightabsolute", false); + } + else if(cbLightAbsoluteBack.CheckState == CheckState.Checked) + { + absolute = true; + } + + int value = General.Clamp(lightBack.GetResult((linedefProps[i].Back != null ? linedefProps[i].Back.Brightness : 0)), (absolute ? 0 : -255), 255); + UDMFTools.SetInteger(l.Back.Fields, "light", value, 0); + } + i++; + } + } + + General.Map.IsChanged = true; + if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty); + } + + private void cbLightAbsoluteFront_CheckedChanged(object sender, EventArgs e) + { + if(preventchanges) return; + + if(cbLightAbsoluteFront.Checked) + { + foreach(Linedef l in lines) + { + if(l.Front == null) continue; + l.Front.Fields["lightabsolute"] = new UniValue(UniversalType.Boolean, true); + } + } + else if(cbLightAbsoluteFront.CheckState == CheckState.Indeterminate) + { + int i = 0; + + foreach(Linedef l in lines) + { + if(l.Front != null) + { + if(linedefProps[i].Front != null && linedefProps[i].Front.AbsoluteBrightness) + { + l.Front.Fields["lightabsolute"] = new UniValue(UniversalType.Boolean, true); + } + else if(l.Front.Fields.ContainsKey("lightabsolute")) + { + l.Front.Fields.Remove("lightabsolute"); + } + } + i++; + } + } + else + { + foreach(Linedef l in lines) + { + if(l.Front == null) continue; + if(l.Front.Fields.ContainsKey("lightabsolute")) l.Front.Fields.Remove("lightabsolute"); + } + } + + General.Map.IsChanged = true; + if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty); + } + + private void cbLightAbsoluteBack_CheckedChanged(object sender, EventArgs e) + { + if(preventchanges) return; + + if(cbLightAbsoluteBack.Checked) + { + foreach(Linedef l in lines) + { + if(l.Back == null) continue; + l.Back.Fields["lightabsolute"] = new UniValue(UniversalType.Boolean, true); + } + } + else if(cbLightAbsoluteBack.CheckState == CheckState.Indeterminate) + { + int i = 0; + + foreach(Linedef l in lines) + { + if(l.Back != null) + { + if(linedefProps[i].Back != null && linedefProps[i].Back.AbsoluteBrightness) + { + l.Back.Fields["lightabsolute"] = new UniValue(UniversalType.Boolean, true); + } + else if(l.Back.Fields.ContainsKey("lightabsolute")) + { + l.Back.Fields.Remove("lightabsolute"); + } + } + i++; + } + } + else + { + foreach(Linedef l in lines) + { + if(l.Back == null) continue; + if(l.Back.Fields.ContainsKey("lightabsolute")) l.Back.Fields.Remove("lightabsolute"); + } + } + + General.Map.IsChanged = true; + if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty); + } + + #endregion + + #region Global texture offsets changed + + private void frontTextureOffset_OnValuesChanged(object sender, EventArgs e) + { + if(preventchanges) return; + + int i = 0; + + foreach(Linedef l in lines) + { + if(l.Front != null) + { + if(linedefProps[i].Front != null) + { + l.Front.OffsetX = frontTextureOffset.GetValue1(linedefProps[i].Front.OffsetX); + l.Front.OffsetY = frontTextureOffset.GetValue2(linedefProps[i].Front.OffsetY); + } + else + { + l.Front.OffsetX = frontTextureOffset.GetValue1(0); + l.Front.OffsetY = frontTextureOffset.GetValue2(0); + } + } + + i++; + } + + General.Map.IsChanged = true; + if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty); + } + + private void backTextureOffset_OnValuesChanged(object sender, EventArgs e) + { + if(preventchanges) return; + + int i = 0; + + foreach(Linedef l in lines) + { + if(l.Back != null) + { + if(linedefProps[i].Back != null) + { + l.Back.OffsetX = backTextureOffset.GetValue1(linedefProps[i].Back.OffsetX); + l.Back.OffsetY = backTextureOffset.GetValue2(linedefProps[i].Back.OffsetY); + } + else + { + l.Back.OffsetX = backTextureOffset.GetValue1(0); + l.Back.OffsetY = backTextureOffset.GetValue2(0); + } + } + + i++; + } + + General.Map.IsChanged = true; + if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty); + } + + #endregion + + #region Texture offsets changed + + private void pfcFrontOffsetTop_OnValuesChanged(object sender, EventArgs e) + { + if(preventchanges) return; + int i = 0; + + foreach(Linedef l in lines) + { + if(l.Front != null) + { + float oldX = linedefProps[i].Front != null ? linedefProps[i].Front.OffsetTopX : 0f; + float oldY = linedefProps[i].Front != null ? linedefProps[i].Front.OffsetTopY : 0f; + pfcFrontOffsetTop.ApplyTo(l.Front.Fields, General.Map.FormatInterface.MinTextureOffset, General.Map.FormatInterface.MaxTextureOffset, oldX, oldY); + } + i++; + } + + General.Map.IsChanged = true; + if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty); + } + + private void pfcFrontOffsetMid_OnValuesChanged(object sender, EventArgs e) + { + if(preventchanges) return; + int i = 0; + + foreach(Linedef l in lines) + { + if(l.Front != null) + { + float oldX = linedefProps[i].Front != null ? linedefProps[i].Front.OffsetMidX : 0f; + float oldY = linedefProps[i].Front != null ? linedefProps[i].Front.OffsetMidY : 0f; + pfcFrontOffsetMid.ApplyTo(l.Front.Fields, General.Map.FormatInterface.MinTextureOffset, General.Map.FormatInterface.MaxTextureOffset, oldX, oldY); + } + + i++; + } + + General.Map.IsChanged = true; + if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty); + } + + private void pfcFrontOffsetBottom_OnValuesChanged(object sender, EventArgs e) + { + if(preventchanges) return; + int i = 0; + + foreach(Linedef l in lines) + { + if(l.Front != null) + { + float oldX = linedefProps[i].Front != null ? linedefProps[i].Front.OffsetBottomX : 0f; + float oldY = linedefProps[i].Front != null ? linedefProps[i].Front.OffsetBottomY : 0f; + pfcFrontOffsetBottom.ApplyTo(l.Front.Fields, General.Map.FormatInterface.MinTextureOffset, General.Map.FormatInterface.MaxTextureOffset, oldX, oldY); + } + + i++; + } + + General.Map.IsChanged = true; + if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty); + } + + private void pfcBackOffsetTop_OnValuesChanged(object sender, EventArgs e) + { + if(preventchanges) return; + int i = 0; + + foreach(Linedef l in lines) + { + if(l.Back != null) + { + float oldX = linedefProps[i].Back != null ? linedefProps[i].Back.OffsetTopX : 0f; + float oldY = linedefProps[i].Back != null ? linedefProps[i].Back.OffsetTopY : 0f; + pfcBackOffsetTop.ApplyTo(l.Back.Fields, General.Map.FormatInterface.MinTextureOffset, General.Map.FormatInterface.MaxTextureOffset, oldX, oldY); + } + + i++; + } + + General.Map.IsChanged = true; + if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty); + } + + private void pfcBackOffsetMid_OnValuesChanged(object sender, EventArgs e) + { + if(preventchanges) return; + int i = 0; + + foreach(Linedef l in lines) + { + if(l.Back != null) + { + float oldX = linedefProps[i].Back != null ? linedefProps[i].Back.OffsetMidX : 0f; + float oldY = linedefProps[i].Back != null ? linedefProps[i].Back.OffsetMidY : 0f; + pfcBackOffsetMid.ApplyTo(l.Back.Fields, General.Map.FormatInterface.MinTextureOffset, General.Map.FormatInterface.MaxTextureOffset, oldX, oldY); + } + + i++; + } + + General.Map.IsChanged = true; + if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty); + } + + private void pfcBackOffsetBottom_OnValuesChanged(object sender, EventArgs e) + { + if(preventchanges) return; + int i = 0; + + foreach(Linedef l in lines) + { + if(l.Back != null) + { + float oldX = linedefProps[i].Back != null ? linedefProps[i].Back.OffsetBottomX : 0f; + float oldY = linedefProps[i].Back != null ? linedefProps[i].Back.OffsetBottomY : 0f; + pfcBackOffsetBottom.ApplyTo(l.Back.Fields, General.Map.FormatInterface.MinTextureOffset, General.Map.FormatInterface.MaxTextureOffset, oldX, oldY); + } + + i++; + } + + General.Map.IsChanged = true; + if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty); + } + + #endregion + + #region Scale changed + + private void pfcFrontScaleTop_OnValuesChanged(object sender, EventArgs e) + { + if(preventchanges) return; + int i = 0; + + foreach(Linedef l in lines) + { + if(l.Front != null) + { + float oldX = linedefProps[i].Front != null ? linedefProps[i].Front.ScaleTopX : 1.0f; + float oldY = linedefProps[i].Front != null ? linedefProps[i].Front.ScaleTopY : 1.0f; + pfcFrontScaleTop.ApplyTo(l.Front.Fields, General.Map.FormatInterface.MinTextureOffset, General.Map.FormatInterface.MaxTextureOffset, oldX, oldY); + } + + i++; + } + + General.Map.IsChanged = true; + if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty); + } + + private void pfcFrontScaleMid_OnValuesChanged(object sender, EventArgs e) + { + if(preventchanges) return; + int i = 0; + + foreach(Linedef l in lines) + { + if(l.Front != null) + { + float oldX = linedefProps[i].Front != null ? linedefProps[i].Front.ScaleMidX : 1.0f; + float oldY = linedefProps[i].Front != null ? linedefProps[i].Front.ScaleMidY : 1.0f; + pfcFrontScaleMid.ApplyTo(l.Front.Fields, General.Map.FormatInterface.MinTextureOffset, General.Map.FormatInterface.MaxTextureOffset, oldX, oldY); + } + + i++; + } + + General.Map.IsChanged = true; + if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty); + } + + private void pfcFrontScaleBottom_OnValuesChanged(object sender, EventArgs e) + { + if(preventchanges) return; + int i = 0; + + foreach(Linedef l in lines) + { + if(l.Front != null) + { + float oldX = linedefProps[i].Front != null ? linedefProps[i].Front.ScaleBottomX : 1.0f; + float oldY = linedefProps[i].Front != null ? linedefProps[i].Front.ScaleBottomY : 1.0f; + pfcFrontScaleBottom.ApplyTo(l.Front.Fields, General.Map.FormatInterface.MinTextureOffset, General.Map.FormatInterface.MaxTextureOffset, oldX, oldY); + } + + i++; + } + + General.Map.IsChanged = true; + if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty); + } + + private void pfcBackScaleTop_OnValuesChanged(object sender, EventArgs e) + { + if(preventchanges) return; + int i = 0; + + foreach(Linedef l in lines) + { + if(l.Back != null) + { + float oldX = linedefProps[i].Back != null ? linedefProps[i].Back.ScaleTopX : 1.0f; + float oldY = linedefProps[i].Back != null ? linedefProps[i].Back.ScaleTopY : 1.0f; + pfcBackScaleTop.ApplyTo(l.Back.Fields, General.Map.FormatInterface.MinTextureOffset, General.Map.FormatInterface.MaxTextureOffset, oldX, oldY); + } + + i++; + } + + General.Map.IsChanged = true; + if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty); + } + + private void pfcBackScaleMid_OnValuesChanged(object sender, EventArgs e) + { + if(preventchanges) return; + int i = 0; + + foreach(Linedef l in lines) + { + if(l.Back != null) + { + float oldX = linedefProps[i].Back != null ? linedefProps[i].Back.ScaleMidX : 1.0f; + float oldY = linedefProps[i].Back != null ? linedefProps[i].Back.ScaleMidY : 1.0f; + pfcBackScaleMid.ApplyTo(l.Back.Fields, General.Map.FormatInterface.MinTextureOffset, General.Map.FormatInterface.MaxTextureOffset, oldX, oldY); + } + + i++; + } + + General.Map.IsChanged = true; + if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty); + } + + private void pfcBackScaleBottom_OnValuesChanged(object sender, EventArgs e) + { + if(preventchanges) return; + int i = 0; + + foreach(Linedef l in lines) + { + if(l.Back != null) + { + float oldX = linedefProps[i].Back != null ? linedefProps[i].Back.ScaleBottomX : 1.0f; + float oldY = linedefProps[i].Back != null ? linedefProps[i].Back.ScaleBottomY : 1.0f; + pfcBackScaleBottom.ApplyTo(l.Back.Fields, General.Map.FormatInterface.MinTextureOffset, General.Map.FormatInterface.MaxTextureOffset, oldX, oldY); + } + + i++; + } + + General.Map.IsChanged = true; + if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty); + } + + #endregion + + #region Flags cahnged + + private void flagsFront_OnValueChanged(object sender, EventArgs e) + { + if(preventchanges) return; + int i = 0; + + foreach(Linedef l in lines) + { + if(l.Front == null) continue; + + // Apply all flags + foreach(CheckBox c in flagsFront.Checkboxes) + { + if(c.CheckState == CheckState.Checked) + l.Front.SetFlag(c.Tag.ToString(), true); + else if(c.CheckState == CheckState.Unchecked) + l.Front.SetFlag(c.Tag.ToString(), false); + else if(linedefProps[i].Front.Flags.ContainsKey(c.Tag.ToString())) + l.Front.SetFlag(c.Tag.ToString(), linedefProps[i].Front.Flags[c.Tag.ToString()]); + else //linedefs created in the editor have empty Flags by default + l.Front.SetFlag(c.Tag.ToString(), false); + } + + i++; + } + + General.Map.IsChanged = true; + if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty); + } + + private void flagsBack_OnValueChanged(object sender, EventArgs e) + { + if(preventchanges) return; + int i = 0; + + foreach(Linedef l in lines) + { + if(l.Back == null) continue; + + // Apply all flags + foreach(CheckBox c in flagsBack.Checkboxes) + { + if(c.CheckState == CheckState.Checked) + l.Back.SetFlag(c.Tag.ToString(), true); + else if(c.CheckState == CheckState.Unchecked) + l.Back.SetFlag(c.Tag.ToString(), false); + else if(linedefProps[i].Back.Flags.ContainsKey(c.Tag.ToString())) + l.Back.SetFlag(c.Tag.ToString(), linedefProps[i].Back.Flags[c.Tag.ToString()]); + else //linedefs created in the editor have empty Flags by default + l.Back.SetFlag(c.Tag.ToString(), false); + } + + i++; + } + + General.Map.IsChanged = true; + if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty); + } + + #endregion + + #endregion + + } +} diff --git a/Source/Core/Windows/LinedefEditFormUDMF.resx b/Source/Core/Windows/LinedefEditFormUDMF.resx new file mode 100644 index 00000000..c6f1dc87 --- /dev/null +++ b/Source/Core/Windows/LinedefEditFormUDMF.resx @@ -0,0 +1,216 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + True + + + False + + + True + + + False + + + True + + + False + + + True + + + False + + + True + + + False + + + True + + + False + + + True + + + False + + + False + + + False + + + False + + + False + + + False + + + True + + + True + + + True + + + 17, 17 + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + \ No newline at end of file diff --git a/Source/Core/Windows/MainForm.cs b/Source/Core/Windows/MainForm.cs index 75ced6f7..236efbe1 100644 --- a/Source/Core/Windows/MainForm.cs +++ b/Source/Core/Windows/MainForm.cs @@ -3285,7 +3285,8 @@ namespace CodeImp.DoomBuilder.Windows } //mxd - public DialogResult ShowEditVertices(ICollection vertices) { + public DialogResult ShowEditVertices(ICollection vertices) + { return ShowEditVertices(vertices, true); } @@ -3307,14 +3308,29 @@ namespace CodeImp.DoomBuilder.Windows // This shows the dialog to edit lines public DialogResult ShowEditLinedefs(ICollection lines) { + DialogResult result; + // Show line edit dialog - LinedefEditForm f = new LinedefEditForm(); - f.Setup(lines); - f.OnValuesChanged += EditForm_OnValuesChanged; - editformopen = true; //mxd - DialogResult result = f.ShowDialog(this); - editformopen = false; //mxd - f.Dispose(); + if(General.Map.UDMF) //mxd + { + LinedefEditFormUDMF f = new LinedefEditFormUDMF(); + f.Setup(lines); + f.OnValuesChanged += EditForm_OnValuesChanged; + editformopen = true; //mxd + result = f.ShowDialog(this); + editformopen = false; //mxd + f.Dispose(); + } + else + { + LinedefEditForm f = new LinedefEditForm(); + f.Setup(lines); + f.OnValuesChanged += EditForm_OnValuesChanged; + editformopen = true; //mxd + result = f.ShowDialog(this); + editformopen = false; //mxd + f.Dispose(); + } return result; } @@ -3325,7 +3341,8 @@ namespace CodeImp.DoomBuilder.Windows DialogResult result; // Show sector edit dialog - if(General.Map.UDMF){ //mxd + if(General.Map.UDMF) //mxd + { SectorEditFormUDMF f = new SectorEditFormUDMF(); f.Setup(sectors); f.OnValuesChanged += EditForm_OnValuesChanged; @@ -3333,7 +3350,9 @@ namespace CodeImp.DoomBuilder.Windows result = f.ShowDialog(this); editformopen = false; //mxd f.Dispose(); - }else{ + } + else + { SectorEditForm f = new SectorEditForm(); f.Setup(sectors); f.OnValuesChanged += EditForm_OnValuesChanged; @@ -3352,7 +3371,8 @@ namespace CodeImp.DoomBuilder.Windows DialogResult result; // Show thing edit dialog - if(General.Map.UDMF) { + if(General.Map.UDMF) + { ThingEditFormUDMF f = new ThingEditFormUDMF(); f.Setup(things); f.OnValuesChanged += EditForm_OnValuesChanged; @@ -3360,7 +3380,9 @@ namespace CodeImp.DoomBuilder.Windows result = f.ShowDialog(this); editformopen = false; //mxd f.Dispose(); - } else { + } + else + { ThingEditForm f = new ThingEditForm(); f.Setup(things); f.OnValuesChanged += EditForm_OnValuesChanged; @@ -3374,10 +3396,14 @@ namespace CodeImp.DoomBuilder.Windows } //mxd - private void EditForm_OnValuesChanged(object sender, EventArgs e) { - if (OnEditFormValuesChanged != null) { + private void EditForm_OnValuesChanged(object sender, EventArgs e) + { + if (OnEditFormValuesChanged != null) + { OnEditFormValuesChanged(sender, e); - } else { + } + else + { //If current mode doesn't handle this event, let's at least update the map and redraw display. General.Map.Map.Update(); RedrawDisplay();