From c5d91d15fc79ef8a1b082ae3d4a40677d6e66ba4 Mon Sep 17 00:00:00 2001 From: MascaraSnake <jonassauer27@gmail.com> Date: Thu, 29 Dec 2022 21:02:53 +0100 Subject: [PATCH] Began implementing linedef edit form for SRB2 --- Build/Configurations/Includes/SRB222_misc.cfg | 35 - Source/Core/Builder.csproj | 18 + Source/Core/BuilderMono.csproj | 18 + .../Controls/ArgumentsControlSRB2.Designer.cs | 377 ++++ Source/Core/Controls/ArgumentsControlSRB2.cs | 245 +++ .../Core/Controls/ArgumentsControlSRB2.resx | 123 ++ Source/Core/Controls/LinedefInfoPanel.cs | 6 +- Source/Core/Controls/ThingInfoPanel.cs | 6 +- Source/Core/Map/Linedef.cs | 2 +- Source/Core/Resources/UDMF_UI.cfg | 2 + .../Windows/LinedefEditFormSRB2.Designer.cs | 1465 +++++++++++++ Source/Core/Windows/LinedefEditFormSRB2.cs | 1832 +++++++++++++++++ Source/Core/Windows/LinedefEditFormSRB2.resx | 189 ++ Source/Core/Windows/MainForm.cs | 9 +- 14 files changed, 4284 insertions(+), 43 deletions(-) create mode 100644 Source/Core/Controls/ArgumentsControlSRB2.Designer.cs create mode 100644 Source/Core/Controls/ArgumentsControlSRB2.cs create mode 100644 Source/Core/Controls/ArgumentsControlSRB2.resx create mode 100644 Source/Core/Windows/LinedefEditFormSRB2.Designer.cs create mode 100644 Source/Core/Windows/LinedefEditFormSRB2.cs create mode 100644 Source/Core/Windows/LinedefEditFormSRB2.resx diff --git a/Build/Configurations/Includes/SRB222_misc.cfg b/Build/Configurations/Includes/SRB222_misc.cfg index fcc24741e..3a8857c6b 100644 --- a/Build/Configurations/Includes/SRB222_misc.cfg +++ b/Build/Configurations/Includes/SRB222_misc.cfg @@ -278,41 +278,6 @@ universalfields linedef { - arg5 - { - type = 0; - default = 0; - } - arg6 - { - type = 0; - default = 0; - } - arg7 - { - type = 0; - default = 0; - } - arg8 - { - type = 0; - default = 0; - } - arg9 - { - type = 0; - default = 0; - } - stringarg0 - { - type = 2; - default = ""; - } - stringarg1 - { - type = 2; - default = ""; - } executordelay { type = 0; diff --git a/Source/Core/Builder.csproj b/Source/Core/Builder.csproj index 5e67fb8dd..f48af9fd0 100644 --- a/Source/Core/Builder.csproj +++ b/Source/Core/Builder.csproj @@ -180,6 +180,12 @@ <Compile Include="Controls\ArgumentBox.Designer.cs"> <DependentUpon>ArgumentBox.cs</DependentUpon> </Compile> + <Compile Include="Controls\ArgumentsControlSRB2.cs"> + <SubType>UserControl</SubType> + </Compile> + <Compile Include="Controls\ArgumentsControlSRB2.Designer.cs"> + <DependentUpon>ArgumentsControlSRB2.cs</DependentUpon> + </Compile> <Compile Include="Controls\ExternalCommandControl.cs"> <SubType>UserControl</SubType> </Compile> @@ -277,6 +283,12 @@ <Compile Include="Windows\ILinedefEditForm.cs" /> <Compile Include="Windows\ISectorEditForm.cs" /> <Compile Include="Windows\IThingEditForm.cs" /> + <Compile Include="Windows\LinedefEditFormSRB2.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="Windows\LinedefEditFormSRB2.Designer.cs"> + <DependentUpon>LinedefEditFormSRB2.cs</DependentUpon> + </Compile> <Compile Include="Windows\PreAndPostCommandsForm.cs"> <SubType>Form</SubType> </Compile> @@ -666,12 +678,18 @@ </Reference> </ItemGroup> <ItemGroup> + <EmbeddedResource Include="Controls\ArgumentsControlSRB2.resx"> + <DependentUpon>ArgumentsControlSRB2.cs</DependentUpon> + </EmbeddedResource> <EmbeddedResource Include="Controls\ExternalCommandControl.resx"> <DependentUpon>ExternalCommandControl.cs</DependentUpon> </EmbeddedResource> <EmbeddedResource Include="Controls\PairedFloatControl.resx"> <DependentUpon>PairedFloatControl.cs</DependentUpon> </EmbeddedResource> + <EmbeddedResource Include="Windows\LinedefEditFormSRB2.resx"> + <DependentUpon>LinedefEditFormSRB2.cs</DependentUpon> + </EmbeddedResource> <EmbeddedResource Include="Windows\PreAndPostCommandsForm.resx"> <DependentUpon>PreAndPostCommandsForm.cs</DependentUpon> </EmbeddedResource> diff --git a/Source/Core/BuilderMono.csproj b/Source/Core/BuilderMono.csproj index 2214f4268..e94b0145a 100644 --- a/Source/Core/BuilderMono.csproj +++ b/Source/Core/BuilderMono.csproj @@ -177,6 +177,12 @@ <Compile Include="Controls\ArgumentBox.Designer.cs"> <DependentUpon>ArgumentBox.cs</DependentUpon> </Compile> + <Compile Include="Controls\ArgumentsControlSRB2.cs"> + <SubType>UserControl</SubType> + </Compile> + <Compile Include="Controls\ArgumentsControlSRB2.Designer.cs"> + <DependentUpon>ArgumentsControlSRB2.cs</DependentUpon> + </Compile> <Compile Include="Controls\ExternalCommandControl.cs"> <SubType>UserControl</SubType> </Compile> @@ -269,6 +275,12 @@ <Compile Include="Windows\ILinedefEditForm.cs" /> <Compile Include="Windows\ISectorEditForm.cs" /> <Compile Include="Windows\IThingEditForm.cs" /> + <Compile Include="Windows\LinedefEditFormSRB2.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="Windows\LinedefEditFormSRB2.Designer.cs"> + <DependentUpon>LinedefEditFormSRB2.cs</DependentUpon> + </Compile> <Compile Include="Windows\PreAndPostCommandsForm.cs"> <SubType>Form</SubType> </Compile> @@ -658,12 +670,18 @@ </Reference> </ItemGroup> <ItemGroup> + <EmbeddedResource Include="Controls\ArgumentsControlSRB2.resx"> + <DependentUpon>ArgumentsControlSRB2.cs</DependentUpon> + </EmbeddedResource> <EmbeddedResource Include="Controls\ExternalCommandControl.resx"> <DependentUpon>ExternalCommandControl.cs</DependentUpon> </EmbeddedResource> <EmbeddedResource Include="Controls\PairedFloatControl.resx"> <DependentUpon>PairedFloatControl.cs</DependentUpon> </EmbeddedResource> + <EmbeddedResource Include="Windows\LinedefEditFormSRB2.resx"> + <DependentUpon>LinedefEditFormSRB2.cs</DependentUpon> + </EmbeddedResource> <EmbeddedResource Include="Windows\PreAndPostCommandsForm.resx"> <DependentUpon>PreAndPostCommandsForm.cs</DependentUpon> </EmbeddedResource> diff --git a/Source/Core/Controls/ArgumentsControlSRB2.Designer.cs b/Source/Core/Controls/ArgumentsControlSRB2.Designer.cs new file mode 100644 index 000000000..fa16331bd --- /dev/null +++ b/Source/Core/Controls/ArgumentsControlSRB2.Designer.cs @@ -0,0 +1,377 @@ +namespace CodeImp.DoomBuilder.Controls +{ + partial class ArgumentsControlSRB2 + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) { + if(disposing && (components != null)) { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() { + this.components = new System.ComponentModel.Container(); + this.splitcontainer = new System.Windows.Forms.SplitContainer(); + this.stringarg0label = new System.Windows.Forms.Label(); + this.stringarg0 = new System.Windows.Forms.TextBox(); + this.arg0label = new System.Windows.Forms.Label(); + 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.stringarg1label = new System.Windows.Forms.Label(); + this.arg9label = new System.Windows.Forms.Label(); + this.stringarg1 = new System.Windows.Forms.TextBox(); + this.arg8label = new System.Windows.Forms.Label(); + this.arg7label = new System.Windows.Forms.Label(); + this.arg6label = new System.Windows.Forms.Label(); + this.arg5label = new System.Windows.Forms.Label(); + this.tooltip = new System.Windows.Forms.ToolTip(this.components); + this.arg0 = new CodeImp.DoomBuilder.Controls.ArgumentBox(); + this.arg3 = new CodeImp.DoomBuilder.Controls.ArgumentBox(); + this.arg4 = new CodeImp.DoomBuilder.Controls.ArgumentBox(); + this.arg1 = new CodeImp.DoomBuilder.Controls.ArgumentBox(); + this.arg2 = new CodeImp.DoomBuilder.Controls.ArgumentBox(); + this.arg9 = new CodeImp.DoomBuilder.Controls.ArgumentBox(); + this.arg8 = new CodeImp.DoomBuilder.Controls.ArgumentBox(); + this.arg7 = new CodeImp.DoomBuilder.Controls.ArgumentBox(); + this.arg6 = new CodeImp.DoomBuilder.Controls.ArgumentBox(); + this.arg5 = new CodeImp.DoomBuilder.Controls.ArgumentBox(); + ((System.ComponentModel.ISupportInitialize)(this.splitcontainer)).BeginInit(); + this.splitcontainer.Panel1.SuspendLayout(); + this.splitcontainer.Panel2.SuspendLayout(); + this.splitcontainer.SuspendLayout(); + this.SuspendLayout(); + // + // splitcontainer + // + this.splitcontainer.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitcontainer.IsSplitterFixed = true; + this.splitcontainer.Location = new System.Drawing.Point(0, 0); + this.splitcontainer.Name = "splitcontainer"; + // + // splitcontainer.Panel1 + // + this.splitcontainer.Panel1.Controls.Add(this.stringarg0label); + this.splitcontainer.Panel1.Controls.Add(this.stringarg0); + this.splitcontainer.Panel1.Controls.Add(this.arg0label); + this.splitcontainer.Panel1.Controls.Add(this.arg1label); + this.splitcontainer.Panel1.Controls.Add(this.arg3label); + this.splitcontainer.Panel1.Controls.Add(this.arg2label); + this.splitcontainer.Panel1.Controls.Add(this.arg4label); + this.splitcontainer.Panel1.Controls.Add(this.arg0); + this.splitcontainer.Panel1.Controls.Add(this.arg3); + this.splitcontainer.Panel1.Controls.Add(this.arg4); + this.splitcontainer.Panel1.Controls.Add(this.arg1); + this.splitcontainer.Panel1.Controls.Add(this.arg2); + // + // splitcontainer.Panel2 + // + this.splitcontainer.Panel2.Controls.Add(this.stringarg1label); + this.splitcontainer.Panel2.Controls.Add(this.arg9label); + this.splitcontainer.Panel2.Controls.Add(this.stringarg1); + this.splitcontainer.Panel2.Controls.Add(this.arg9); + this.splitcontainer.Panel2.Controls.Add(this.arg8label); + this.splitcontainer.Panel2.Controls.Add(this.arg8); + this.splitcontainer.Panel2.Controls.Add(this.arg7label); + this.splitcontainer.Panel2.Controls.Add(this.arg7); + this.splitcontainer.Panel2.Controls.Add(this.arg6label); + this.splitcontainer.Panel2.Controls.Add(this.arg6); + this.splitcontainer.Panel2.Controls.Add(this.arg5label); + this.splitcontainer.Panel2.Controls.Add(this.arg5); + this.splitcontainer.Size = new System.Drawing.Size(700, 200); + this.splitcontainer.SplitterDistance = 350; + this.splitcontainer.SplitterWidth = 1; + this.splitcontainer.TabIndex = 0; + this.splitcontainer.TabStop = false; + // + // stringarg0label + // + this.stringarg0label.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.stringarg0label.Location = new System.Drawing.Point(55, 147); + this.stringarg0label.Name = "stringarg0label"; + this.stringarg0label.Size = new System.Drawing.Size(179, 14); + this.stringarg0label.TabIndex = 48; + this.stringarg0label.Text = "String argument 1:"; + this.stringarg0label.TextAlign = System.Drawing.ContentAlignment.TopRight; + this.stringarg0label.UseMnemonic = false; + // + // stringarg0 + // + this.stringarg0.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.stringarg0.Location = new System.Drawing.Point(237, 142); + this.stringarg0.Name = "stringarg0"; + this.stringarg0.Size = new System.Drawing.Size(110, 20); + this.stringarg0.TabIndex = 47; + // + // arg0label + // + this.arg0label.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.arg0label.Location = new System.Drawing.Point(55, 8); + this.arg0label.Name = "arg0label"; + this.arg0label.Size = new System.Drawing.Size(179, 14); + this.arg0label.TabIndex = 33; + this.arg0label.Text = "Argument 1:"; + this.arg0label.TextAlign = System.Drawing.ContentAlignment.TopRight; + this.arg0label.UseMnemonic = false; + // + // arg1label + // + this.arg1label.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.arg1label.Location = new System.Drawing.Point(55, 33); + this.arg1label.Name = "arg1label"; + this.arg1label.Size = new System.Drawing.Size(179, 14); + this.arg1label.TabIndex = 42; + this.arg1label.Text = "Argument 2:"; + this.arg1label.TextAlign = System.Drawing.ContentAlignment.TopRight; + this.arg1label.UseMnemonic = false; + // + // arg3label + // + this.arg3label.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.arg3label.Location = new System.Drawing.Point(55, 83); + this.arg3label.Name = "arg3label"; + this.arg3label.Size = new System.Drawing.Size(179, 14); + this.arg3label.TabIndex = 44; + this.arg3label.Text = "Argument 4:"; + this.arg3label.TextAlign = System.Drawing.ContentAlignment.TopRight; + this.arg3label.UseMnemonic = false; + // + // arg2label + // + this.arg2label.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.arg2label.Location = new System.Drawing.Point(55, 58); + this.arg2label.Name = "arg2label"; + this.arg2label.Size = new System.Drawing.Size(179, 14); + this.arg2label.TabIndex = 43; + this.arg2label.Text = "Argument 3:"; + this.arg2label.TextAlign = System.Drawing.ContentAlignment.TopRight; + this.arg2label.UseMnemonic = false; + // + // arg4label + // + this.arg4label.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.arg4label.Location = new System.Drawing.Point(55, 108); + this.arg4label.Name = "arg4label"; + this.arg4label.Size = new System.Drawing.Size(179, 14); + this.arg4label.TabIndex = 46; + this.arg4label.Text = "Argument 5:"; + this.arg4label.TextAlign = System.Drawing.ContentAlignment.TopRight; + this.arg4label.UseMnemonic = false; + // + // stringarg1label + // + this.stringarg1label.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.stringarg1label.Location = new System.Drawing.Point(50, 147); + this.stringarg1label.Name = "stringarg1label"; + this.stringarg1label.Size = new System.Drawing.Size(179, 14); + this.stringarg1label.TabIndex = 50; + this.stringarg1label.Text = "String argument 2:"; + this.stringarg1label.TextAlign = System.Drawing.ContentAlignment.TopRight; + this.stringarg1label.UseMnemonic = false; + // + // arg9label + // + this.arg9label.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.arg9label.Location = new System.Drawing.Point(58, 108); + this.arg9label.Name = "arg9label"; + this.arg9label.Size = new System.Drawing.Size(179, 14); + this.arg9label.TabIndex = 56; + this.arg9label.Text = "Argument 10:"; + this.arg9label.TextAlign = System.Drawing.ContentAlignment.TopRight; + this.arg9label.UseMnemonic = false; + // + // stringarg1 + // + this.stringarg1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.stringarg1.Location = new System.Drawing.Point(232, 142); + this.stringarg1.Name = "stringarg1"; + this.stringarg1.Size = new System.Drawing.Size(110, 20); + this.stringarg1.TabIndex = 49; + // + // arg8label + // + this.arg8label.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.arg8label.Location = new System.Drawing.Point(58, 83); + this.arg8label.Name = "arg8label"; + this.arg8label.Size = new System.Drawing.Size(179, 14); + this.arg8label.TabIndex = 54; + this.arg8label.Text = "Argument 9:"; + this.arg8label.TextAlign = System.Drawing.ContentAlignment.TopRight; + this.arg8label.UseMnemonic = false; + // + // arg7label + // + this.arg7label.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.arg7label.Location = new System.Drawing.Point(58, 58); + this.arg7label.Name = "arg7label"; + this.arg7label.Size = new System.Drawing.Size(179, 14); + this.arg7label.TabIndex = 52; + this.arg7label.Text = "Argument 8:"; + this.arg7label.TextAlign = System.Drawing.ContentAlignment.TopRight; + this.arg7label.UseMnemonic = false; + // + // arg6label + // + this.arg6label.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.arg6label.Location = new System.Drawing.Point(58, 33); + this.arg6label.Name = "arg6label"; + this.arg6label.Size = new System.Drawing.Size(179, 14); + this.arg6label.TabIndex = 50; + this.arg6label.Text = "Argument 7:"; + this.arg6label.TextAlign = System.Drawing.ContentAlignment.TopRight; + this.arg6label.UseMnemonic = false; + // + // arg5label + // + this.arg5label.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.arg5label.Location = new System.Drawing.Point(58, 8); + this.arg5label.Name = "arg5label"; + this.arg5label.Size = new System.Drawing.Size(179, 14); + this.arg5label.TabIndex = 48; + this.arg5label.Text = "Argument 6:"; + this.arg5label.TextAlign = System.Drawing.ContentAlignment.TopRight; + this.arg5label.UseMnemonic = false; + // + // arg0 + // + this.arg0.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.arg0.Location = new System.Drawing.Point(237, 3); + this.arg0.Name = "arg0"; + this.arg0.Size = new System.Drawing.Size(110, 24); + this.arg0.TabIndex = 2; + // + // arg3 + // + this.arg3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.arg3.Location = new System.Drawing.Point(237, 78); + this.arg3.Name = "arg3"; + this.arg3.Size = new System.Drawing.Size(110, 24); + this.arg3.TabIndex = 43; + // + // arg4 + // + this.arg4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.arg4.Location = new System.Drawing.Point(237, 103); + this.arg4.Name = "arg4"; + this.arg4.Size = new System.Drawing.Size(110, 24); + this.arg4.TabIndex = 45; + // + // arg1 + // + this.arg1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.arg1.Location = new System.Drawing.Point(237, 28); + this.arg1.Name = "arg1"; + this.arg1.Size = new System.Drawing.Size(110, 24); + this.arg1.TabIndex = 34; + // + // arg2 + // + this.arg2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.arg2.Location = new System.Drawing.Point(237, 53); + this.arg2.Name = "arg2"; + this.arg2.Size = new System.Drawing.Size(110, 24); + this.arg2.TabIndex = 35; + // + // arg9 + // + this.arg9.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.arg9.Location = new System.Drawing.Point(240, 103); + this.arg9.Name = "arg9"; + this.arg9.Size = new System.Drawing.Size(110, 24); + this.arg9.TabIndex = 55; + // + // arg8 + // + this.arg8.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.arg8.Location = new System.Drawing.Point(240, 78); + this.arg8.Name = "arg8"; + this.arg8.Size = new System.Drawing.Size(110, 24); + this.arg8.TabIndex = 53; + // + // arg7 + // + this.arg7.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.arg7.Location = new System.Drawing.Point(240, 53); + this.arg7.Name = "arg7"; + this.arg7.Size = new System.Drawing.Size(110, 24); + this.arg7.TabIndex = 51; + // + // arg6 + // + this.arg6.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.arg6.Location = new System.Drawing.Point(240, 28); + this.arg6.Name = "arg6"; + this.arg6.Size = new System.Drawing.Size(110, 24); + this.arg6.TabIndex = 49; + // + // arg5 + // + this.arg5.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.arg5.Location = new System.Drawing.Point(240, 3); + this.arg5.Name = "arg5"; + this.arg5.Size = new System.Drawing.Size(110, 24); + this.arg5.TabIndex = 47; + // + // ArgumentsControlSRB2 + // + this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; + this.Controls.Add(this.splitcontainer); + this.Name = "ArgumentsControlSRB2"; + this.Size = new System.Drawing.Size(700, 200); + this.splitcontainer.Panel1.ResumeLayout(false); + this.splitcontainer.Panel1.PerformLayout(); + this.splitcontainer.Panel2.ResumeLayout(false); + this.splitcontainer.Panel2.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.splitcontainer)).EndInit(); + this.splitcontainer.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.SplitContainer splitcontainer; + private ArgumentBox arg0; + private ArgumentBox arg1; + private System.Windows.Forms.Label arg0label; + private System.Windows.Forms.Label arg2label; + private System.Windows.Forms.Label arg1label; + private System.Windows.Forms.Label arg3label; + private System.Windows.Forms.Label arg4label; + private ArgumentBox arg3; + private ArgumentBox arg4; + private System.Windows.Forms.ToolTip tooltip; + private ArgumentBox arg2; + private System.Windows.Forms.Label arg5label; + private ArgumentBox arg5; + private System.Windows.Forms.Label arg9label; + private ArgumentBox arg9; + private System.Windows.Forms.Label arg8label; + private ArgumentBox arg8; + private System.Windows.Forms.Label arg7label; + private ArgumentBox arg7; + private System.Windows.Forms.Label arg6label; + private ArgumentBox arg6; + private System.Windows.Forms.Label stringarg0label; + private System.Windows.Forms.TextBox stringarg0; + private System.Windows.Forms.Label stringarg1label; + private System.Windows.Forms.TextBox stringarg1; + } +} diff --git a/Source/Core/Controls/ArgumentsControlSRB2.cs b/Source/Core/Controls/ArgumentsControlSRB2.cs new file mode 100644 index 000000000..3d8e9ca01 --- /dev/null +++ b/Source/Core/Controls/ArgumentsControlSRB2.cs @@ -0,0 +1,245 @@ +#region ================== Namespaces + +using System; +using System.ComponentModel; +using System.Drawing; +using System.Runtime.InteropServices; +using System.Windows.Forms; +using CodeImp.DoomBuilder.Config; +using CodeImp.DoomBuilder.GZBuilder.Data; +using CodeImp.DoomBuilder.Geometry; +using CodeImp.DoomBuilder.Map; +using CodeImp.DoomBuilder.Types; +using CodeImp.DoomBuilder.GZBuilder; + +#endregion + +namespace CodeImp.DoomBuilder.Controls +{ + public partial class ArgumentsControlSRB2 : UserControl + { + #region ================== Native stuff + + [DllImport("user32.dll")] + private static extern int SendMessage(IntPtr hWnd, Int32 wMsg, bool wParam, Int32 lParam); + + private const int WM_SETREDRAW = 11; + + #endregion + + #region ================== Variables + + private int action; + private ArgumentInfo[] arginfo; + private Label[] labels; + private ArgumentBox[] args; + private Label[] stringlabels; + private System.Windows.Forms.TextBox[] stringargs; + + #endregion + + #region ================== Constructor + + public ArgumentsControlSRB2() + { + InitializeComponent(); + + Reset(); + + labels = new Label[] { arg0label, arg1label, arg2label, arg3label, arg4label, arg5label, arg6label, arg7label, arg8label, arg9label }; + args = new ArgumentBox[] { arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9 }; + stringlabels = new Label[] { stringarg0label, stringarg1label }; + stringargs = new System.Windows.Forms.TextBox[] { stringarg0, stringarg1 }; + } + + #endregion + + #region ================== Setup + + public void Reset() + { + // Only when running (this.DesignMode won't do when not this, but one of parent controls is in design mode) + if (LicenseManager.UsageMode != LicenseUsageMode.Designtime) + { + // do nothing. + } + } + + public void SetValue(Linedef l, bool first) + { + SetValue(l.Fields, l.Args, first); + } + + public void SetValue(Thing t, bool first) + { + SetValue(t.Fields, t.Args, first); + } + + private void SetValue(UniFields fields, int[] newargs, bool first) + { + // Update arguments + for (int i = 0; i < args.Length; i++) + { + if (first) + args[i].SetValue(newargs[i]); + else + if (!string.IsNullOrEmpty(args[i].Text) && newargs[i] != args[i].GetResult(int.MinValue)) args[i].ClearValue(); + } + + for (int i = 0; i < stringargs.Length; i++) + { + if (first) + stringargs[i].Text = fields.GetValue("stringarg" + i, string.Empty); + else + if (fields.GetValue("stringarg" + i, string.Empty) != stringargs[i].Text) stringargs[i].Text = string.Empty; + } + } + + #endregion + + #region ================== Apply + + public void Apply(Linedef l, int step) + { + for (int i = 0; i < args.Length; i++) + l.Args[i] = args[i].GetResult(l.Args[i], step); + + for (int i = 0; i < stringargs.Length; i++) + if (!string.IsNullOrEmpty(stringargs[i].Text)) + UniFields.SetString(l.Fields, "stringarg" + i, stringargs[i].Text, string.Empty); + } + + public void Apply(Thing t, int step) + { + for (int i = 0; i < args.Length; i++) + t.Args[i] = args[i].GetResult(t.Args[i], step); + + for (int i = 0; i < stringargs.Length; i++) + if (!string.IsNullOrEmpty(stringargs[i].Text)) + UniFields.SetString(t.Fields, "stringarg" + i, stringargs[i].Text, string.Empty); + } + + #endregion + + #region ================== Update + + public void UpdateAction(int action, bool setuponly) + { + UpdateAction(action, setuponly, null); + } + + //TODO: Info for string args + public void UpdateAction(int action, bool setuponly, ThingTypeInfo info) + { + // Update arguments + int showaction = 0; + ArgumentInfo[] oldarginfo = (arginfo != null ? (ArgumentInfo[])arginfo.Clone() : null); //mxd + + // Only when action type is known + if (General.Map.Config.LinedefActions.ContainsKey(action)) showaction = action; + + // Update argument infos + if ((showaction == 0) && (info != null)) arginfo = info.Args; + else arginfo = General.Map.Config.LinedefActions[showaction].Args; + + // Don't update action args when thing type is changed + if (info != null && showaction != 0 && this.action == showaction) return; + + //mxd. Don't update action args when old and new argument infos match + if (arginfo != null && oldarginfo != null && ArgumentInfosMatch(arginfo, oldarginfo)) return; + + // Change the argument descriptions + this.BeginUpdate(); + + for (int i = 0; i < args.Length; i++) + UpdateArgument(args[i], labels[i], arginfo[i]); + + if (!setuponly) + { + // Apply action's or thing's default arguments + if (showaction != 0 || info != null) + { + for (int i = 0; i < args.Length; i++) + args[i].SetDefaultValue(); + } + else //or set them to 0 + { + for (int i = 0; i < args.Length; i++) + args[i].SetValue(0); + } + } + + // Store current action + this.action = showaction; + + this.EndUpdate(); + } + + public void UpdateScriptControls() + { + } + + private void UpdateArgument(ArgumentBox arg, Label label, ArgumentInfo info) + { + // Update labels + label.Text = info.Title + ":"; + label.Enabled = info.Used; + arg.ForeColor = (label.Enabled ? SystemColors.WindowText : SystemColors.GrayText); + arg.Setup(info); + + // Update tooltip + UpdateToolTip(label, info); + } + + private void UpdateToolTip(Label label, ArgumentInfo info) + { + if (info.Used && !string.IsNullOrEmpty(info.ToolTip)) + { + tooltip.SetToolTip(label, info.ToolTip); + label.Font = new Font(label.Font, FontStyle.Underline); + label.ForeColor = SystemColors.HotTrack; + } + else + { + tooltip.SetToolTip(label, null); + label.Font = new Font(label.Font, FontStyle.Regular); + label.ForeColor = SystemColors.WindowText; + } + } + + //mxd + private static bool ArgumentInfosMatch(ArgumentInfo[] info1, ArgumentInfo[] info2) + { + if (info1.Length != info2.Length) return false; + bool haveusedargs = false; // Arguments should still be reset if all arguments are unused + + for (int i = 0; i < info1.Length; i++) + { + if (info1[i].Used != info2[i].Used || info1[i].Type != info2[i].Type + || info1[i].Title.ToUpperInvariant() != info2[i].Title.ToUpperInvariant()) + return false; + + haveusedargs |= info1[i].Used; + } + + return haveusedargs; + } + + #endregion + + #region ================== Redraw control + + private void BeginUpdate() + { + SendMessage(this.Parent.Handle, WM_SETREDRAW, false, 0); + } + + private void EndUpdate() + { + SendMessage(this.Parent.Handle, WM_SETREDRAW, true, 0); + this.Parent.Refresh(); + } + + #endregion + } +} diff --git a/Source/Core/Controls/ArgumentsControlSRB2.resx b/Source/Core/Controls/ArgumentsControlSRB2.resx new file mode 100644 index 000000000..6fe48b1c4 --- /dev/null +++ b/Source/Core/Controls/ArgumentsControlSRB2.resx @@ -0,0 +1,123 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <metadata name="tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> +</root> \ No newline at end of file diff --git a/Source/Core/Controls/LinedefInfoPanel.cs b/Source/Core/Controls/LinedefInfoPanel.cs index f2a62e94f..921486b3b 100755 --- a/Source/Core/Controls/LinedefInfoPanel.cs +++ b/Source/Core/Controls/LinedefInfoPanel.cs @@ -239,14 +239,14 @@ namespace CodeImp.DoomBuilder.Controls { int first; string[] argnames = scriptitem.GetArgumentsDescriptions(l.Action, out first); - for (int i = 0; i < first; i++) + for (int i = 0; i < Math.Min(args.Length, first); i++) { arglabels[i].Text = (isarg0str ? act.Args[i].TitleStr : act.Args[i].Title) + ":"; arglabels[i].Enabled = act.Args[i].Used; args[i].Enabled = act.Args[i].Used; } - for (int i = first; i < argnames.Length; i++) + for (int i = first; i < args.Length; i++) { if(!string.IsNullOrEmpty(argnames[i])) { @@ -264,7 +264,7 @@ namespace CodeImp.DoomBuilder.Controls } else { - for(int i = 0; i < act.Args.Length; i++) + for(int i = 0; i < args.Length; i++) { arglabels[i].Text = (isarg0str ? act.Args[i].TitleStr : act.Args[i].Title) + ":"; arglabels[i].Enabled = act.Args[i].Used; diff --git a/Source/Core/Controls/ThingInfoPanel.cs b/Source/Core/Controls/ThingInfoPanel.cs index 82bcf7e96..6ec78d70e 100755 --- a/Source/Core/Controls/ThingInfoPanel.cs +++ b/Source/Core/Controls/ThingInfoPanel.cs @@ -162,14 +162,14 @@ namespace CodeImp.DoomBuilder.Controls { int first; string[] argnames = scriptitem.GetArgumentsDescriptions(t.Action, out first); - for (int i = 0; i < first; i++) + for (int i = 0; i < Math.Min(args.Length, first); i++) { arglabels[i].Text = (isarg0str ? arginfo[i].TitleStr : arginfo[i].Title) + ":"; arglabels[i].Enabled = arginfo[i].Used; args[i].Enabled = arginfo[i].Used; } - for (int i = first; i < argnames.Length; i++) + for (int i = first; i < args.Length; i++) { if (!string.IsNullOrEmpty(argnames[i])) { @@ -187,7 +187,7 @@ namespace CodeImp.DoomBuilder.Controls } else { - for (int i = 0; i < arginfo.Length; i++) + for (int i = 0; i < args.Length; i++) { arglabels[i].Text = (isarg0str ? arginfo[i].TitleStr : arginfo[i].Title) + ":"; arglabels[i].Enabled = arginfo[i].Used; diff --git a/Source/Core/Map/Linedef.cs b/Source/Core/Map/Linedef.cs index 531e4df10..60f257781 100755 --- a/Source/Core/Map/Linedef.cs +++ b/Source/Core/Map/Linedef.cs @@ -33,7 +33,7 @@ namespace CodeImp.DoomBuilder.Map #region ================== Constants public const double SIDE_POINT_DISTANCE = 0.01; - public const int NUM_ARGS = 5; + public const int NUM_ARGS = 10; #endregion diff --git a/Source/Core/Resources/UDMF_UI.cfg b/Source/Core/Resources/UDMF_UI.cfg index 85c5ae48f..20c26845a 100755 --- a/Source/Core/Resources/UDMF_UI.cfg +++ b/Source/Core/Resources/UDMF_UI.cfg @@ -12,6 +12,8 @@ uifields arg0str = 2; locknumber = 0; comment = 2; + stringarg0 = 2; + stringarg1 = 2; } sidedef diff --git a/Source/Core/Windows/LinedefEditFormSRB2.Designer.cs b/Source/Core/Windows/LinedefEditFormSRB2.Designer.cs new file mode 100644 index 000000000..d397284b8 --- /dev/null +++ b/Source/Core/Windows/LinedefEditFormSRB2.Designer.cs @@ -0,0 +1,1465 @@ +namespace CodeImp.DoomBuilder.Windows +{ + partial class LinedefEditFormSRB2 + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if(disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + System.Windows.Forms.Label label2; + System.Windows.Forms.Label label11; + System.Windows.Forms.Label label12; + System.Windows.Forms.Label label6; + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(LinedefEditFormSRB2)); + this.labelrenderstyle = new System.Windows.Forms.Label(); + 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.argscontrol = new CodeImp.DoomBuilder.Controls.ArgumentsControlSRB2(); + this.actionhelp = new CodeImp.DoomBuilder.Controls.ActionSpecialHelpButton(); + this.action = new CodeImp.DoomBuilder.Controls.ActionSelectorControl(); + this.browseaction = new System.Windows.Forms.Button(); + 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.groupsettings = new System.Windows.Forms.GroupBox(); + this.resetalpha = new System.Windows.Forms.Button(); + this.alpha = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox(); + this.renderStyle = new System.Windows.Forms.ComboBox(); + this.idgroup = new System.Windows.Forms.GroupBox(); + this.tagsselector = new CodeImp.DoomBuilder.Controls.TagsSelector(); + this.tabfront = new System.Windows.Forms.TabPage(); + this.frontside = new System.Windows.Forms.CheckBox(); + this.frontgroup = new System.Windows.Forms.GroupBox(); + this.frontflagsgroup = new System.Windows.Forms.GroupBox(); + this.flagsFront = new CodeImp.DoomBuilder.Controls.CheckboxArrayControl(); + this.frontscalegroup = new System.Windows.Forms.GroupBox(); + this.labelFrontScaleBottom = new System.Windows.Forms.Label(); + this.labelFrontScaleMid = new System.Windows.Forms.Label(); + this.labelFrontScaleTop = new System.Windows.Forms.Label(); + this.pfcFrontScaleTop = new CodeImp.DoomBuilder.Controls.PairedFieldsControl(); + this.pfcFrontScaleBottom = new CodeImp.DoomBuilder.Controls.PairedFieldsControl(); + this.pfcFrontScaleMid = new CodeImp.DoomBuilder.Controls.PairedFieldsControl(); + this.groupBox6 = new System.Windows.Forms.GroupBox(); + this.labelFrontTextureOffset = new System.Windows.Forms.Label(); + this.labelFrontOffsetBottom = new System.Windows.Forms.Label(); + this.frontTextureOffset = new CodeImp.DoomBuilder.Controls.PairedIntControl(); + this.labelFrontOffsetMid = new System.Windows.Forms.Label(); + this.pfcFrontOffsetTop = new CodeImp.DoomBuilder.Controls.PairedFieldsControl(); + this.labelFrontOffsetTop = new System.Windows.Forms.Label(); + this.pfcFrontOffsetMid = new CodeImp.DoomBuilder.Controls.PairedFieldsControl(); + this.pfcFrontOffsetBottom = new CodeImp.DoomBuilder.Controls.PairedFieldsControl(); + this.groupBox5 = new System.Windows.Forms.GroupBox(); + this.resetfrontlight = new System.Windows.Forms.Button(); + this.frontsector = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox(); + this.customfrontbutton = new System.Windows.Forms.Button(); + this.lightFront = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox(); + this.cbLightAbsoluteFront = new System.Windows.Forms.CheckBox(); + this.frontlow = new CodeImp.DoomBuilder.Controls.TextureSelectorControl(); + this.frontmid = new CodeImp.DoomBuilder.Controls.TextureSelectorControl(); + this.fronthigh = new CodeImp.DoomBuilder.Controls.TextureSelectorControl(); + this.tabback = new System.Windows.Forms.TabPage(); + this.backside = new System.Windows.Forms.CheckBox(); + this.backgroup = new System.Windows.Forms.GroupBox(); + this.groupBox4 = new System.Windows.Forms.GroupBox(); + this.resetbacklight = new System.Windows.Forms.Button(); + this.backsector = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox(); + this.custombackbutton = new System.Windows.Forms.Button(); + this.lightBack = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox(); + this.labelLightBack = new System.Windows.Forms.Label(); + this.cbLightAbsoluteBack = new System.Windows.Forms.CheckBox(); + this.backflagsgroup = new System.Windows.Forms.GroupBox(); + this.flagsBack = new CodeImp.DoomBuilder.Controls.CheckboxArrayControl(); + this.backscalegroup = new System.Windows.Forms.GroupBox(); + this.labelBackScaleBottom = new System.Windows.Forms.Label(); + this.labelBackScaleMid = new System.Windows.Forms.Label(); + this.labelBackScaleTop = new System.Windows.Forms.Label(); + this.pfcBackScaleTop = new CodeImp.DoomBuilder.Controls.PairedFieldsControl(); + this.pfcBackScaleBottom = new CodeImp.DoomBuilder.Controls.PairedFieldsControl(); + this.pfcBackScaleMid = new CodeImp.DoomBuilder.Controls.PairedFieldsControl(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.labelBackTextureOffset = new System.Windows.Forms.Label(); + this.labelBackOffsetBottom = new System.Windows.Forms.Label(); + this.labelBackOffsetMid = new System.Windows.Forms.Label(); + this.labelBackOffsetTop = new System.Windows.Forms.Label(); + this.pfcBackOffsetTop = new CodeImp.DoomBuilder.Controls.PairedFieldsControl(); + this.pfcBackOffsetMid = new CodeImp.DoomBuilder.Controls.PairedFieldsControl(); + this.pfcBackOffsetBottom = new CodeImp.DoomBuilder.Controls.PairedFieldsControl(); + this.backTextureOffset = new CodeImp.DoomBuilder.Controls.PairedIntControl(); + this.backlow = new CodeImp.DoomBuilder.Controls.TextureSelectorControl(); + this.backmid = new CodeImp.DoomBuilder.Controls.TextureSelectorControl(); + this.backhigh = new CodeImp.DoomBuilder.Controls.TextureSelectorControl(); + this.tabcomment = new System.Windows.Forms.TabPage(); + this.commenteditor = new CodeImp.DoomBuilder.Controls.CommentEditor(); + this.tabcustom = new System.Windows.Forms.TabPage(); + this.fieldslist = new CodeImp.DoomBuilder.Controls.FieldsEditorControl(); + this.imagelist = new System.Windows.Forms.ImageList(this.components); + this.tooltip = new System.Windows.Forms.ToolTip(this.components); + label2 = new System.Windows.Forms.Label(); + label11 = new System.Windows.Forms.Label(); + label12 = new System.Windows.Forms.Label(); + label6 = new System.Windows.Forms.Label(); + this.actiongroup.SuspendLayout(); + this.flagsgroup.SuspendLayout(); + this.tabs.SuspendLayout(); + this.tabproperties.SuspendLayout(); + this.groupsettings.SuspendLayout(); + this.idgroup.SuspendLayout(); + this.tabfront.SuspendLayout(); + this.frontgroup.SuspendLayout(); + this.frontflagsgroup.SuspendLayout(); + this.frontscalegroup.SuspendLayout(); + this.groupBox6.SuspendLayout(); + this.groupBox5.SuspendLayout(); + this.tabback.SuspendLayout(); + this.backgroup.SuspendLayout(); + this.groupBox4.SuspendLayout(); + this.backflagsgroup.SuspendLayout(); + this.backscalegroup.SuspendLayout(); + this.groupBox1.SuspendLayout(); + this.tabcomment.SuspendLayout(); + this.tabcustom.SuspendLayout(); + this.SuspendLayout(); + // + // label2 + // + label2.AutoSize = true; + label2.Location = new System.Drawing.Point(15, 22); + label2.Name = "label2"; + label2.Size = new System.Drawing.Size(40, 13); + label2.TabIndex = 9; + label2.Text = "Action:"; + // + // label11 + // + label11.Location = new System.Drawing.Point(12, 23); + 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(12, 23); + label12.Name = "label12"; + label12.Size = new System.Drawing.Size(80, 14); + label12.TabIndex = 16; + label12.Text = "Sector index:"; + label12.TextAlign = System.Drawing.ContentAlignment.TopRight; + // + // label6 + // + label6.AutoSize = true; + label6.Location = new System.Drawing.Point(189, 21); + label6.Name = "label6"; + label6.Size = new System.Drawing.Size(37, 13); + label6.TabIndex = 17; + label6.Text = "Alpha:"; + // + // labelrenderstyle + // + this.labelrenderstyle.AutoSize = true; + this.labelrenderstyle.Location = new System.Drawing.Point(15, 21); + this.labelrenderstyle.Name = "labelrenderstyle"; + this.labelrenderstyle.Size = new System.Drawing.Size(69, 13); + this.labelrenderstyle.TabIndex = 11; + this.labelrenderstyle.Text = "Render style:"; + // + // labelLightFront + // + this.labelLightFront.Location = new System.Drawing.Point(12, 53); + 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(453, 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(335, 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.argscontrol); + this.actiongroup.Controls.Add(this.actionhelp); + 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, 245); + this.actiongroup.Name = "actiongroup"; + this.actiongroup.Size = new System.Drawing.Size(533, 282); + this.actiongroup.TabIndex = 1; + this.actiongroup.TabStop = false; + this.actiongroup.Text = " Action "; + // + // argscontrol + // + this.argscontrol.Location = new System.Drawing.Point(6, 44); + this.argscontrol.Name = "argscontrol"; + this.argscontrol.Size = new System.Drawing.Size(521, 232); + this.argscontrol.TabIndex = 11; + this.argscontrol.Load += new System.EventHandler(this.argscontrol_Load); + // + // actionhelp + // + this.actionhelp.Location = new System.Drawing.Point(497, 17); + this.actionhelp.Name = "actionhelp"; + this.actionhelp.Size = new System.Drawing.Size(28, 25); + this.actionhelp.TabIndex = 10; + // + // 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, 19); + this.action.Name = "action"; + this.action.Size = new System.Drawing.Size(402, 21); + this.action.TabIndex = 0; + this.action.Value = 402; + this.action.ValueChanges += new System.EventHandler(this.action_ValueChanges); + // + // browseaction + // + this.browseaction.Image = global::CodeImp.DoomBuilder.Properties.Resources.List; + this.browseaction.Location = new System.Drawing.Point(467, 17); + this.browseaction.Name = "browseaction"; + this.browseaction.Size = new System.Drawing.Size(28, 25); + this.browseaction.TabIndex = 1; + this.tooltip.SetToolTip(this.browseaction, "Browse Action"); + this.browseaction.UseVisualStyleBackColor = true; + this.browseaction.Click += new System.EventHandler(this.browseaction_Click); + // + // 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, 184); + 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, 15); + this.flags.Name = "flags"; + this.flags.Size = new System.Drawing.Size(509, 162); + this.flags.TabIndex = 0; + this.flags.VerticalSpacing = 0; + 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.tabfront); + this.tabs.Controls.Add(this.tabback); + this.tabs.Controls.Add(this.tabcomment); + this.tabs.Controls.Add(this.tabcustom); + this.tabs.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204))); + this.tabs.ImageList = this.imagelist; + this.tabs.Location = new System.Drawing.Point(10, 10); + this.tabs.Margin = new System.Windows.Forms.Padding(1); + this.tabs.Name = "tabs"; + this.tabs.Padding = new System.Drawing.Point(12, 3); + this.tabs.SelectedIndex = 0; + this.tabs.Size = new System.Drawing.Size(557, 648); + this.tabs.TabIndex = 0; + // + // tabproperties + // + this.tabproperties.Controls.Add(this.flagsgroup); + this.tabproperties.Controls.Add(this.groupsettings); + this.tabproperties.Controls.Add(this.actiongroup); + this.tabproperties.Controls.Add(this.idgroup); + this.tabproperties.Font = new System.Drawing.Font("Microsoft Sans Serif", 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; + // + // groupsettings + // + this.groupsettings.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.groupsettings.Controls.Add(this.resetalpha); + this.groupsettings.Controls.Add(this.alpha); + this.groupsettings.Controls.Add(label6); + this.groupsettings.Controls.Add(this.renderStyle); + this.groupsettings.Controls.Add(this.labelrenderstyle); + this.groupsettings.Location = new System.Drawing.Point(8, 193); + this.groupsettings.Name = "groupsettings"; + this.groupsettings.Size = new System.Drawing.Size(533, 46); + this.groupsettings.TabIndex = 3; + this.groupsettings.TabStop = false; + this.groupsettings.Text = " Settings"; + // + // resetalpha + // + this.resetalpha.Image = global::CodeImp.DoomBuilder.Properties.Resources.Reset; + this.resetalpha.Location = new System.Drawing.Point(301, 16); + this.resetalpha.Name = "resetalpha"; + this.resetalpha.Size = new System.Drawing.Size(23, 23); + this.resetalpha.TabIndex = 70; + this.tooltip.SetToolTip(this.resetalpha, "Reset"); + this.resetalpha.UseVisualStyleBackColor = true; + this.resetalpha.Click += new System.EventHandler(this.resetalpha_Click); + // + // alpha + // + this.alpha.AllowDecimal = true; + this.alpha.AllowExpressions = false; + this.alpha.AllowNegative = false; + this.alpha.AllowRelative = false; + this.alpha.ButtonStep = 1; + this.alpha.ButtonStepBig = 0.25F; + this.alpha.ButtonStepFloat = 0.1F; + this.alpha.ButtonStepSmall = 0.01F; + this.alpha.ButtonStepsUseModifierKeys = true; + this.alpha.ButtonStepsWrapAround = false; + this.alpha.Location = new System.Drawing.Point(233, 16); + 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); + // + // renderStyle + // + this.renderStyle.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.renderStyle.FormattingEnabled = true; + this.renderStyle.Location = new System.Drawing.Point(92, 17); + this.renderStyle.Name = "renderStyle"; + this.renderStyle.Size = new System.Drawing.Size(86, 21); + 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.tagsselector); + this.idgroup.Location = new System.Drawing.Point(8, 533); + this.idgroup.Name = "idgroup"; + this.idgroup.Size = new System.Drawing.Size(533, 85); + this.idgroup.TabIndex = 2; + this.idgroup.TabStop = false; + this.idgroup.Text = " Identification "; + // + // tagsselector + // + this.tagsselector.Location = new System.Drawing.Point(6, 21); + this.tagsselector.Name = "tagsselector"; + this.tagsselector.Size = new System.Drawing.Size(524, 60); + this.tagsselector.TabIndex = 0; + // + // tabfront + // + this.tabfront.Controls.Add(this.frontside); + this.tabfront.Controls.Add(this.frontgroup); + this.tabfront.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.tabfront.ForeColor = System.Drawing.SystemColors.ControlText; + this.tabfront.ImageIndex = 0; + this.tabfront.Location = new System.Drawing.Point(4, 23); + this.tabfront.Name = "tabfront"; + this.tabfront.Padding = new System.Windows.Forms.Padding(5); + this.tabfront.Size = new System.Drawing.Size(549, 621); + this.tabfront.TabIndex = 1; + this.tabfront.Text = " Front "; + this.tabfront.UseVisualStyleBackColor = true; + // + // frontside + // + this.frontside.AutoSize = true; + this.frontside.Location = new System.Drawing.Point(20, 6); + this.frontside.Name = "frontside"; + this.frontside.Size = new System.Drawing.Size(72, 17); + this.frontside.TabIndex = 0; + this.frontside.Text = "Front side"; + this.frontside.UseVisualStyleBackColor = true; + this.frontside.CheckStateChanged += new System.EventHandler(this.frontside_CheckStateChanged); + // + // frontgroup + // + this.frontgroup.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.frontgroup.Controls.Add(this.frontflagsgroup); + this.frontgroup.Controls.Add(this.frontscalegroup); + this.frontgroup.Controls.Add(this.groupBox6); + this.frontgroup.Controls.Add(this.groupBox5); + this.frontgroup.Controls.Add(this.frontlow); + this.frontgroup.Controls.Add(this.frontmid); + this.frontgroup.Controls.Add(this.fronthigh); + this.frontgroup.Enabled = false; + this.frontgroup.Location = new System.Drawing.Point(8, 8); + this.frontgroup.Name = "frontgroup"; + this.frontgroup.Size = new System.Drawing.Size(535, 605); + this.frontgroup.TabIndex = 1; + this.frontgroup.TabStop = false; + this.frontgroup.Text = " "; + // + // frontflagsgroup + // + this.frontflagsgroup.Controls.Add(this.flagsFront); + this.frontflagsgroup.Location = new System.Drawing.Point(12, 409); + this.frontflagsgroup.Name = "frontflagsgroup"; + this.frontflagsgroup.Size = new System.Drawing.Size(290, 190); + this.frontflagsgroup.TabIndex = 45; + this.frontflagsgroup.TabStop = false; + this.frontflagsgroup.Text = " Flags "; + // + // flagsFront + // + this.flagsFront.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.flagsFront.AutoScroll = true; + this.flagsFront.Columns = 2; + this.flagsFront.Location = new System.Drawing.Point(16, 16); + this.flagsFront.Name = "flagsFront"; + this.flagsFront.Size = new System.Drawing.Size(269, 168); + this.flagsFront.TabIndex = 0; + this.flagsFront.VerticalSpacing = 3; + this.flagsFront.OnValueChanged += new System.EventHandler(this.flagsFront_OnValueChanged); + // + // frontscalegroup + // + this.frontscalegroup.Controls.Add(this.labelFrontScaleBottom); + this.frontscalegroup.Controls.Add(this.labelFrontScaleMid); + this.frontscalegroup.Controls.Add(this.labelFrontScaleTop); + this.frontscalegroup.Controls.Add(this.pfcFrontScaleTop); + this.frontscalegroup.Controls.Add(this.pfcFrontScaleBottom); + this.frontscalegroup.Controls.Add(this.pfcFrontScaleMid); + this.frontscalegroup.Location = new System.Drawing.Point(12, 291); + this.frontscalegroup.Name = "frontscalegroup"; + this.frontscalegroup.Size = new System.Drawing.Size(290, 112); + this.frontscalegroup.TabIndex = 44; + this.frontscalegroup.TabStop = false; + this.frontscalegroup.Text = " Texture scale "; + // + // labelFrontScaleBottom + // + this.labelFrontScaleBottom.Location = new System.Drawing.Point(14, 86); + this.labelFrontScaleBottom.Name = "labelFrontScaleBottom"; + this.labelFrontScaleBottom.Size = new System.Drawing.Size(80, 14); + this.labelFrontScaleBottom.TabIndex = 42; + this.labelFrontScaleBottom.Tag = ""; + this.labelFrontScaleBottom.Text = "Lower scale:"; + this.labelFrontScaleBottom.TextAlign = System.Drawing.ContentAlignment.TopRight; + // + // labelFrontScaleMid + // + this.labelFrontScaleMid.Location = new System.Drawing.Point(14, 54); + this.labelFrontScaleMid.Name = "labelFrontScaleMid"; + this.labelFrontScaleMid.Size = new System.Drawing.Size(80, 14); + this.labelFrontScaleMid.TabIndex = 41; + this.labelFrontScaleMid.Tag = ""; + this.labelFrontScaleMid.Text = "Middle scale:"; + this.labelFrontScaleMid.TextAlign = System.Drawing.ContentAlignment.TopRight; + // + // labelFrontScaleTop + // + this.labelFrontScaleTop.Location = new System.Drawing.Point(14, 22); + this.labelFrontScaleTop.Name = "labelFrontScaleTop"; + this.labelFrontScaleTop.Size = new System.Drawing.Size(80, 14); + this.labelFrontScaleTop.TabIndex = 28; + this.labelFrontScaleTop.Tag = ""; + this.labelFrontScaleTop.Text = "Upper scale:"; + this.labelFrontScaleTop.TextAlign = System.Drawing.ContentAlignment.TopRight; + // + // pfcFrontScaleTop + // + this.pfcFrontScaleTop.AllowDecimal = true; + this.pfcFrontScaleTop.AllowValueLinking = true; + this.pfcFrontScaleTop.ButtonStep = 1; + this.pfcFrontScaleTop.ButtonStepBig = 1F; + this.pfcFrontScaleTop.ButtonStepFloat = 0.1F; + this.pfcFrontScaleTop.ButtonStepSmall = 0.01F; + this.pfcFrontScaleTop.ButtonStepsUseModifierKeys = true; + this.pfcFrontScaleTop.DefaultValue = 1F; + this.pfcFrontScaleTop.Field1 = "scalex_top"; + this.pfcFrontScaleTop.Field2 = "scaley_top"; + this.pfcFrontScaleTop.LinkValues = false; + this.pfcFrontScaleTop.Location = new System.Drawing.Point(96, 17); + this.pfcFrontScaleTop.Name = "pfcFrontScaleTop"; + this.pfcFrontScaleTop.Size = new System.Drawing.Size(186, 26); + this.pfcFrontScaleTop.TabIndex = 38; + this.pfcFrontScaleTop.OnValuesChanged += new System.EventHandler(this.pfcFrontScaleTop_OnValuesChanged); + // + // pfcFrontScaleBottom + // + this.pfcFrontScaleBottom.AllowDecimal = true; + this.pfcFrontScaleBottom.AllowValueLinking = true; + this.pfcFrontScaleBottom.ButtonStep = 1; + this.pfcFrontScaleBottom.ButtonStepBig = 1F; + this.pfcFrontScaleBottom.ButtonStepFloat = 0.1F; + this.pfcFrontScaleBottom.ButtonStepSmall = 0.01F; + this.pfcFrontScaleBottom.ButtonStepsUseModifierKeys = true; + this.pfcFrontScaleBottom.DefaultValue = 1F; + this.pfcFrontScaleBottom.Field1 = "scalex_bottom"; + this.pfcFrontScaleBottom.Field2 = "scaley_bottom"; + this.pfcFrontScaleBottom.LinkValues = false; + this.pfcFrontScaleBottom.Location = new System.Drawing.Point(96, 81); + this.pfcFrontScaleBottom.Name = "pfcFrontScaleBottom"; + this.pfcFrontScaleBottom.Size = new System.Drawing.Size(186, 26); + 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.ButtonStepBig = 1F; + this.pfcFrontScaleMid.ButtonStepFloat = 0.1F; + this.pfcFrontScaleMid.ButtonStepSmall = 0.01F; + this.pfcFrontScaleMid.ButtonStepsUseModifierKeys = true; + this.pfcFrontScaleMid.DefaultValue = 1F; + this.pfcFrontScaleMid.Field1 = "scalex_mid"; + this.pfcFrontScaleMid.Field2 = "scaley_mid"; + this.pfcFrontScaleMid.LinkValues = false; + this.pfcFrontScaleMid.Location = new System.Drawing.Point(96, 49); + this.pfcFrontScaleMid.Name = "pfcFrontScaleMid"; + this.pfcFrontScaleMid.Size = new System.Drawing.Size(186, 26); + this.pfcFrontScaleMid.TabIndex = 39; + this.pfcFrontScaleMid.OnValuesChanged += new System.EventHandler(this.pfcFrontScaleMid_OnValuesChanged); + // + // groupBox6 + // + this.groupBox6.Controls.Add(this.labelFrontTextureOffset); + this.groupBox6.Controls.Add(this.labelFrontOffsetBottom); + this.groupBox6.Controls.Add(this.frontTextureOffset); + this.groupBox6.Controls.Add(this.labelFrontOffsetMid); + this.groupBox6.Controls.Add(this.pfcFrontOffsetTop); + this.groupBox6.Controls.Add(this.labelFrontOffsetTop); + this.groupBox6.Controls.Add(this.pfcFrontOffsetMid); + this.groupBox6.Controls.Add(this.pfcFrontOffsetBottom); + this.groupBox6.Location = new System.Drawing.Point(12, 142); + this.groupBox6.Name = "groupBox6"; + this.groupBox6.Size = new System.Drawing.Size(290, 143); + this.groupBox6.TabIndex = 43; + this.groupBox6.TabStop = false; + this.groupBox6.Text = " Texture offsets "; + // + // labelFrontTextureOffset + // + this.labelFrontTextureOffset.Location = new System.Drawing.Point(14, 23); + this.labelFrontTextureOffset.Name = "labelFrontTextureOffset"; + this.labelFrontTextureOffset.Size = new System.Drawing.Size(80, 14); + this.labelFrontTextureOffset.TabIndex = 46; + this.labelFrontTextureOffset.Tag = ""; + this.labelFrontTextureOffset.Text = "Sidedef offset:"; + this.labelFrontTextureOffset.TextAlign = System.Drawing.ContentAlignment.TopRight; + // + // labelFrontOffsetBottom + // + this.labelFrontOffsetBottom.Location = new System.Drawing.Point(14, 118); + this.labelFrontOffsetBottom.Name = "labelFrontOffsetBottom"; + this.labelFrontOffsetBottom.Size = new System.Drawing.Size(80, 14); + this.labelFrontOffsetBottom.TabIndex = 45; + this.labelFrontOffsetBottom.Tag = ""; + this.labelFrontOffsetBottom.Text = "Lower offset:"; + this.labelFrontOffsetBottom.TextAlign = System.Drawing.ContentAlignment.TopRight; + // + // frontTextureOffset + // + this.frontTextureOffset.ButtonStep = 1; + this.frontTextureOffset.ButtonStepBig = 16F; + this.frontTextureOffset.ButtonStepSmall = 0.1F; + this.frontTextureOffset.ButtonStepsUseModifierKeys = true; + this.frontTextureOffset.DefaultValue = 0; + this.frontTextureOffset.Location = new System.Drawing.Point(96, 17); + this.frontTextureOffset.Name = "frontTextureOffset"; + this.frontTextureOffset.Size = new System.Drawing.Size(186, 26); + this.frontTextureOffset.TabIndex = 41; + this.frontTextureOffset.OnValuesChanged += new System.EventHandler(this.frontTextureOffset_OnValuesChanged); + // + // labelFrontOffsetMid + // + this.labelFrontOffsetMid.Location = new System.Drawing.Point(14, 86); + this.labelFrontOffsetMid.Name = "labelFrontOffsetMid"; + this.labelFrontOffsetMid.Size = new System.Drawing.Size(80, 14); + this.labelFrontOffsetMid.TabIndex = 44; + this.labelFrontOffsetMid.Tag = ""; + this.labelFrontOffsetMid.Text = "Middle offset:"; + this.labelFrontOffsetMid.TextAlign = System.Drawing.ContentAlignment.TopRight; + // + // pfcFrontOffsetTop + // + this.pfcFrontOffsetTop.AllowDecimal = true; + this.pfcFrontOffsetTop.AllowValueLinking = false; + this.pfcFrontOffsetTop.ButtonStep = 1; + this.pfcFrontOffsetTop.ButtonStepBig = 16F; + this.pfcFrontOffsetTop.ButtonStepFloat = 1F; + this.pfcFrontOffsetTop.ButtonStepSmall = 0.1F; + this.pfcFrontOffsetTop.ButtonStepsUseModifierKeys = true; + this.pfcFrontOffsetTop.DefaultValue = 0F; + this.pfcFrontOffsetTop.Field1 = "offsetx_top"; + this.pfcFrontOffsetTop.Field2 = "offsety_top"; + this.pfcFrontOffsetTop.LinkValues = false; + this.pfcFrontOffsetTop.Location = new System.Drawing.Point(96, 49); + this.pfcFrontOffsetTop.Name = "pfcFrontOffsetTop"; + this.pfcFrontOffsetTop.Size = new System.Drawing.Size(186, 26); + this.pfcFrontOffsetTop.TabIndex = 35; + this.pfcFrontOffsetTop.OnValuesChanged += new System.EventHandler(this.pfcFrontOffsetTop_OnValuesChanged); + // + // labelFrontOffsetTop + // + this.labelFrontOffsetTop.Location = new System.Drawing.Point(14, 54); + this.labelFrontOffsetTop.Name = "labelFrontOffsetTop"; + this.labelFrontOffsetTop.Size = new System.Drawing.Size(80, 14); + this.labelFrontOffsetTop.TabIndex = 43; + this.labelFrontOffsetTop.Tag = ""; + this.labelFrontOffsetTop.Text = "Upper offset:"; + this.labelFrontOffsetTop.TextAlign = System.Drawing.ContentAlignment.TopRight; + // + // pfcFrontOffsetMid + // + this.pfcFrontOffsetMid.AllowDecimal = true; + this.pfcFrontOffsetMid.AllowValueLinking = false; + this.pfcFrontOffsetMid.ButtonStep = 1; + this.pfcFrontOffsetMid.ButtonStepBig = 16F; + this.pfcFrontOffsetMid.ButtonStepFloat = 1F; + this.pfcFrontOffsetMid.ButtonStepSmall = 0.1F; + this.pfcFrontOffsetMid.ButtonStepsUseModifierKeys = true; + this.pfcFrontOffsetMid.DefaultValue = 0F; + this.pfcFrontOffsetMid.Field1 = "offsetx_mid"; + this.pfcFrontOffsetMid.Field2 = "offsety_mid"; + this.pfcFrontOffsetMid.LinkValues = false; + this.pfcFrontOffsetMid.Location = new System.Drawing.Point(96, 81); + this.pfcFrontOffsetMid.Name = "pfcFrontOffsetMid"; + this.pfcFrontOffsetMid.Size = new System.Drawing.Size(186, 26); + this.pfcFrontOffsetMid.TabIndex = 36; + this.pfcFrontOffsetMid.OnValuesChanged += new System.EventHandler(this.pfcFrontOffsetMid_OnValuesChanged); + // + // pfcFrontOffsetBottom + // + this.pfcFrontOffsetBottom.AllowDecimal = true; + this.pfcFrontOffsetBottom.AllowValueLinking = false; + this.pfcFrontOffsetBottom.ButtonStep = 1; + this.pfcFrontOffsetBottom.ButtonStepBig = 16F; + this.pfcFrontOffsetBottom.ButtonStepFloat = 1F; + this.pfcFrontOffsetBottom.ButtonStepSmall = 0.1F; + this.pfcFrontOffsetBottom.ButtonStepsUseModifierKeys = true; + this.pfcFrontOffsetBottom.DefaultValue = 0F; + this.pfcFrontOffsetBottom.Field1 = "offsetx_bottom"; + this.pfcFrontOffsetBottom.Field2 = "offsety_bottom"; + this.pfcFrontOffsetBottom.LinkValues = false; + this.pfcFrontOffsetBottom.Location = new System.Drawing.Point(96, 113); + this.pfcFrontOffsetBottom.Name = "pfcFrontOffsetBottom"; + this.pfcFrontOffsetBottom.Size = new System.Drawing.Size(186, 26); + this.pfcFrontOffsetBottom.TabIndex = 37; + this.pfcFrontOffsetBottom.OnValuesChanged += new System.EventHandler(this.pfcFrontOffsetBottom_OnValuesChanged); + // + // groupBox5 + // + this.groupBox5.Controls.Add(this.resetfrontlight); + this.groupBox5.Controls.Add(this.frontsector); + this.groupBox5.Controls.Add(label11); + this.groupBox5.Controls.Add(this.customfrontbutton); + this.groupBox5.Controls.Add(this.lightFront); + this.groupBox5.Controls.Add(this.labelLightFront); + this.groupBox5.Controls.Add(this.cbLightAbsoluteFront); + this.groupBox5.Location = new System.Drawing.Point(12, 19); + this.groupBox5.Name = "groupBox5"; + this.groupBox5.Size = new System.Drawing.Size(290, 117); + this.groupBox5.TabIndex = 42; + this.groupBox5.TabStop = false; + // + // resetfrontlight + // + this.resetfrontlight.Image = global::CodeImp.DoomBuilder.Properties.Resources.Reset; + this.resetfrontlight.Location = new System.Drawing.Point(233, 50); + this.resetfrontlight.Name = "resetfrontlight"; + this.resetfrontlight.Size = new System.Drawing.Size(23, 23); + this.resetfrontlight.TabIndex = 28; + this.tooltip.SetToolTip(this.resetfrontlight, "Reset Front Brightness"); + this.resetfrontlight.UseVisualStyleBackColor = true; + this.resetfrontlight.Click += new System.EventHandler(this.resetfrontlight_Click); + // + // frontsector + // + this.frontsector.AllowDecimal = false; + this.frontsector.AllowExpressions = false; + this.frontsector.AllowNegative = false; + this.frontsector.AllowRelative = false; + this.frontsector.ButtonStep = 1; + this.frontsector.ButtonStepBig = 10F; + this.frontsector.ButtonStepFloat = 1F; + this.frontsector.ButtonStepSmall = 0.1F; + this.frontsector.ButtonStepsUseModifierKeys = false; + this.frontsector.ButtonStepsWrapAround = false; + this.frontsector.Location = new System.Drawing.Point(96, 19); + 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(96, 79); + 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); + // + // lightFront + // + this.lightFront.AllowDecimal = false; + this.lightFront.AllowExpressions = false; + this.lightFront.AllowNegative = true; + this.lightFront.AllowRelative = true; + this.lightFront.ButtonStep = 16; + this.lightFront.ButtonStepBig = 32F; + this.lightFront.ButtonStepFloat = 1F; + this.lightFront.ButtonStepSmall = 1F; + this.lightFront.ButtonStepsUseModifierKeys = true; + this.lightFront.ButtonStepsWrapAround = false; + this.lightFront.Location = new System.Drawing.Point(96, 49); + 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); + // + // cbLightAbsoluteFront + // + this.cbLightAbsoluteFront.AutoSize = true; + this.cbLightAbsoluteFront.Location = new System.Drawing.Point(164, 54); + this.cbLightAbsoluteFront.Name = "cbLightAbsoluteFront"; + this.cbLightAbsoluteFront.Size = new System.Drawing.Size(67, 17); + 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); + // + // frontlow + // + this.frontlow.Location = new System.Drawing.Point(309, 409); + this.frontlow.MultipleTextures = false; + this.frontlow.Name = "frontlow"; + this.frontlow.Required = false; + this.frontlow.Size = new System.Drawing.Size(220, 189); + this.frontlow.TabIndex = 6; + this.frontlow.TextureName = ""; + this.frontlow.OnValueChanged += new System.EventHandler(this.frontlow_OnValueChanged); + // + // frontmid + // + this.frontmid.Location = new System.Drawing.Point(309, 214); + this.frontmid.MultipleTextures = false; + this.frontmid.Name = "frontmid"; + this.frontmid.Required = false; + this.frontmid.Size = new System.Drawing.Size(220, 189); + this.frontmid.TabIndex = 5; + this.frontmid.TextureName = ""; + this.frontmid.OnValueChanged += new System.EventHandler(this.frontmid_OnValueChanged); + // + // fronthigh + // + this.fronthigh.Location = new System.Drawing.Point(309, 19); + this.fronthigh.MultipleTextures = false; + this.fronthigh.Name = "fronthigh"; + this.fronthigh.Required = false; + this.fronthigh.Size = new System.Drawing.Size(220, 189); + this.fronthigh.TabIndex = 4; + this.fronthigh.TextureName = ""; + this.fronthigh.OnValueChanged += new System.EventHandler(this.fronthigh_OnValueChanged); + // + // tabback + // + this.tabback.Controls.Add(this.backside); + this.tabback.Controls.Add(this.backgroup); + this.tabback.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.tabback.ImageIndex = 1; + this.tabback.Location = new System.Drawing.Point(4, 23); + this.tabback.Name = "tabback"; + this.tabback.Padding = new System.Windows.Forms.Padding(5); + this.tabback.Size = new System.Drawing.Size(549, 621); + this.tabback.TabIndex = 3; + this.tabback.Text = " Back "; + this.tabback.UseVisualStyleBackColor = true; + // + // backside + // + this.backside.AutoSize = true; + this.backside.Location = new System.Drawing.Point(20, 6); + this.backside.Name = "backside"; + this.backside.Size = new System.Drawing.Size(73, 17); + 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.groupBox4); + this.backgroup.Controls.Add(this.backflagsgroup); + this.backgroup.Controls.Add(this.backscalegroup); + this.backgroup.Controls.Add(this.groupBox1); + this.backgroup.Controls.Add(this.backlow); + this.backgroup.Controls.Add(this.backmid); + this.backgroup.Controls.Add(this.backhigh); + this.backgroup.Enabled = false; + this.backgroup.Location = new System.Drawing.Point(8, 8); + this.backgroup.Name = "backgroup"; + this.backgroup.Size = new System.Drawing.Size(535, 605); + this.backgroup.TabIndex = 1; + this.backgroup.TabStop = false; + this.backgroup.Text = " "; + // + // groupBox4 + // + this.groupBox4.Controls.Add(this.resetbacklight); + this.groupBox4.Controls.Add(this.backsector); + this.groupBox4.Controls.Add(label12); + this.groupBox4.Controls.Add(this.custombackbutton); + this.groupBox4.Controls.Add(this.lightBack); + this.groupBox4.Controls.Add(this.labelLightBack); + this.groupBox4.Controls.Add(this.cbLightAbsoluteBack); + this.groupBox4.Location = new System.Drawing.Point(12, 19); + this.groupBox4.Name = "groupBox4"; + this.groupBox4.Size = new System.Drawing.Size(290, 117); + this.groupBox4.TabIndex = 46; + this.groupBox4.TabStop = false; + // + // resetbacklight + // + this.resetbacklight.Image = global::CodeImp.DoomBuilder.Properties.Resources.Reset; + this.resetbacklight.Location = new System.Drawing.Point(233, 50); + this.resetbacklight.Name = "resetbacklight"; + this.resetbacklight.Size = new System.Drawing.Size(23, 23); + this.resetbacklight.TabIndex = 31; + this.tooltip.SetToolTip(this.resetbacklight, "Reset Back Brightness"); + this.resetbacklight.UseVisualStyleBackColor = true; + this.resetbacklight.Click += new System.EventHandler(this.resetbacklight_Click); + // + // backsector + // + this.backsector.AllowDecimal = false; + this.backsector.AllowExpressions = false; + this.backsector.AllowNegative = false; + this.backsector.AllowRelative = false; + this.backsector.ButtonStep = 1; + this.backsector.ButtonStepBig = 10F; + this.backsector.ButtonStepFloat = 1F; + this.backsector.ButtonStepSmall = 0.1F; + this.backsector.ButtonStepsUseModifierKeys = false; + this.backsector.ButtonStepsWrapAround = false; + this.backsector.Location = new System.Drawing.Point(96, 19); + 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(96, 79); + 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); + // + // lightBack + // + this.lightBack.AllowDecimal = false; + this.lightBack.AllowExpressions = false; + this.lightBack.AllowNegative = true; + this.lightBack.AllowRelative = true; + this.lightBack.ButtonStep = 1; + this.lightBack.ButtonStepBig = 16F; + this.lightBack.ButtonStepFloat = 1F; + this.lightBack.ButtonStepSmall = 1F; + this.lightBack.ButtonStepsUseModifierKeys = true; + this.lightBack.ButtonStepsWrapAround = false; + this.lightBack.Location = new System.Drawing.Point(96, 49); + 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); + // + // labelLightBack + // + this.labelLightBack.Location = new System.Drawing.Point(12, 53); + 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; + // + // cbLightAbsoluteBack + // + this.cbLightAbsoluteBack.AutoSize = true; + this.cbLightAbsoluteBack.Location = new System.Drawing.Point(164, 54); + this.cbLightAbsoluteBack.Name = "cbLightAbsoluteBack"; + this.cbLightAbsoluteBack.Size = new System.Drawing.Size(67, 17); + 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); + // + // backflagsgroup + // + this.backflagsgroup.Controls.Add(this.flagsBack); + this.backflagsgroup.Location = new System.Drawing.Point(12, 409); + this.backflagsgroup.Name = "backflagsgroup"; + this.backflagsgroup.Size = new System.Drawing.Size(290, 190); + this.backflagsgroup.TabIndex = 45; + this.backflagsgroup.TabStop = false; + this.backflagsgroup.Text = " Flags "; + // + // flagsBack + // + this.flagsBack.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.flagsBack.AutoScroll = true; + this.flagsBack.Columns = 2; + this.flagsBack.Location = new System.Drawing.Point(16, 16); + this.flagsBack.Name = "flagsBack"; + this.flagsBack.Size = new System.Drawing.Size(269, 168); + this.flagsBack.TabIndex = 1; + this.flagsBack.VerticalSpacing = 3; + this.flagsBack.OnValueChanged += new System.EventHandler(this.flagsBack_OnValueChanged); + // + // backscalegroup + // + this.backscalegroup.Controls.Add(this.labelBackScaleBottom); + this.backscalegroup.Controls.Add(this.labelBackScaleMid); + this.backscalegroup.Controls.Add(this.labelBackScaleTop); + this.backscalegroup.Controls.Add(this.pfcBackScaleTop); + this.backscalegroup.Controls.Add(this.pfcBackScaleBottom); + this.backscalegroup.Controls.Add(this.pfcBackScaleMid); + this.backscalegroup.Location = new System.Drawing.Point(12, 291); + this.backscalegroup.Name = "backscalegroup"; + this.backscalegroup.Size = new System.Drawing.Size(290, 112); + this.backscalegroup.TabIndex = 44; + this.backscalegroup.TabStop = false; + this.backscalegroup.Text = " Texture scale"; + // + // labelBackScaleBottom + // + this.labelBackScaleBottom.Location = new System.Drawing.Point(14, 86); + this.labelBackScaleBottom.Name = "labelBackScaleBottom"; + this.labelBackScaleBottom.Size = new System.Drawing.Size(80, 14); + this.labelBackScaleBottom.TabIndex = 45; + this.labelBackScaleBottom.Tag = ""; + this.labelBackScaleBottom.Text = "Lower scale:"; + this.labelBackScaleBottom.TextAlign = System.Drawing.ContentAlignment.TopRight; + // + // labelBackScaleMid + // + this.labelBackScaleMid.Location = new System.Drawing.Point(14, 54); + this.labelBackScaleMid.Name = "labelBackScaleMid"; + this.labelBackScaleMid.Size = new System.Drawing.Size(80, 14); + this.labelBackScaleMid.TabIndex = 44; + this.labelBackScaleMid.Tag = ""; + this.labelBackScaleMid.Text = "Middle scale:"; + this.labelBackScaleMid.TextAlign = System.Drawing.ContentAlignment.TopRight; + // + // labelBackScaleTop + // + this.labelBackScaleTop.Location = new System.Drawing.Point(14, 22); + this.labelBackScaleTop.Name = "labelBackScaleTop"; + this.labelBackScaleTop.Size = new System.Drawing.Size(80, 14); + this.labelBackScaleTop.TabIndex = 43; + this.labelBackScaleTop.Tag = ""; + this.labelBackScaleTop.Text = "Upper scale:"; + this.labelBackScaleTop.TextAlign = System.Drawing.ContentAlignment.TopRight; + // + // pfcBackScaleTop + // + this.pfcBackScaleTop.AllowDecimal = true; + this.pfcBackScaleTop.AllowValueLinking = true; + this.pfcBackScaleTop.ButtonStep = 1; + this.pfcBackScaleTop.ButtonStepBig = 1F; + this.pfcBackScaleTop.ButtonStepFloat = 0.1F; + this.pfcBackScaleTop.ButtonStepSmall = 0.01F; + this.pfcBackScaleTop.ButtonStepsUseModifierKeys = true; + this.pfcBackScaleTop.DefaultValue = 1F; + this.pfcBackScaleTop.Field1 = "scalex_top"; + this.pfcBackScaleTop.Field2 = "scaley_top"; + this.pfcBackScaleTop.LinkValues = false; + this.pfcBackScaleTop.Location = new System.Drawing.Point(96, 17); + this.pfcBackScaleTop.Name = "pfcBackScaleTop"; + this.pfcBackScaleTop.Size = new System.Drawing.Size(186, 26); + 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.ButtonStepBig = 1F; + this.pfcBackScaleBottom.ButtonStepFloat = 0.1F; + this.pfcBackScaleBottom.ButtonStepSmall = 0.01F; + this.pfcBackScaleBottom.ButtonStepsUseModifierKeys = true; + this.pfcBackScaleBottom.DefaultValue = 1F; + this.pfcBackScaleBottom.Field1 = "scalex_bottom"; + this.pfcBackScaleBottom.Field2 = "scaley_bottom"; + this.pfcBackScaleBottom.LinkValues = false; + this.pfcBackScaleBottom.Location = new System.Drawing.Point(96, 81); + this.pfcBackScaleBottom.Name = "pfcBackScaleBottom"; + this.pfcBackScaleBottom.Size = new System.Drawing.Size(186, 26); + this.pfcBackScaleBottom.TabIndex = 40; + this.pfcBackScaleBottom.OnValuesChanged += new System.EventHandler(this.pfcBackScaleBottom_OnValuesChanged); + // + // pfcBackScaleMid + // + this.pfcBackScaleMid.AllowDecimal = true; + this.pfcBackScaleMid.AllowValueLinking = true; + this.pfcBackScaleMid.ButtonStep = 1; + this.pfcBackScaleMid.ButtonStepBig = 1F; + this.pfcBackScaleMid.ButtonStepFloat = 0.1F; + this.pfcBackScaleMid.ButtonStepSmall = 0.01F; + this.pfcBackScaleMid.ButtonStepsUseModifierKeys = true; + this.pfcBackScaleMid.DefaultValue = 1F; + this.pfcBackScaleMid.Field1 = "scalex_mid"; + this.pfcBackScaleMid.Field2 = "scaley_mid"; + this.pfcBackScaleMid.LinkValues = false; + this.pfcBackScaleMid.Location = new System.Drawing.Point(96, 49); + this.pfcBackScaleMid.Name = "pfcBackScaleMid"; + this.pfcBackScaleMid.Size = new System.Drawing.Size(186, 26); + this.pfcBackScaleMid.TabIndex = 39; + this.pfcBackScaleMid.OnValuesChanged += new System.EventHandler(this.pfcBackScaleMid_OnValuesChanged); + // + // groupBox1 + // + this.groupBox1.Controls.Add(this.labelBackTextureOffset); + this.groupBox1.Controls.Add(this.labelBackOffsetBottom); + this.groupBox1.Controls.Add(this.labelBackOffsetMid); + this.groupBox1.Controls.Add(this.labelBackOffsetTop); + this.groupBox1.Controls.Add(this.pfcBackOffsetTop); + this.groupBox1.Controls.Add(this.pfcBackOffsetMid); + this.groupBox1.Controls.Add(this.pfcBackOffsetBottom); + this.groupBox1.Controls.Add(this.backTextureOffset); + this.groupBox1.Location = new System.Drawing.Point(12, 142); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(290, 143); + this.groupBox1.TabIndex = 43; + this.groupBox1.TabStop = false; + this.groupBox1.Text = " Texture offsets "; + // + // labelBackTextureOffset + // + this.labelBackTextureOffset.Location = new System.Drawing.Point(14, 23); + this.labelBackTextureOffset.Name = "labelBackTextureOffset"; + this.labelBackTextureOffset.Size = new System.Drawing.Size(80, 14); + this.labelBackTextureOffset.TabIndex = 50; + this.labelBackTextureOffset.Tag = ""; + this.labelBackTextureOffset.Text = "Sidedef offset:"; + this.labelBackTextureOffset.TextAlign = System.Drawing.ContentAlignment.TopRight; + // + // labelBackOffsetBottom + // + this.labelBackOffsetBottom.Location = new System.Drawing.Point(14, 118); + this.labelBackOffsetBottom.Name = "labelBackOffsetBottom"; + this.labelBackOffsetBottom.Size = new System.Drawing.Size(80, 14); + this.labelBackOffsetBottom.TabIndex = 49; + this.labelBackOffsetBottom.Tag = ""; + this.labelBackOffsetBottom.Text = "Lower offset:"; + this.labelBackOffsetBottom.TextAlign = System.Drawing.ContentAlignment.TopRight; + // + // labelBackOffsetMid + // + this.labelBackOffsetMid.Location = new System.Drawing.Point(14, 86); + this.labelBackOffsetMid.Name = "labelBackOffsetMid"; + this.labelBackOffsetMid.Size = new System.Drawing.Size(80, 14); + this.labelBackOffsetMid.TabIndex = 48; + this.labelBackOffsetMid.Tag = ""; + this.labelBackOffsetMid.Text = "Middle offset:"; + this.labelBackOffsetMid.TextAlign = System.Drawing.ContentAlignment.TopRight; + // + // labelBackOffsetTop + // + this.labelBackOffsetTop.Location = new System.Drawing.Point(14, 54); + this.labelBackOffsetTop.Name = "labelBackOffsetTop"; + this.labelBackOffsetTop.Size = new System.Drawing.Size(80, 14); + this.labelBackOffsetTop.TabIndex = 47; + this.labelBackOffsetTop.Tag = ""; + this.labelBackOffsetTop.Text = "Upper offset:"; + this.labelBackOffsetTop.TextAlign = System.Drawing.ContentAlignment.TopRight; + // + // pfcBackOffsetTop + // + this.pfcBackOffsetTop.AllowDecimal = true; + this.pfcBackOffsetTop.AllowValueLinking = false; + this.pfcBackOffsetTop.ButtonStep = 1; + this.pfcBackOffsetTop.ButtonStepBig = 16F; + this.pfcBackOffsetTop.ButtonStepFloat = 1F; + this.pfcBackOffsetTop.ButtonStepSmall = 0.1F; + this.pfcBackOffsetTop.ButtonStepsUseModifierKeys = true; + this.pfcBackOffsetTop.DefaultValue = 0F; + this.pfcBackOffsetTop.Field1 = "offsetx_top"; + this.pfcBackOffsetTop.Field2 = "offsety_top"; + this.pfcBackOffsetTop.LinkValues = false; + this.pfcBackOffsetTop.Location = new System.Drawing.Point(96, 49); + this.pfcBackOffsetTop.Name = "pfcBackOffsetTop"; + this.pfcBackOffsetTop.Size = new System.Drawing.Size(186, 26); + this.pfcBackOffsetTop.TabIndex = 35; + this.pfcBackOffsetTop.OnValuesChanged += new System.EventHandler(this.pfcBackOffsetTop_OnValuesChanged); + // + // pfcBackOffsetMid + // + this.pfcBackOffsetMid.AllowDecimal = true; + this.pfcBackOffsetMid.AllowValueLinking = false; + this.pfcBackOffsetMid.ButtonStep = 1; + this.pfcBackOffsetMid.ButtonStepBig = 16F; + this.pfcBackOffsetMid.ButtonStepFloat = 1F; + this.pfcBackOffsetMid.ButtonStepSmall = 0.1F; + this.pfcBackOffsetMid.ButtonStepsUseModifierKeys = true; + this.pfcBackOffsetMid.DefaultValue = 0F; + this.pfcBackOffsetMid.Field1 = "offsetx_mid"; + this.pfcBackOffsetMid.Field2 = "offsety_mid"; + this.pfcBackOffsetMid.LinkValues = false; + this.pfcBackOffsetMid.Location = new System.Drawing.Point(96, 81); + this.pfcBackOffsetMid.Name = "pfcBackOffsetMid"; + this.pfcBackOffsetMid.Size = new System.Drawing.Size(186, 26); + this.pfcBackOffsetMid.TabIndex = 36; + this.pfcBackOffsetMid.OnValuesChanged += new System.EventHandler(this.pfcBackOffsetMid_OnValuesChanged); + // + // pfcBackOffsetBottom + // + this.pfcBackOffsetBottom.AllowDecimal = true; + this.pfcBackOffsetBottom.AllowValueLinking = false; + this.pfcBackOffsetBottom.ButtonStep = 1; + this.pfcBackOffsetBottom.ButtonStepBig = 16F; + this.pfcBackOffsetBottom.ButtonStepFloat = 1F; + this.pfcBackOffsetBottom.ButtonStepSmall = 0.1F; + this.pfcBackOffsetBottom.ButtonStepsUseModifierKeys = true; + this.pfcBackOffsetBottom.DefaultValue = 0F; + this.pfcBackOffsetBottom.Field1 = "offsetx_bottom"; + this.pfcBackOffsetBottom.Field2 = "offsety_bottom"; + this.pfcBackOffsetBottom.LinkValues = false; + this.pfcBackOffsetBottom.Location = new System.Drawing.Point(96, 113); + this.pfcBackOffsetBottom.Name = "pfcBackOffsetBottom"; + this.pfcBackOffsetBottom.Size = new System.Drawing.Size(186, 26); + this.pfcBackOffsetBottom.TabIndex = 37; + this.pfcBackOffsetBottom.OnValuesChanged += new System.EventHandler(this.pfcBackOffsetBottom_OnValuesChanged); + // + // backTextureOffset + // + this.backTextureOffset.ButtonStep = 1; + this.backTextureOffset.ButtonStepBig = 16F; + this.backTextureOffset.ButtonStepSmall = 0.1F; + this.backTextureOffset.ButtonStepsUseModifierKeys = true; + this.backTextureOffset.DefaultValue = 0; + this.backTextureOffset.Location = new System.Drawing.Point(96, 17); + this.backTextureOffset.Name = "backTextureOffset"; + this.backTextureOffset.Size = new System.Drawing.Size(186, 26); + this.backTextureOffset.TabIndex = 42; + this.backTextureOffset.OnValuesChanged += new System.EventHandler(this.backTextureOffset_OnValuesChanged); + // + // backlow + // + this.backlow.Location = new System.Drawing.Point(309, 409); + this.backlow.MultipleTextures = false; + this.backlow.Name = "backlow"; + this.backlow.Required = false; + this.backlow.Size = new System.Drawing.Size(220, 189); + this.backlow.TabIndex = 6; + this.backlow.TextureName = ""; + this.backlow.OnValueChanged += new System.EventHandler(this.backlow_OnValueChanged); + // + // backmid + // + this.backmid.Location = new System.Drawing.Point(309, 214); + this.backmid.MultipleTextures = false; + this.backmid.Name = "backmid"; + this.backmid.Required = false; + this.backmid.Size = new System.Drawing.Size(220, 189); + this.backmid.TabIndex = 5; + this.backmid.TextureName = ""; + this.backmid.OnValueChanged += new System.EventHandler(this.backmid_OnValueChanged); + // + // backhigh + // + this.backhigh.Location = new System.Drawing.Point(309, 19); + this.backhigh.MultipleTextures = false; + this.backhigh.Name = "backhigh"; + this.backhigh.Required = false; + this.backhigh.Size = new System.Drawing.Size(220, 189); + this.backhigh.TabIndex = 4; + this.backhigh.TextureName = ""; + this.backhigh.OnValueChanged += new System.EventHandler(this.backhigh_OnValueChanged); + // + // tabcomment + // + this.tabcomment.Controls.Add(this.commenteditor); + this.tabcomment.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); + this.tabcomment.Location = new System.Drawing.Point(4, 23); + this.tabcomment.Name = "tabcomment"; + this.tabcomment.Size = new System.Drawing.Size(549, 621); + this.tabcomment.TabIndex = 4; + this.tabcomment.Text = "Comment"; + this.tabcomment.UseVisualStyleBackColor = true; + // + // commenteditor + // + this.commenteditor.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.commenteditor.Location = new System.Drawing.Point(3, 3); + this.commenteditor.Name = "commenteditor"; + this.commenteditor.Size = new System.Drawing.Size(543, 615); + this.commenteditor.TabIndex = 0; + // + // tabcustom + // + this.tabcustom.Controls.Add(this.fieldslist); + this.tabcustom.Font = new System.Drawing.Font("Microsoft Sans Serif", 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.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.ShowFixedFields = true; + 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; + // + // imagelist + // + this.imagelist.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imagelist.ImageStream"))); + this.imagelist.TransparentColor = System.Drawing.Color.Transparent; + this.imagelist.Images.SetKeyName(0, "Check.png"); + this.imagelist.Images.SetKeyName(1, "SearchClear.png"); + // + // LinedefEditFormSRB2 + // + 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.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "LinedefEditFormSRB2"; + this.Opacity = 0D; + 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.flagsgroup.ResumeLayout(false); + this.tabs.ResumeLayout(false); + this.tabproperties.ResumeLayout(false); + this.groupsettings.ResumeLayout(false); + this.groupsettings.PerformLayout(); + this.idgroup.ResumeLayout(false); + this.tabfront.ResumeLayout(false); + this.tabfront.PerformLayout(); + this.frontgroup.ResumeLayout(false); + this.frontflagsgroup.ResumeLayout(false); + this.frontscalegroup.ResumeLayout(false); + this.groupBox6.ResumeLayout(false); + this.groupBox5.ResumeLayout(false); + this.groupBox5.PerformLayout(); + this.tabback.ResumeLayout(false); + this.tabback.PerformLayout(); + this.backgroup.ResumeLayout(false); + this.groupBox4.ResumeLayout(false); + this.groupBox4.PerformLayout(); + this.backflagsgroup.ResumeLayout(false); + this.backscalegroup.ResumeLayout(false); + this.groupBox1.ResumeLayout(false); + this.tabcomment.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 tabfront; + 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 System.Windows.Forms.Button customfrontbutton; + private System.Windows.Forms.Button custombackbutton; + private CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox frontsector; + private CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox backsector; + private CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox lightFront; + private System.Windows.Forms.CheckBox cbLightAbsoluteFront; + private CodeImp.DoomBuilder.Controls.PairedFieldsControl pfcFrontOffsetTop; + private CodeImp.DoomBuilder.Controls.PairedFieldsControl pfcFrontOffsetBottom; + private CodeImp.DoomBuilder.Controls.PairedFieldsControl pfcFrontOffsetMid; + private CodeImp.DoomBuilder.Controls.PairedFieldsControl pfcFrontScaleBottom; + private CodeImp.DoomBuilder.Controls.PairedFieldsControl pfcFrontScaleMid; + private CodeImp.DoomBuilder.Controls.PairedFieldsControl pfcFrontScaleTop; + private CodeImp.DoomBuilder.Controls.PairedFieldsControl pfcBackScaleBottom; + private CodeImp.DoomBuilder.Controls.PairedFieldsControl pfcBackScaleMid; + private CodeImp.DoomBuilder.Controls.PairedFieldsControl pfcBackScaleTop; + private CodeImp.DoomBuilder.Controls.PairedFieldsControl pfcBackOffsetBottom; + private CodeImp.DoomBuilder.Controls.PairedFieldsControl pfcBackOffsetMid; + private CodeImp.DoomBuilder.Controls.PairedFieldsControl pfcBackOffsetTop; + private System.Windows.Forms.GroupBox groupsettings; + private System.Windows.Forms.ComboBox renderStyle; + 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.Controls.PairedIntControl frontTextureOffset; + private CodeImp.DoomBuilder.Controls.PairedIntControl backTextureOffset; + private CodeImp.DoomBuilder.Controls.CheckboxArrayControl flagsFront; + private CodeImp.DoomBuilder.Controls.CheckboxArrayControl flagsBack; + private System.Windows.Forms.ToolTip tooltip; + private System.Windows.Forms.TabPage tabback; + private System.Windows.Forms.GroupBox backflagsgroup; + private System.Windows.Forms.GroupBox backscalegroup; + private System.Windows.Forms.GroupBox groupBox1; + private System.Windows.Forms.GroupBox groupBox4; + private System.Windows.Forms.GroupBox groupBox5; + private System.Windows.Forms.GroupBox frontflagsgroup; + private System.Windows.Forms.GroupBox frontscalegroup; + private System.Windows.Forms.GroupBox groupBox6; + private System.Windows.Forms.ImageList imagelist; + private System.Windows.Forms.Label labelrenderstyle; + private CodeImp.DoomBuilder.Controls.ActionSpecialHelpButton actionhelp; + private System.Windows.Forms.Label labelFrontScaleMid; + private System.Windows.Forms.Label labelFrontScaleTop; + private System.Windows.Forms.Label labelFrontScaleBottom; + private System.Windows.Forms.Label labelFrontOffsetBottom; + private System.Windows.Forms.Label labelFrontOffsetMid; + private System.Windows.Forms.Label labelFrontOffsetTop; + private System.Windows.Forms.Label labelFrontTextureOffset; + private System.Windows.Forms.Label labelBackScaleBottom; + private System.Windows.Forms.Label labelBackScaleMid; + private System.Windows.Forms.Label labelBackScaleTop; + private System.Windows.Forms.Label labelBackTextureOffset; + private System.Windows.Forms.Label labelBackOffsetBottom; + private System.Windows.Forms.Label labelBackOffsetMid; + private System.Windows.Forms.Label labelBackOffsetTop; + private System.Windows.Forms.TabPage tabcomment; + private CodeImp.DoomBuilder.Controls.CommentEditor commenteditor; + private CodeImp.DoomBuilder.Controls.ArgumentsControlSRB2 argscontrol; + private CodeImp.DoomBuilder.Controls.TagsSelector tagsselector; + private System.Windows.Forms.Button resetfrontlight; + private System.Windows.Forms.Button resetbacklight; + private System.Windows.Forms.Button resetalpha; + } +} \ No newline at end of file diff --git a/Source/Core/Windows/LinedefEditFormSRB2.cs b/Source/Core/Windows/LinedefEditFormSRB2.cs new file mode 100644 index 000000000..8eafbc049 --- /dev/null +++ b/Source/Core/Windows/LinedefEditFormSRB2.cs @@ -0,0 +1,1832 @@ + +#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.Config; +using CodeImp.DoomBuilder.Controls; +using CodeImp.DoomBuilder.Map; +using CodeImp.DoomBuilder.Types; + +#endregion + +namespace CodeImp.DoomBuilder.Windows +{ + internal partial class LinedefEditFormSRB2 : DelayedForm, ILinedefEditForm + { + #region ================== Events + + public event EventHandler OnValuesChanged; //mxd + + #endregion + + #region ================== Variables + + private ICollection<Linedef> lines; + private List<LinedefProperties> linedefprops; //mxd + private bool preventchanges; + private bool undocreated; //mxd + private readonly string[] renderstyles; //mxd + private readonly List<PairedFieldsControl> frontUdmfControls; //mxd + private readonly List<PairedFieldsControl> backUdmfControls; //mxd + private bool oldmapischanged; + + private struct LinedefProperties //mxd + { + public readonly Dictionary<string, bool> Flags; + public readonly double 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 = UniFields.GetFloat(line.Fields, "alpha", 1.0f); + Flags = line.GetFlags(); + } + } + + private class SidedefProperties //mxd + { + public readonly Dictionary<string, bool> Flags; + + public readonly double ScaleTopX; + public readonly double ScaleTopY; + public readonly double ScaleMidX; + public readonly double ScaleMidY; + public readonly double ScaleBottomX; + public readonly double ScaleBottomY; + + public readonly int OffsetX; + public readonly int OffsetY; + + public readonly double OffsetTopX; + public readonly double OffsetTopY; + public readonly double OffsetMidX; + public readonly double OffsetMidY; + public readonly double OffsetBottomX; + public readonly double OffsetBottomY; + + public readonly int Brightness; + public readonly bool AbsoluteBrightness; + + public readonly string HighTexture; + public readonly string MiddleTexture; + public readonly string LowTexture; + + public SidedefProperties(Sidedef side) + { + Flags = side.GetFlags(); + + // Offset + OffsetX = side.OffsetX; + OffsetY = side.OffsetY; + + Brightness = UniFields.GetInteger(side.Fields, "light", 0); + AbsoluteBrightness = side.Fields.GetValue("lightabsolute", false); + + // Scale + ScaleTopX = UniFields.GetFloat(side.Fields, "scalex_top", 1.0f); + ScaleTopY = UniFields.GetFloat(side.Fields, "scaley_top", 1.0f); + ScaleMidX = UniFields.GetFloat(side.Fields, "scalex_mid", 1.0f); + ScaleMidY = UniFields.GetFloat(side.Fields, "scaley_mid", 1.0f); + ScaleBottomX = UniFields.GetFloat(side.Fields, "scalex_bottom", 1.0f); + ScaleBottomY = UniFields.GetFloat(side.Fields, "scaley_bottom", 1.0f); + + // Local offsets + OffsetTopX = UniFields.GetFloat(side.Fields, "offsetx_top", 0f); + OffsetTopY = UniFields.GetFloat(side.Fields, "offsety_top", 0f); + OffsetMidX = UniFields.GetFloat(side.Fields, "offsetx_mid", 0f); + OffsetMidY = UniFields.GetFloat(side.Fields, "offsety_mid", 0f); + OffsetBottomX = UniFields.GetFloat(side.Fields, "offsetx_bottom", 0f); + OffsetBottomY = UniFields.GetFloat(side.Fields, "offsety_bottom", 0f); + + // Textures + HighTexture = side.HighTexture; + MiddleTexture = side.MiddleTexture; + LowTexture = side.LowTexture; + } + } + + #endregion + + #region ================== Constructor + + public LinedefEditFormSRB2(bool selectfront, bool selectback) + { + // Initialize + InitializeComponent(); + + // Widow setup + if(General.Settings.StoreSelectedEditTab) + { + int activetab = General.Settings.ReadSetting("windows." + configname + ".activetab", 0); + + // When front or back tab was previously selected, switch to appropriate side (selectfront/selectback are set in BaseVisualGeometrySidedef.OnEditEnd) + if((selectfront || selectback) && (activetab == 1 || activetab == 2)) + tabs.SelectTab(selectfront ? 1 : 2); + else + tabs.SelectTab(activetab); + } + + // Fill flags lists + foreach(KeyValuePair<string, string> lf in General.Map.Config.LinedefFlags) + flags.Add(lf.Value, lf.Key); + flags.Enabled = General.Map.Config.LinedefFlags.Count > 0; + + // Fill sidedef flags lists + foreach(KeyValuePair<string, string> lf in General.Map.Config.SidedefFlags) + { + flagsFront.Add(lf.Value, lf.Key); + flagsBack.Add(lf.Value, lf.Key); + } + flagsFront.Enabled = General.Map.Config.SidedefFlags.Count > 0; + flagsBack.Enabled = General.Map.Config.SidedefFlags.Count > 0; + + // Fill actions list + action.AddInfo(General.Map.Config.SortedLinedefActions.ToArray()); + + // Initialize image selectors + fronthigh.Initialize(); + frontmid.Initialize(); + frontlow.Initialize(); + backhigh.Initialize(); + backmid.Initialize(); + backlow.Initialize(); + + // Initialize custom fields editor + fieldslist.Setup("linedef"); + + // Fill universal fields list + fieldslist.ListFixedFields(General.Map.Config.LinedefFields); + + // Initialize controls + frontUdmfControls = new List<PairedFieldsControl> { pfcFrontOffsetTop, pfcFrontOffsetMid, pfcFrontOffsetBottom, pfcFrontScaleTop, pfcFrontScaleMid, pfcFrontScaleBottom }; + backUdmfControls = new List<PairedFieldsControl> { pfcBackOffsetTop, pfcBackOffsetMid, pfcBackOffsetBottom, pfcBackScaleTop, pfcBackScaleMid, pfcBackScaleBottom }; + + // Setup renderstyles + renderstyles = new string[General.Map.Config.LinedefRenderStyles.Count]; + General.Map.Config.LinedefRenderStyles.Keys.CopyTo(renderstyles, 0); + renderStyle.Enabled = (General.Map.Config.LinedefRenderStyles.Count > 0); + labelrenderstyle.Enabled = (General.Map.Config.LinedefRenderStyles.Count > 0); + + // Fill renderstyles + foreach(KeyValuePair<string, string> lf in General.Map.Config.LinedefRenderStyles) + renderStyle.Items.Add(lf.Value); + + // Restore value linking + pfcFrontScaleTop.LinkValues = General.Settings.ReadSetting("windows." + configname + ".linkfronttopscale", false); + pfcFrontScaleMid.LinkValues = General.Settings.ReadSetting("windows." + configname + ".linkfrontmidscale", false); + pfcFrontScaleBottom.LinkValues = General.Settings.ReadSetting("windows." + configname + ".linkfrontbottomscale", false); + pfcBackScaleTop.LinkValues = General.Settings.ReadSetting("windows." + configname + ".linkbacktopscale", false); + pfcBackScaleMid.LinkValues = General.Settings.ReadSetting("windows." + configname + ".linkbackmidscale", false); + pfcBackScaleBottom.LinkValues = General.Settings.ReadSetting("windows." + configname + ".linkbackbottomscale", false); + + // Disable top/mid/bottom texture offset controls? + if(!General.Map.Config.UseLocalSidedefTextureOffsets) + { + pfcFrontOffsetTop.Enabled = false; + pfcFrontOffsetMid.Enabled = false; + pfcFrontOffsetBottom.Enabled = false; + + pfcBackOffsetTop.Enabled = false; + pfcBackOffsetMid.Enabled = false; + pfcBackOffsetBottom.Enabled = false; + + labelFrontOffsetTop.Enabled = false; + labelFrontOffsetMid.Enabled = false; + labelFrontOffsetBottom.Enabled = false; + + labelBackOffsetTop.Enabled = false; + labelBackOffsetMid.Enabled = false; + labelBackOffsetBottom.Enabled = false; + } + + // Diable brightness controls? + if(!General.Map.Config.DistinctWallBrightness) + { + lightFront.Enabled = false; + cbLightAbsoluteFront.Enabled = false; + resetfrontlight.Enabled = false; + + lightBack.Enabled = false; + cbLightAbsoluteBack.Enabled = false; + resetbacklight.Enabled = false; + } + } + + #endregion + + #region ================== Methods + + // This sets up the form to edit the given lines + public void Setup(ICollection<Linedef> lines, bool selectfront, bool selectback) + { + // Window setup + // ano - moved this here because we don't reinstantiate the thing every time anymore + if (General.Settings.StoreSelectedEditTab) + { + int activetab = General.Settings.ReadSetting("windows." + configname + ".activetab", 0); + + // When front or back tab was previously selected, switch to appropriate side (selectfront/selectback are set in BaseVisualGeometrySidedef.OnEditEnd) + if ((selectfront || selectback) && (activetab == 1 || activetab == 2)) + tabs.SelectTab(selectfront ? 1 : 2); + else + tabs.SelectTab(activetab); + } + + preventchanges = true; + oldmapischanged = General.Map.IsChanged; + undocreated = false; + argscontrol.Reset(); + tagsselector.Reset(); + + // Keep this list + this.lines = lines; + if(lines.Count > 1) this.Text = "Edit Linedefs (" + lines.Count + ")"; + linedefprops = new List<LinedefProperties>(); + + //////////////////////////////////////////////////////////////////////// + // 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()]; + + fieldslist.SetValues(fl.Fields, true); // Custom fields + commenteditor.SetValues(fl.Fields, true); //mxd. Comments + renderStyle.SelectedIndex = Array.IndexOf(renderstyles, fl.Fields.GetValue("renderstyle", "translucent")); + alpha.Text = General.Clamp(fl.Fields.GetValue("alpha", 1.0), 0.0, 1.0).ToString(); + + // Action + action.Value = fl.Action; + + //mxd. Args + argscontrol.SetValue(fl, true); + + // Front side and back side checkboxes + frontside.Checked = (fl.Front != null); + #if MONO_WINFORMS + frontgroup.Enabled = (fl.Front != null); + #endif + backside.Checked = (fl.Back != null); + #if MONO_WINFORMS + backgroup.Enabled = (fl.Back != null); + #endif + + // 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(); + + // Flags + foreach(CheckBox c in flagsFront.Checkboxes) + if(fl.Front.Flags.ContainsKey(c.Tag.ToString())) c.Checked = fl.Front.Flags[c.Tag.ToString()]; + + // Front settings + foreach(PairedFieldsControl pfc in frontUdmfControls) + pfc.SetValuesFrom(fl.Front.Fields, true); + + lightFront.Text = UniFields.GetInteger(fl.Front.Fields, "light", 0).ToString(); + cbLightAbsoluteFront.Checked = fl.Front.Fields.GetValue("lightabsolute", false); + + 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(); + + // Flags + foreach(CheckBox c in flagsBack.Checkboxes) + if(fl.Back.Flags.ContainsKey(c.Tag.ToString())) c.Checked = fl.Back.Flags[c.Tag.ToString()]; + + // Back settings + foreach(PairedFieldsControl pfc in backUdmfControls) + pfc.SetValuesFrom(fl.Back.Fields, true); + + lightBack.Text = UniFields.GetInteger(fl.Back.Fields, "light", 0).ToString(); + cbLightAbsoluteBack.Checked = fl.Back.Fields.GetValue("lightabsolute", false); + + 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; + } + } + + //mxd. UDMF Settings + + // Render style + if(renderStyle.SelectedIndex > -1 && renderStyle.SelectedIndex != Array.IndexOf(renderstyles, l.Fields.GetValue("renderstyle", "translucent"))) + renderStyle.SelectedIndex = -1; + + // Alpha + if(!string.IsNullOrEmpty(alpha.Text) && General.Clamp(alpha.GetResultFloat(1.0), 0.0, 1.0) != l.Fields.GetValue("alpha", 1.0)) + alpha.Text = string.Empty; + + // Custom fields + fieldslist.SetValues(l.Fields, false); + + //mxd. Comments + commenteditor.SetValues(l.Fields, false); + + // Action + if(l.Action != action.Value) action.Empty = true; + + //mxd. Arguments + argscontrol.SetValue(l, false); + + // 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(!string.IsNullOrEmpty(fronthigh.TextureName) && fronthigh.TextureName != l.Front.HighTexture) + { + if(!fronthigh.Required && l.Front.HighRequired()) fronthigh.Required = true; + fronthigh.MultipleTextures = true; + fronthigh.TextureName = string.Empty; + } + if(!string.IsNullOrEmpty(frontmid.TextureName) && frontmid.TextureName != l.Front.MiddleTexture) + { + if(!frontmid.Required && l.Front.MiddleRequired()) frontmid.Required = true; + frontmid.MultipleTextures = true; + frontmid.TextureName = string.Empty; + } + if(!string.IsNullOrEmpty(frontlow.TextureName) && 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; + + //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; + } + } + + //mxd + foreach(PairedFieldsControl pfc in frontUdmfControls) + pfc.SetValuesFrom(l.Front.Fields, false); + + if(!string.IsNullOrEmpty(lightFront.Text)) + { + int light = UniFields.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; + } + + frontTextureOffset.SetValues(l.Front.OffsetX, l.Front.OffsetY, false); //mxd + } + + // Back settings + if(l.Back != null) + { + //mxd + if(!string.IsNullOrEmpty(backhigh.TextureName) && backhigh.TextureName != l.Back.HighTexture) + { + if(!backhigh.Required && l.Back.HighRequired()) backhigh.Required = true; + backhigh.MultipleTextures = true; + backhigh.TextureName = string.Empty; + } + if(!string.IsNullOrEmpty(backmid.TextureName) && backmid.TextureName != l.Back.MiddleTexture) + { + if(!backmid.Required && l.Back.MiddleRequired()) backmid.Required = true; + backmid.MultipleTextures = true; + backmid.TextureName = string.Empty; + } + if(!string.IsNullOrEmpty(backlow.TextureName) && backlow.TextureName != l.Back.LowTexture) + { + if(!backlow.Required && l.Back.LowRequired()) backlow.Required = true; + backlow.MultipleTextures = true; + backlow.TextureName = string.Empty; + } + if(backsector.Text != l.Back.Sector.Index.ToString()) backsector.Text = string.Empty; + + //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; + } + } + + //mxd + foreach(PairedFieldsControl pfc in backUdmfControls) + pfc.SetValuesFrom(l.Back.Fields, false); + + if(!string.IsNullOrEmpty(lightBack.Text)) + { + int light = UniFields.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; + } + + backTextureOffset.SetValues(l.Back.OffsetX, l.Back.OffsetY, false); //mxd + } + + //mxd + linedefprops.Add(new LinedefProperties(l)); + } + + //mxd. Set tags + tagsselector.SetValues(lines); + + // Refresh controls so that they show their image + backhigh.Refresh(); + backmid.Refresh(); + backlow.Refresh(); + fronthigh.Refresh(); + frontmid.Refresh(); + frontlow.Refresh(); + + preventchanges = false; + + argscontrol.UpdateScriptControls(); //mxd + actionhelp.UpdateAction(action.GetValue()); //mxd + commenteditor.FinishSetup(); //mxd + + //mxd. Update "Reset" buttons + resetfrontlight.Visible = (cbLightAbsoluteFront.CheckState != CheckState.Unchecked || lightFront.GetResult(0) != 0); + resetbacklight.Visible = (cbLightAbsoluteBack.CheckState != CheckState.Unchecked || lightBack.GetResult(0) != 0); + if(alpha.Text == "1") resetalpha.Visible = false; + } + + //mxd + private void MakeUndo() + { + if(undocreated) return; + undocreated = true; + + //mxd. Make undo + General.Map.UndoRedo.CreateUndo("Edit " + (lines.Count > 1 ? lines.Count + " linedefs" : "linedef")); + + if(General.Map.FormatInterface.HasCustomFields) + { + foreach(Linedef l in lines) + { + l.Fields.BeforeFieldsChange(); + if(l.Front != null) l.Front.Fields.BeforeFieldsChange(); + if(l.Back != null) l.Back.Fields.BeforeFieldsChange(); + } + } + } + + #endregion + + #region ================== Events + + // Apply clicked + private void apply_Click(object sender, EventArgs e) + { + // 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; + } + + MakeUndo(); + + + // Go for all the lines + int offset = 0; //mxd + foreach(Linedef l in lines) + { + // Action + if(!action.Empty) l.Action = action.Value; + + //mxd. Apply args + argscontrol.Apply(l, offset++); + + // 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) + int index = (l.Front != null ? l.Front.Sector.Index : -1); + index = frontsector.GetResult(index); + if((index > -1) && (index < General.Map.Map.Sectors.Count)) + { + Sector s = (General.Map.Map.GetSectorByIndex(index) ?? 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) + int index = (l.Back != null ? l.Back.Sector.Index : -1); + index = backsector.GetResult(index); + if((index > -1) && (index < General.Map.Map.Sectors.Count)) + { + Sector s = (General.Map.Map.GetSectorByIndex(index) ?? 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 + fieldslist.Apply(l.Fields); + commenteditor.Apply(l.Fields); + } + + //mxd. Apply tags + tagsselector.ApplyTo(lines); + + // 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... + if (undocreated) + { + General.Map.UndoRedo.WithdrawUndo(); + + // Changing certain properties of the linedef, like textures will set General.Map.IsChanged to true. + // But if cancel is pressed and the changes are discarded, and the map was not changed before, we have to force + // General.Map.IsChanged back to false + if (General.Map.IsChanged && oldmapischanged == false) + General.Map.ForceMapIsChangedFalse(); + } + + // 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); + tabfront.ImageIndex = (frontside.CheckState == CheckState.Unchecked ? 1 : 0); + } + + // 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); + tabback.ImageIndex = (backside.CheckState == CheckState.Unchecked ? 1 : 0); + } + + // 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; + + //mxd. Change the argument descriptions + argscontrol.UpdateAction(showaction, preventchanges); + + if(!preventchanges) + { + MakeUndo(); //mxd + + //mxd. Update what must be updated + argscontrol.UpdateScriptControls(); + actionhelp.UpdateAction(showaction); + } + } + + // Browse Action clicked + private void browseaction_Click(object sender, EventArgs e) + { + action.Value = ActionBrowserForm.BrowseAction(this, action.Value); + } + + //mxd + private void tabcustom_MouseEnter(object sender, EventArgs e) + { + fieldslist.Focus(); + } + + //mxd. Store window settings + private void LinedefEditForm_FormClosing(object sender, FormClosingEventArgs e) + { + // Save settings + General.Settings.WriteSetting("windows." + configname + ".activetab", tabs.SelectedIndex); + + General.Settings.WriteSetting("windows." + configname + ".linkfronttopscale", pfcFrontScaleTop.LinkValues); + General.Settings.WriteSetting("windows." + configname + ".linkfrontmidscale", pfcFrontScaleMid.LinkValues); + General.Settings.WriteSetting("windows." + configname + ".linkfrontbottomscale", pfcFrontScaleBottom.LinkValues); + General.Settings.WriteSetting("windows." + configname + ".linkbacktopscale", pfcBackScaleTop.LinkValues); + General.Settings.WriteSetting("windows." + configname + ".linkbackmidscale", pfcBackScaleMid.LinkValues); + General.Settings.WriteSetting("windows." + configname + ".linkbackbottomscale", pfcBackScaleBottom.LinkValues); + } + + // 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; + MakeUndo(); //mxd + + //update values + foreach(Linedef l in lines) + UniFields.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; + MakeUndo(); //mxd + int i = 0; + + //restore values + if(string.IsNullOrEmpty(alpha.Text)) + { + foreach(Linedef l in lines) + UniFields.SetFloat(l.Fields, "alpha", linedefprops[i++].Alpha, 1.0); + } + else //update values + { + foreach(Linedef l in lines) + { + double value = General.Clamp(alpha.GetResultFloat(l.Fields.GetValue("alpha", 1.0)), 0.0, 1.0); + UniFields.SetFloat(l.Fields, "alpha", value, 1.0); + } + } + + resetalpha.Visible = (alpha.GetResultFloat(1.0) != 1.0); + + General.Map.IsChanged = true; + if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty); + } + + private void resetalpha_Click(object sender, EventArgs e) + { + alpha.Focus(); + alpha.Text = "1"; + } + + private void flags_OnValueChanged(object sender, EventArgs e) + { + if(preventchanges) return; + MakeUndo(); //mxd + 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 ================== mxd. Realtime 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<MapElement> sides = new List<MapElement>(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 = UniFields.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 = UniFields.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<MapElement> sides = new List<MapElement>(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 = UniFields.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 = UniFields.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; + MakeUndo(); + + // 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.HighTexture : "-"); + i++; + } + } + // Update values + else + { + 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; + MakeUndo(); + + // 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.MiddleTexture : "-"); + i++; + } + } + // Update values + else + { + 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; + MakeUndo(); + + // 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.LowTexture : "-"); + i++; + } + } + // Update values + else + { + 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; + MakeUndo(); + + // 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.HighTexture : "-"); + i++; + } + } + // Update values + else + { + 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; + MakeUndo(); + + // 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.MiddleTexture : "-"); + i++; + } + } + // Update values + else + { + 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; + MakeUndo(); + + // 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.LowTexture : "-"); + i++; + } + } + // Update values + else + { + 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; + MakeUndo(); //mxd + int i = 0; + + // Reset increment steps, otherwise it's just keep counting and counting + lightFront.ResetIncrementStep(); + + //restore values + if (string.IsNullOrEmpty(lightFront.Text)) + { + foreach(Linedef l in lines) + { + if(l.Front != null) + UniFields.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; + switch(cbLightAbsoluteFront.CheckState) + { + case CheckState.Indeterminate: + absolute = l.Front.Fields.GetValue("lightabsolute", false); + break; + case CheckState.Checked: + absolute = true; + break; + } + + int value = General.Clamp(lightFront.GetResult((linedefprops[i].Front != null ? linedefprops[i].Front.Brightness : 0)), (absolute ? 0 : -255), 255); + UniFields.SetInteger(l.Front.Fields, "light", value, 0); + } + i++; + } + } + + resetfrontlight.Visible = (cbLightAbsoluteFront.CheckState != CheckState.Unchecked || lightFront.Text != "0"); + General.Map.IsChanged = true; + if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty); + } + + private void lightBack_WhenTextChanged(object sender, EventArgs e) + { + if(preventchanges) return; + MakeUndo(); //mxd + int i = 0; + + //restore values + if(string.IsNullOrEmpty(lightBack.Text)) + { + foreach(Linedef l in lines) + { + if(l.Back != null) + UniFields.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; + switch(cbLightAbsoluteBack.CheckState) + { + case CheckState.Indeterminate: + absolute = l.Back.Fields.GetValue("lightabsolute", false); + break; + case CheckState.Checked: + absolute = true; + break; + } + + int value = General.Clamp(lightBack.GetResult((linedefprops[i].Back != null ? linedefprops[i].Back.Brightness : 0)), (absolute ? 0 : -255), 255); + UniFields.SetInteger(l.Back.Fields, "light", value, 0); + } + i++; + } + } + + resetbacklight.Visible = (cbLightAbsoluteBack.CheckState != CheckState.Unchecked || lightBack.Text != "0"); + General.Map.IsChanged = true; + if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty); + } + + private void cbLightAbsoluteFront_CheckedChanged(object sender, EventArgs e) + { + if(preventchanges) return; + MakeUndo(); //mxd + + 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"); + } + } + + resetfrontlight.Visible = (cbLightAbsoluteFront.CheckState != CheckState.Unchecked || lightFront.Text != "0"); + General.Map.IsChanged = true; + if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty); + } + + private void cbLightAbsoluteBack_CheckedChanged(object sender, EventArgs e) + { + if(preventchanges) return; + MakeUndo(); //mxd + + 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"); + } + } + + resetbacklight.Visible = (cbLightAbsoluteBack.CheckState != CheckState.Unchecked || lightBack.Text != "0"); + General.Map.IsChanged = true; + if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty); + } + + private void resetfrontlight_Click(object sender, EventArgs e) + { + MakeUndo(); //mxd + + preventchanges = true; + + cbLightAbsoluteFront.Checked = false; + lightFront.Text = "0"; + + foreach(Linedef l in lines) + { + if(l.Front == null) continue; + if(l.Front.Fields.ContainsKey("lightabsolute")) l.Front.Fields.Remove("lightabsolute"); + if(l.Front.Fields.ContainsKey("light")) l.Front.Fields.Remove("light"); + } + + preventchanges = false; + + resetfrontlight.Visible = false; + lightFront.Focus(); + General.Map.IsChanged = true; + if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty); + } + + private void resetbacklight_Click(object sender, EventArgs e) + { + MakeUndo(); //mxd + + preventchanges = true; + + cbLightAbsoluteBack.Checked = false; + lightBack.Text = "0"; + + foreach(Linedef l in lines) + { + if(l.Back == null) continue; + if(l.Back.Fields.ContainsKey("lightabsolute")) l.Back.Fields.Remove("lightabsolute"); + if(l.Back.Fields.ContainsKey("light")) l.Back.Fields.Remove("light"); + } + + preventchanges = false; + + resetbacklight.Visible = false; + lightBack.Focus(); + 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; + MakeUndo(); //mxd + int i = 0; + + // Reset increment steps, otherwise it's just keep counting and counting + frontTextureOffset.ResetIncrementStep(); + + 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; + MakeUndo(); //mxd + int i = 0; + + // Reset increment steps, otherwise it's just keep counting and counting + backTextureOffset.ResetIncrementStep(); + + 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; + MakeUndo(); //mxd + int i = 0; + + // Reset increment steps, otherwise it's just keep counting and counting + pfcFrontOffsetTop.ResetIncrementStep(); + + foreach (Linedef l in lines) + { + if(l.Front != null) + { + double oldX = linedefprops[i].Front != null ? linedefprops[i].Front.OffsetTopX : 0f; + double 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; + MakeUndo(); //mxd + int i = 0; + + // Reset increment steps, otherwise it's just keep counting and counting + pfcFrontOffsetMid.ResetIncrementStep(); + + foreach (Linedef l in lines) + { + if(l.Front != null) + { + double oldX = linedefprops[i].Front != null ? linedefprops[i].Front.OffsetMidX : 0f; + double 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; + MakeUndo(); //mxd + int i = 0; + + // Reset increment steps, otherwise it's just keep counting and counting + pfcFrontOffsetBottom.ResetIncrementStep(); + + foreach (Linedef l in lines) + { + if(l.Front != null) + { + double oldX = linedefprops[i].Front != null ? linedefprops[i].Front.OffsetBottomX : 0f; + double 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; + MakeUndo(); //mxd + int i = 0; + + // Reset increment steps, otherwise it's just keep counting and counting + pfcBackOffsetTop.ResetIncrementStep(); + + foreach (Linedef l in lines) + { + if(l.Back != null) + { + double oldX = linedefprops[i].Back != null ? linedefprops[i].Back.OffsetTopX : 0f; + double 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; + MakeUndo(); //mxd + int i = 0; + + // Reset increment steps, otherwise it's just keep counting and counting + pfcBackOffsetMid.ResetIncrementStep(); + + foreach (Linedef l in lines) + { + if(l.Back != null) + { + double oldX = linedefprops[i].Back != null ? linedefprops[i].Back.OffsetMidX : 0f; + double 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; + MakeUndo(); //mxd + int i = 0; + + // Reset increment steps, otherwise it's just keep counting and counting + pfcBackOffsetBottom.ResetIncrementStep(); + + foreach (Linedef l in lines) + { + if(l.Back != null) + { + double oldX = linedefprops[i].Back != null ? linedefprops[i].Back.OffsetBottomX : 0f; + double 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; + MakeUndo(); //mxd + int i = 0; + + // Reset increment steps, otherwise it's just keep counting and counting + pfcFrontScaleTop.ResetIncrementStep(); + + foreach (Linedef l in lines) + { + if(l.Front != null) + { + double oldX = linedefprops[i].Front != null ? linedefprops[i].Front.ScaleTopX : 1.0f; + double 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; + MakeUndo(); //mxd + int i = 0; + + // Reset increment steps, otherwise it's just keep counting and counting + pfcFrontScaleMid.ResetIncrementStep(); + + foreach (Linedef l in lines) + { + if(l.Front != null) + { + double oldX = linedefprops[i].Front != null ? linedefprops[i].Front.ScaleMidX : 1.0f; + double 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; + MakeUndo(); //mxd + int i = 0; + + // Reset increment steps, otherwise it's just keep counting and counting + pfcFrontScaleBottom.ResetIncrementStep(); + + foreach (Linedef l in lines) + { + if(l.Front != null) + { + double oldX = linedefprops[i].Front != null ? linedefprops[i].Front.ScaleBottomX : 1.0f; + double 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; + MakeUndo(); //mxd + int i = 0; + + // Reset increment steps, otherwise it's just keep counting and counting + pfcBackScaleTop.ResetIncrementStep(); + + foreach (Linedef l in lines) + { + if(l.Back != null) + { + double oldX = linedefprops[i].Back != null ? linedefprops[i].Back.ScaleTopX : 1.0f; + double 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; + MakeUndo(); //mxd + int i = 0; + + // Reset increment steps, otherwise it's just keep counting and counting + pfcBackScaleMid.ResetIncrementStep(); + + foreach (Linedef l in lines) + { + if(l.Back != null) + { + double oldX = linedefprops[i].Back != null ? linedefprops[i].Back.ScaleMidX : 1.0f; + double 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; + MakeUndo(); //mxd + int i = 0; + + // Reset increment steps, otherwise it's just keep counting and counting + pfcBackScaleBottom.ResetIncrementStep(); + + foreach (Linedef l in lines) + { + if(l.Back != null) + { + double oldX = linedefprops[i].Back != null ? linedefprops[i].Back.ScaleBottomX : 1.0f; + double 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; + MakeUndo(); //mxd + 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; + MakeUndo(); //mxd + 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 + + private void argscontrol_Load(object sender, EventArgs e) + { + + } + } +} diff --git a/Source/Core/Windows/LinedefEditFormSRB2.resx b/Source/Core/Windows/LinedefEditFormSRB2.resx new file mode 100644 index 000000000..87ca1c2ed --- /dev/null +++ b/Source/Core/Windows/LinedefEditFormSRB2.resx @@ -0,0 +1,189 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <metadata name="label2.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <value>False</value> + </metadata> + <metadata name="label11.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <value>False</value> + </metadata> + <metadata name="label12.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <value>False</value> + </metadata> + <metadata name="label6.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <value>False</value> + </metadata> + <metadata name="tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> + <metadata name="tabproperties.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <value>True</value> + </metadata> + <metadata name="tabcustom.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <value>True</value> + </metadata> + <metadata name="imagelist.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>105, 17</value> + </metadata> + <data name="imagelist.ImageStream" mimetype="application/x-microsoft.net.object.binary.base64"> + <value> + AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w + LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 + ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAADM + CAAAAk1TRnQBSQFMAgEBAgEAAeABAAHgAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo + AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA + AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5 + AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA + AWYDAAGZAwABzAIAATMDAAIzAgABMwFmAgABMwGZAgABMwHMAgABMwH/AgABZgMAAWYBMwIAAmYCAAFm + AZkCAAFmAcwCAAFmAf8CAAGZAwABmQEzAgABmQFmAgACmQIAAZkBzAIAAZkB/wIAAcwDAAHMATMCAAHM + AWYCAAHMAZkCAALMAgABzAH/AgAB/wFmAgAB/wGZAgAB/wHMAQABMwH/AgAB/wEAATMBAAEzAQABZgEA + ATMBAAGZAQABMwEAAcwBAAEzAQAB/wEAAf8BMwIAAzMBAAIzAWYBAAIzAZkBAAIzAcwBAAIzAf8BAAEz + AWYCAAEzAWYBMwEAATMCZgEAATMBZgGZAQABMwFmAcwBAAEzAWYB/wEAATMBmQIAATMBmQEzAQABMwGZ + AWYBAAEzApkBAAEzAZkBzAEAATMBmQH/AQABMwHMAgABMwHMATMBAAEzAcwBZgEAATMBzAGZAQABMwLM + AQABMwHMAf8BAAEzAf8BMwEAATMB/wFmAQABMwH/AZkBAAEzAf8BzAEAATMC/wEAAWYDAAFmAQABMwEA + AWYBAAFmAQABZgEAAZkBAAFmAQABzAEAAWYBAAH/AQABZgEzAgABZgIzAQABZgEzAWYBAAFmATMBmQEA + AWYBMwHMAQABZgEzAf8BAAJmAgACZgEzAQADZgEAAmYBmQEAAmYBzAEAAWYBmQIAAWYBmQEzAQABZgGZ + AWYBAAFmApkBAAFmAZkBzAEAAWYBmQH/AQABZgHMAgABZgHMATMBAAFmAcwBmQEAAWYCzAEAAWYBzAH/ + AQABZgH/AgABZgH/ATMBAAFmAf8BmQEAAWYB/wHMAQABzAEAAf8BAAH/AQABzAEAApkCAAGZATMBmQEA + AZkBAAGZAQABmQEAAcwBAAGZAwABmQIzAQABmQEAAWYBAAGZATMBzAEAAZkBAAH/AQABmQFmAgABmQFm + ATMBAAGZATMBZgEAAZkBZgGZAQABmQFmAcwBAAGZATMB/wEAApkBMwEAApkBZgEAA5kBAAKZAcwBAAKZ + Af8BAAGZAcwCAAGZAcwBMwEAAWYBzAFmAQABmQHMAZkBAAGZAswBAAGZAcwB/wEAAZkB/wIAAZkB/wEz + AQABmQHMAWYBAAGZAf8BmQEAAZkB/wHMAQABmQL/AQABzAMAAZkBAAEzAQABzAEAAWYBAAHMAQABmQEA + AcwBAAHMAQABmQEzAgABzAIzAQABzAEzAWYBAAHMATMBmQEAAcwBMwHMAQABzAEzAf8BAAHMAWYCAAHM + AWYBMwEAAZkCZgEAAcwBZgGZAQABzAFmAcwBAAGZAWYB/wEAAcwBmQIAAcwBmQEzAQABzAGZAWYBAAHM + ApkBAAHMAZkBzAEAAcwBmQH/AQACzAIAAswBMwEAAswBZgEAAswBmQEAA8wBAALMAf8BAAHMAf8CAAHM + Af8BMwEAAZkB/wFmAQABzAH/AZkBAAHMAf8BzAEAAcwC/wEAAcwBAAEzAQAB/wEAAWYBAAH/AQABmQEA + AcwBMwIAAf8CMwEAAf8BMwFmAQAB/wEzAZkBAAH/ATMBzAEAAf8BMwH/AQAB/wFmAgAB/wFmATMBAAHM + AmYBAAH/AWYBmQEAAf8BZgHMAQABzAFmAf8BAAH/AZkCAAH/AZkBMwEAAf8BmQFmAQAB/wKZAQAB/wGZ + AcwBAAH/AZkB/wEAAf8BzAIAAf8BzAEzAQAB/wHMAWYBAAH/AcwBmQEAAf8CzAEAAf8BzAH/AQAC/wEz + AQABzAH/AWYBAAL/AZkBAAL/AcwBAAJmAf8BAAFmAf8BZgEAAWYC/wEAAf8CZgEAAf8BZgH/AQAC/wFm + AQABIQEAAaUBAANfAQADdwEAA4YBAAOWAQADywEAA7IBAAPXAQAD3QEAA+MBAAPqAQAD8QEAA/gBAAHw + AfsB/wEAAaQCoAEAA4ADAAH/AgAB/wMAAv8BAAH/AwAB/wEAAf8BAAL/AgAD/1QAAh8GAAIfKAAB/wHx + Af8KAAEfAiYBHwQAAR8CJgEfJgAB/wG7AYsBswH/CAABHwQmAR8CAAEfBCYBHyQAAf8BuwOLAbMB/wcA + ASUB3gQmAh8EJgHeASUjAAH/AbsBigOLAa0BswH/BwABJQHeCCYB3gElIwAB/wG7AooDiwKtAbMB/wcA + ASUB3gYmAd4BJSMAAf8BtQOKAYsBswGLA60BswH/BwABJQYmASUkAAHzA4oBiwHyAf8BtAKtA7MB/wYA + AR8GJgEfJAAB/wG1AYoBtAH/AgAB/wG0Aa0EswH/BAABHwgsAR8kAAH/AfEB/wQAAf8BtAWzAf8CAAEf + Ak0CLALeAiwCTQEfKwAB/wG0BLMB8wEAAR8CUwJNAd4CJQHeAk0CUwEfKwAB/wG0ArMBGQIAASUB3gJT + Ad4BJQIAASUB3gJTAd4BJSwAAf8BugEZBAABJQLeASUEAAElAt4BJTUAAiUGAAIlYwABQgFNAT4HAAE+ + AwABKAMAAUADAAEQAwABAQEAAQEFAAGAFwAD/wEABP8EAAL/AucEAAH4Af8CwwQAAfABfwKBBAAB4AE/ + AYABAQQAAcABHwHAAQMEAAGAAQ8B4AEHBQABBwHwAQ8FAAEDAfABDwQAAQYBAQHgAQcEAAGPAQABwAED + BAAB/wKAAQEEAAH/AcECgQQAAf8B4wLDBAAC/wLnBAAE/wQACw== +</value> + </data> +</root> \ No newline at end of file diff --git a/Source/Core/Windows/MainForm.cs b/Source/Core/Windows/MainForm.cs index 37cd3bc4f..8ed1e5e92 100755 --- a/Source/Core/Windows/MainForm.cs +++ b/Source/Core/Windows/MainForm.cs @@ -4171,7 +4171,14 @@ namespace CodeImp.DoomBuilder.Windows { if (General.Map.UDMF) { - return new LinedefEditFormUDMF(selectfront, selectback); + if (General.Map.Config.EngineName == "srb2") + { + return new LinedefEditFormSRB2(selectfront, selectback); + } + else + { + return new LinedefEditFormUDMF(selectfront, selectback); + } } else { -- GitLab