From 357f05547804313684600d3d26ce338c85641746 Mon Sep 17 00:00:00 2001 From: MaxED <j.maxed@gmail.com> Date: Fri, 5 Dec 2014 21:34:16 +0000 Subject: [PATCH] Thing Edit Form: default action arguments were not applied. Thing\Linedef Edit Form: added some tooltips. Some cosmetic layout changes in LinedefEditForm. --- .../ActionSpecialHelpButton.Designer.cs | 4 ++ .../Controls/ActionSpecialHelpButton.resx | 3 ++ .../Core/Windows/LinedefEditForm.Designer.cs | 33 ++++++++------ Source/Core/Windows/LinedefEditForm.cs | 14 +++--- Source/Core/Windows/LinedefEditForm.resx | 3 ++ .../Windows/LinedefEditFormUDMF.Designer.cs | 28 ++++-------- Source/Core/Windows/LinedefEditFormUDMF.cs | 9 ++-- Source/Core/Windows/LinedefEditFormUDMF.resx | 11 ++--- Source/Core/Windows/ThingEditForm.Designer.cs | 27 ++++------- Source/Core/Windows/ThingEditForm.cs | 37 +++++++++------ Source/Core/Windows/ThingEditForm.resx | 15 ++----- .../Windows/ThingEditFormUDMF.Designer.cs | 45 ++++++++----------- Source/Core/Windows/ThingEditFormUDMF.cs | 34 ++++++++------ 13 files changed, 125 insertions(+), 138 deletions(-) diff --git a/Source/Core/Controls/ActionSpecialHelpButton.Designer.cs b/Source/Core/Controls/ActionSpecialHelpButton.Designer.cs index 6d0a0f94b..ec06a6071 100644 --- a/Source/Core/Controls/ActionSpecialHelpButton.Designer.cs +++ b/Source/Core/Controls/ActionSpecialHelpButton.Designer.cs @@ -25,7 +25,9 @@ /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { + this.components = new System.ComponentModel.Container(); this.button = new System.Windows.Forms.Button(); + this.tooltip = new System.Windows.Forms.ToolTip(this.components); this.SuspendLayout(); // // button @@ -37,6 +39,7 @@ this.button.Name = "button"; this.button.Size = new System.Drawing.Size(28, 26); this.button.TabIndex = 0; + this.tooltip.SetToolTip(this.button, "Open Action Reference"); this.button.UseVisualStyleBackColor = true; this.button.Click += new System.EventHandler(this.button_Click); // @@ -54,5 +57,6 @@ #endregion private System.Windows.Forms.Button button; + private System.Windows.Forms.ToolTip tooltip; } } diff --git a/Source/Core/Controls/ActionSpecialHelpButton.resx b/Source/Core/Controls/ActionSpecialHelpButton.resx index ff31a6db5..f991e2b7b 100644 --- a/Source/Core/Controls/ActionSpecialHelpButton.resx +++ b/Source/Core/Controls/ActionSpecialHelpButton.resx @@ -117,4 +117,7 @@ <resheader name="writer"> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> + <metadata name="tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> </root> \ No newline at end of file diff --git a/Source/Core/Windows/LinedefEditForm.Designer.cs b/Source/Core/Windows/LinedefEditForm.Designer.cs index c5d0e3d57..d834d6449 100644 --- a/Source/Core/Windows/LinedefEditForm.Designer.cs +++ b/Source/Core/Windows/LinedefEditForm.Designer.cs @@ -28,6 +28,7 @@ namespace CodeImp.DoomBuilder.Windows /// </summary> private void InitializeComponent() { + this.components = new System.ComponentModel.Container(); System.Windows.Forms.Label label2; System.Windows.Forms.Label label3; System.Windows.Forms.Label label4; @@ -41,6 +42,7 @@ namespace CodeImp.DoomBuilder.Windows this.cancel = new System.Windows.Forms.Button(); this.apply = new System.Windows.Forms.Button(); this.actiongroup = new System.Windows.Forms.GroupBox(); + this.actionhelp = new CodeImp.DoomBuilder.Controls.ActionSpecialHelpButton(); this.argspanel = new System.Windows.Forms.Panel(); this.scriptNumbers = new System.Windows.Forms.ComboBox(); this.arg2 = new CodeImp.DoomBuilder.Controls.ArgumentBox(); @@ -76,7 +78,7 @@ namespace CodeImp.DoomBuilder.Windows this.backhigh = new CodeImp.DoomBuilder.Controls.TextureSelectorControl(); this.backTextureOffset = new CodeImp.DoomBuilder.GZBuilder.Controls.PairedIntControl(); this.panel1 = new System.Windows.Forms.Panel(); - this.actionhelp = new CodeImp.DoomBuilder.Controls.ActionSpecialHelpButton(); + this.tooltip = new System.Windows.Forms.ToolTip(this.components); label2 = new System.Windows.Forms.Label(); label3 = new System.Windows.Forms.Label(); label4 = new System.Windows.Forms.Label(); @@ -108,7 +110,7 @@ namespace CodeImp.DoomBuilder.Windows // // label3 // - label3.Location = new System.Drawing.Point(252, 18); + label3.Location = new System.Drawing.Point(255, 18); label3.Name = "label3"; label3.Size = new System.Drawing.Size(83, 16); label3.TabIndex = 3; @@ -117,7 +119,7 @@ namespace CodeImp.DoomBuilder.Windows // // label4 // - label4.Location = new System.Drawing.Point(343, 18); + label4.Location = new System.Drawing.Point(346, 18); label4.Name = "label4"; label4.Size = new System.Drawing.Size(83, 16); label4.TabIndex = 4; @@ -126,7 +128,7 @@ namespace CodeImp.DoomBuilder.Windows // // label5 // - label5.Location = new System.Drawing.Point(434, 18); + label5.Location = new System.Drawing.Point(437, 18); label5.Name = "label5"; label5.Size = new System.Drawing.Size(83, 16); label5.TabIndex = 5; @@ -227,6 +229,13 @@ namespace CodeImp.DoomBuilder.Windows this.actiongroup.TabStop = false; this.actiongroup.Text = " Action "; // + // actionhelp + // + this.actionhelp.Location = new System.Drawing.Point(497, 25); + this.actionhelp.Name = "actionhelp"; + this.actionhelp.Size = new System.Drawing.Size(28, 25); + this.actionhelp.TabIndex = 11; + // // argspanel // this.argspanel.Controls.Add(this.scriptNumbers); @@ -388,6 +397,7 @@ namespace CodeImp.DoomBuilder.Windows this.browseaction.Size = new System.Drawing.Size(28, 25); this.browseaction.TabIndex = 1; this.browseaction.Text = " "; + this.tooltip.SetToolTip(this.browseaction, "Browse Action"); this.browseaction.UseVisualStyleBackColor = true; this.browseaction.Click += new System.EventHandler(this.browseaction_Click); // @@ -486,7 +496,7 @@ namespace CodeImp.DoomBuilder.Windows // // frontlow // - this.frontlow.Location = new System.Drawing.Point(434, 37); + this.frontlow.Location = new System.Drawing.Point(437, 37); this.frontlow.MultipleTextures = false; this.frontlow.Name = "frontlow"; this.frontlow.Required = false; @@ -498,7 +508,7 @@ namespace CodeImp.DoomBuilder.Windows // // frontmid // - this.frontmid.Location = new System.Drawing.Point(343, 37); + this.frontmid.Location = new System.Drawing.Point(346, 37); this.frontmid.MultipleTextures = false; this.frontmid.Name = "frontmid"; this.frontmid.Required = false; @@ -510,7 +520,7 @@ namespace CodeImp.DoomBuilder.Windows // // fronthigh // - this.fronthigh.Location = new System.Drawing.Point(252, 37); + this.fronthigh.Location = new System.Drawing.Point(255, 37); this.fronthigh.MultipleTextures = false; this.fronthigh.Name = "fronthigh"; this.fronthigh.Required = false; @@ -641,13 +651,6 @@ namespace CodeImp.DoomBuilder.Windows this.panel1.Size = new System.Drawing.Size(553, 746); this.panel1.TabIndex = 5; // - // actionhelp - // - this.actionhelp.Location = new System.Drawing.Point(497, 25); - this.actionhelp.Name = "actionhelp"; - this.actionhelp.Size = new System.Drawing.Size(28, 25); - this.actionhelp.TabIndex = 11; - // // LinedefEditForm // this.AcceptButton = this.apply; @@ -663,6 +666,7 @@ namespace CodeImp.DoomBuilder.Windows this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "LinedefEditForm"; + this.Opacity = 1; this.ShowIcon = false; this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; @@ -726,5 +730,6 @@ namespace CodeImp.DoomBuilder.Windows private System.Windows.Forms.ComboBox scriptNumbers; private System.Windows.Forms.Panel panel1; private CodeImp.DoomBuilder.Controls.ActionSpecialHelpButton actionhelp; + private System.Windows.Forms.ToolTip tooltip; } } \ No newline at end of file diff --git a/Source/Core/Windows/LinedefEditForm.cs b/Source/Core/Windows/LinedefEditForm.cs index 570fff159..93b1164ae 100644 --- a/Source/Core/Windows/LinedefEditForm.cs +++ b/Source/Core/Windows/LinedefEditForm.cs @@ -594,10 +594,10 @@ namespace CodeImp.DoomBuilder.Windows arg3.Setup(General.Map.Config.LinedefActions[showaction].Args[3]); arg4.Setup(General.Map.Config.LinedefActions[showaction].Args[4]); - // mxd. Apply action's default arguments if(!preventchanges) { - if(showaction != 0 && General.Map.Config.LinedefActions.ContainsKey(showaction)) + // mxd. Apply action's default arguments + if(showaction != 0) { arg0.SetDefaultValue(); arg1.SetDefaultValue(); @@ -613,13 +613,11 @@ namespace CodeImp.DoomBuilder.Windows arg3.SetValue(0); arg4.SetValue(0); } - } - if(!preventchanges) - { - UpdateScriptControls(); //mxd - actionhelp.UpdateAction(showaction); //mxd - } + //mxd. Update what must be updated + UpdateScriptControls(); + actionhelp.UpdateAction(showaction); + } } // Browse Action clicked diff --git a/Source/Core/Windows/LinedefEditForm.resx b/Source/Core/Windows/LinedefEditForm.resx index 33bb48b1b..3565314e6 100644 --- a/Source/Core/Windows/LinedefEditForm.resx +++ b/Source/Core/Windows/LinedefEditForm.resx @@ -210,4 +210,7 @@ <metadata name="backhigh.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <value>True</value> </metadata> + <metadata name="tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> </root> \ No newline at end of file diff --git a/Source/Core/Windows/LinedefEditFormUDMF.Designer.cs b/Source/Core/Windows/LinedefEditFormUDMF.Designer.cs index 8853fa924..e76c6464e 100644 --- a/Source/Core/Windows/LinedefEditFormUDMF.Designer.cs +++ b/Source/Core/Windows/LinedefEditFormUDMF.Designer.cs @@ -40,6 +40,7 @@ namespace CodeImp.DoomBuilder.Windows this.cancel = new System.Windows.Forms.Button(); this.apply = new System.Windows.Forms.Button(); this.actiongroup = new System.Windows.Forms.GroupBox(); + this.actionhelp = new CodeImp.DoomBuilder.Controls.ActionSpecialHelpButton(); this.argspanel = new System.Windows.Forms.Panel(); this.scriptNumbers = new System.Windows.Forms.ComboBox(); this.scriptNames = new System.Windows.Forms.ComboBox(); @@ -118,7 +119,6 @@ namespace CodeImp.DoomBuilder.Windows 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); - this.actionhelp = new CodeImp.DoomBuilder.Controls.ActionSpecialHelpButton(); label2 = new System.Windows.Forms.Label(); label11 = new System.Windows.Forms.Label(); label12 = new System.Windows.Forms.Label(); @@ -250,6 +250,13 @@ namespace CodeImp.DoomBuilder.Windows this.actiongroup.TabStop = false; this.actiongroup.Text = " Action "; // + // actionhelp + // + this.actionhelp.Location = new System.Drawing.Point(497, 25); + this.actionhelp.Name = "actionhelp"; + this.actionhelp.Size = new System.Drawing.Size(28, 25); + this.actionhelp.TabIndex = 10; + // // argspanel // this.argspanel.Controls.Add(this.scriptNumbers); @@ -413,7 +420,7 @@ namespace CodeImp.DoomBuilder.Windows this.browseaction.Name = "browseaction"; this.browseaction.Size = new System.Drawing.Size(28, 25); this.browseaction.TabIndex = 1; - this.browseaction.Text = " "; + this.browseaction.Text = "Browse Action"; this.browseaction.UseVisualStyleBackColor = true; this.browseaction.Click += new System.EventHandler(this.browseaction_Click); // @@ -1265,23 +1272,6 @@ namespace CodeImp.DoomBuilder.Windows this.imagelist.Images.SetKeyName(0, "Check.png"); this.imagelist.Images.SetKeyName(1, "SearchClear.png"); // - // tooltip - // - this.tooltip.AutomaticDelay = 10; - this.tooltip.AutoPopDelay = 3000; - this.tooltip.InitialDelay = 10; - this.tooltip.IsBalloon = true; - this.tooltip.ReshowDelay = 100; - this.tooltip.UseAnimation = false; - this.tooltip.UseFading = false; - // - // actionhelp - // - this.actionhelp.Location = new System.Drawing.Point(497, 25); - this.actionhelp.Name = "actionhelp"; - this.actionhelp.Size = new System.Drawing.Size(28, 25); - this.actionhelp.TabIndex = 10; - // // LinedefEditFormUDMF // this.AcceptButton = this.apply; diff --git a/Source/Core/Windows/LinedefEditFormUDMF.cs b/Source/Core/Windows/LinedefEditFormUDMF.cs index cac20e9c7..66b0e0ba1 100644 --- a/Source/Core/Windows/LinedefEditFormUDMF.cs +++ b/Source/Core/Windows/LinedefEditFormUDMF.cs @@ -919,10 +919,10 @@ namespace CodeImp.DoomBuilder.Windows arg3.Setup(General.Map.Config.LinedefActions[showaction].Args[3]); arg4.Setup(General.Map.Config.LinedefActions[showaction].Args[4]); - // mxd. Apply action's default arguments if(!preventchanges) { - if(showaction != 0 && General.Map.Config.LinedefActions.ContainsKey(showaction)) + // mxd. Apply action's default arguments + if(showaction != 0) { arg0.SetDefaultValue(); arg1.SetDefaultValue(); @@ -938,11 +938,8 @@ namespace CodeImp.DoomBuilder.Windows arg3.SetValue(0); arg4.SetValue(0); } - } - //mxd - if(!preventchanges) - { + //mxd. Update what must be updated UpdateScriptControls(); CheckActivationFlagsRequired(); actionhelp.UpdateAction(showaction); diff --git a/Source/Core/Windows/LinedefEditFormUDMF.resx b/Source/Core/Windows/LinedefEditFormUDMF.resx index 9dcdc3bc6..f441a547f 100644 --- a/Source/Core/Windows/LinedefEditFormUDMF.resx +++ b/Source/Core/Windows/LinedefEditFormUDMF.resx @@ -138,6 +138,9 @@ <metadata name="tabproperties.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <value>True</value> </metadata> + <metadata name="tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> <metadata name="tabcustom.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <value>True</value> </metadata> @@ -149,7 +152,7 @@ AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj0yLjAuMC4w LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAADM - CAAAAk1TRnQBSQFMAgEBAgEAAUABAAFAAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo + CAAAAk1TRnQBSQFMAgEBAgEAAVgBAAFYAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5 AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA @@ -189,10 +192,4 @@ BAAB/wKAAQEEAAH/AcECgQQAAf8B4wLDBAAC/wLnBAAE/wQACw== </value> </data> - <metadata name="tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>17, 17</value> - </metadata> - <metadata name="tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>17, 17</value> - </metadata> </root> \ No newline at end of file diff --git a/Source/Core/Windows/ThingEditForm.Designer.cs b/Source/Core/Windows/ThingEditForm.Designer.cs index 25ee6844a..52a633121 100644 --- a/Source/Core/Windows/ThingEditForm.Designer.cs +++ b/Source/Core/Windows/ThingEditForm.Designer.cs @@ -51,6 +51,7 @@ namespace CodeImp.DoomBuilder.Windows this.flags = new CodeImp.DoomBuilder.Controls.CheckboxArrayControl(); this.tabeffects = new System.Windows.Forms.TabPage(); this.actiongroup = new System.Windows.Forms.GroupBox(); + this.actionhelp = new CodeImp.DoomBuilder.Controls.ActionSpecialHelpButton(); this.hexenpanel = new System.Windows.Forms.Panel(); this.scriptNumbers = new System.Windows.Forms.ComboBox(); this.arg2 = new CodeImp.DoomBuilder.Controls.ArgumentBox(); @@ -73,7 +74,6 @@ namespace CodeImp.DoomBuilder.Windows this.hint = new System.Windows.Forms.PictureBox(); this.hintlabel = new System.Windows.Forms.Label(); this.tooltip = new System.Windows.Forms.ToolTip(this.components); - this.actionhelp = new CodeImp.DoomBuilder.Controls.ActionSpecialHelpButton(); groupBox1 = new System.Windows.Forms.GroupBox(); groupBox2 = new System.Windows.Forms.GroupBox(); label7 = new System.Windows.Forms.Label(); @@ -375,6 +375,13 @@ namespace CodeImp.DoomBuilder.Windows this.actiongroup.TabStop = false; this.actiongroup.Text = " Action "; // + // actionhelp + // + this.actionhelp.Location = new System.Drawing.Point(592, 25); + this.actionhelp.Name = "actionhelp"; + this.actionhelp.Size = new System.Drawing.Size(28, 25); + this.actionhelp.TabIndex = 14; + // // hexenpanel // this.hexenpanel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) @@ -519,6 +526,7 @@ namespace CodeImp.DoomBuilder.Windows this.browseaction.Size = new System.Drawing.Size(28, 25); this.browseaction.TabIndex = 1; this.browseaction.Text = " "; + this.tooltip.SetToolTip(this.browseaction, "Browse Action"); this.browseaction.UseVisualStyleBackColor = true; this.browseaction.Click += new System.EventHandler(this.browseaction_Click); // @@ -590,23 +598,6 @@ namespace CodeImp.DoomBuilder.Windows this.hintlabel.TabIndex = 4; this.hintlabel.Text = "Select categories or several thing types to randomly assign them to selection"; // - // tooltip - // - this.tooltip.AutomaticDelay = 10; - this.tooltip.AutoPopDelay = 3000; - this.tooltip.InitialDelay = 10; - this.tooltip.IsBalloon = true; - this.tooltip.ReshowDelay = 100; - this.tooltip.UseAnimation = false; - this.tooltip.UseFading = false; - // - // actionhelp - // - this.actionhelp.Location = new System.Drawing.Point(592, 25); - this.actionhelp.Name = "actionhelp"; - this.actionhelp.Size = new System.Drawing.Size(28, 25); - this.actionhelp.TabIndex = 14; - // // ThingEditForm // this.AcceptButton = this.apply; diff --git a/Source/Core/Windows/ThingEditForm.cs b/Source/Core/Windows/ThingEditForm.cs index 6755186e0..b023e7b5d 100644 --- a/Source/Core/Windows/ThingEditForm.cs +++ b/Source/Core/Windows/ThingEditForm.cs @@ -318,7 +318,8 @@ namespace CodeImp.DoomBuilder.Windows // Only when line type is known, otherwise use the thing arguments if(General.Map.Config.LinedefActions.ContainsKey(action.Value)) showaction = action.Value; - if((showaction == 0) && (thinginfo != null)) arginfo = thinginfo.Args; else arginfo = General.Map.Config.LinedefActions[showaction].Args; + if((showaction == 0) && (thinginfo != null)) arginfo = thinginfo.Args; + else arginfo = General.Map.Config.LinedefActions[showaction].Args; // Change the argument descriptions arg0label.Text = arginfo[0].Title + ":"; @@ -342,21 +343,29 @@ namespace CodeImp.DoomBuilder.Windows arg3.Setup(arginfo[3]); arg4.Setup(arginfo[4]); - // Zero all arguments when linedef action 0 (normal) is chosen - if(!preventchanges && (showaction == 0)) - { - //mxd - arg0.SetDefaultValue(); - arg1.SetDefaultValue(); - arg2.SetDefaultValue(); - arg3.SetDefaultValue(); - arg4.SetDefaultValue(); - } - if(!preventchanges) { - UpdateScriptControls(); //mxd - actionhelp.UpdateAction(showaction); //mxd + // mxd. Apply action's or thing's default arguments + if (showaction != 0 || thinginfo != null) + { + arg0.SetDefaultValue(); + arg1.SetDefaultValue(); + arg2.SetDefaultValue(); + arg3.SetDefaultValue(); + arg4.SetDefaultValue(); + } + else //or set them to 0 + { + arg0.SetValue(0); + arg1.SetValue(0); + arg2.SetValue(0); + arg3.SetValue(0); + arg4.SetValue(0); + } + + //mxd. Update what must be updated + UpdateScriptControls(); + actionhelp.UpdateAction(showaction); } } diff --git a/Source/Core/Windows/ThingEditForm.resx b/Source/Core/Windows/ThingEditForm.resx index f21be8ea8..24239a158 100644 --- a/Source/Core/Windows/ThingEditForm.resx +++ b/Source/Core/Windows/ThingEditForm.resx @@ -150,22 +150,13 @@ <metadata name="arg2label.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <value>True</value> </metadata> + <metadata name="tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> <metadata name="doompanel.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <value>True</value> </metadata> <metadata name="groupBox3.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <value>True</value> </metadata> - <metadata name="arg1label.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>True</value> - </metadata> - <metadata name="arg0label.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>True</value> - </metadata> - <metadata name="arg2label.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>True</value> - </metadata> - <metadata name="tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>17, 17</value> - </metadata> </root> \ No newline at end of file diff --git a/Source/Core/Windows/ThingEditFormUDMF.Designer.cs b/Source/Core/Windows/ThingEditFormUDMF.Designer.cs index d31e56ef8..e5b8dd3dd 100644 --- a/Source/Core/Windows/ThingEditFormUDMF.Designer.cs +++ b/Source/Core/Windows/ThingEditFormUDMF.Designer.cs @@ -76,6 +76,7 @@ this.renderStyle = new System.Windows.Forms.ComboBox(); this.labelrenderstyle = new System.Windows.Forms.Label(); this.actiongroup = new System.Windows.Forms.GroupBox(); + this.actionhelp = new CodeImp.DoomBuilder.Controls.ActionSpecialHelpButton(); this.hexenpanel = new System.Windows.Forms.Panel(); this.scriptNumbers = new System.Windows.Forms.ComboBox(); this.scriptNames = new System.Windows.Forms.ComboBox(); @@ -101,7 +102,6 @@ this.hint = new System.Windows.Forms.PictureBox(); this.hintlabel = new System.Windows.Forms.Label(); this.tooltip = new System.Windows.Forms.ToolTip(this.components); - this.actionhelp = new CodeImp.DoomBuilder.Controls.ActionSpecialHelpButton(); this.groupBox1.SuspendLayout(); this.groupBox2.SuspendLayout(); this.tabs.SuspendLayout(); @@ -697,6 +697,13 @@ this.actiongroup.TabStop = false; this.actiongroup.Text = " Action "; // + // actionhelp + // + this.actionhelp.Location = new System.Drawing.Point(581, 24); + this.actionhelp.Name = "actionhelp"; + this.actionhelp.Size = new System.Drawing.Size(28, 26); + this.actionhelp.TabIndex = 14; + // // hexenpanel // this.hexenpanel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) @@ -744,7 +751,7 @@ // // cbArgStr // - this.cbArgStr.Location = new System.Drawing.Point(14, 3); + this.cbArgStr.Location = new System.Drawing.Point(14, 1); this.cbArgStr.Name = "cbArgStr"; this.cbArgStr.Size = new System.Drawing.Size(63, 40); this.cbArgStr.TabIndex = 21; @@ -763,7 +770,7 @@ // arg1 // this.arg1.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.arg1.Location = new System.Drawing.Point(172, 37); + this.arg1.Location = new System.Drawing.Point(172, 36); this.arg1.Name = "arg1"; this.arg1.Size = new System.Drawing.Size(127, 24); this.arg1.TabIndex = 1; @@ -771,7 +778,7 @@ // arg0 // this.arg0.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.arg0.Location = new System.Drawing.Point(172, 11); + this.arg0.Location = new System.Drawing.Point(172, 9); this.arg0.Name = "arg0"; this.arg0.Size = new System.Drawing.Size(127, 24); this.arg0.TabIndex = 0; @@ -779,7 +786,7 @@ // arg3 // this.arg3.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.arg3.Location = new System.Drawing.Point(473, 11); + this.arg3.Location = new System.Drawing.Point(473, 9); this.arg3.Name = "arg3"; this.arg3.Size = new System.Drawing.Size(127, 24); this.arg3.TabIndex = 3; @@ -787,14 +794,14 @@ // arg4 // this.arg4.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.arg4.Location = new System.Drawing.Point(473, 37); + this.arg4.Location = new System.Drawing.Point(473, 36); this.arg4.Name = "arg4"; this.arg4.Size = new System.Drawing.Size(127, 24); this.arg4.TabIndex = 4; // // arg1label // - this.arg1label.Location = new System.Drawing.Point(-13, 42); + this.arg1label.Location = new System.Drawing.Point(-13, 41); this.arg1label.Name = "arg1label"; this.arg1label.Size = new System.Drawing.Size(179, 14); this.arg1label.TabIndex = 14; @@ -804,7 +811,7 @@ // // arg0label // - this.arg0label.Location = new System.Drawing.Point(-13, 16); + this.arg0label.Location = new System.Drawing.Point(-13, 14); this.arg0label.Name = "arg0label"; this.arg0label.Size = new System.Drawing.Size(179, 14); this.arg0label.TabIndex = 12; @@ -814,7 +821,7 @@ // // arg3label // - this.arg3label.Location = new System.Drawing.Point(288, 16); + this.arg3label.Location = new System.Drawing.Point(288, 14); this.arg3label.Name = "arg3label"; this.arg3label.Size = new System.Drawing.Size(179, 14); this.arg3label.TabIndex = 20; @@ -834,7 +841,7 @@ // // arg4label // - this.arg4label.Location = new System.Drawing.Point(288, 42); + this.arg4label.Location = new System.Drawing.Point(288, 41); this.arg4label.Name = "arg4label"; this.arg4label.Size = new System.Drawing.Size(179, 14); this.arg4label.TabIndex = 16; @@ -864,6 +871,7 @@ this.browseaction.Size = new System.Drawing.Size(28, 26); this.browseaction.TabIndex = 1; this.browseaction.Text = " "; + this.tooltip.SetToolTip(this.browseaction, "Browse Action"); this.browseaction.UseVisualStyleBackColor = true; this.browseaction.Click += new System.EventHandler(this.browseaction_Click); // @@ -959,23 +967,6 @@ this.hintlabel.TabIndex = 4; this.hintlabel.Text = "Select categories or several thing types to randomly assign them to selection"; // - // tooltip - // - this.tooltip.AutomaticDelay = 10; - this.tooltip.AutoPopDelay = 3000; - this.tooltip.InitialDelay = 10; - this.tooltip.IsBalloon = true; - this.tooltip.ReshowDelay = 100; - this.tooltip.UseAnimation = false; - this.tooltip.UseFading = false; - // - // actionhelp - // - this.actionhelp.Location = new System.Drawing.Point(581, 24); - this.actionhelp.Name = "actionhelp"; - this.actionhelp.Size = new System.Drawing.Size(28, 26); - this.actionhelp.TabIndex = 14; - // // ThingEditFormUDMF // this.AcceptButton = this.apply; diff --git a/Source/Core/Windows/ThingEditFormUDMF.cs b/Source/Core/Windows/ThingEditFormUDMF.cs index 1895925b3..2fec55370 100644 --- a/Source/Core/Windows/ThingEditFormUDMF.cs +++ b/Source/Core/Windows/ThingEditFormUDMF.cs @@ -437,21 +437,29 @@ namespace CodeImp.DoomBuilder.Windows arg3.Setup(arginfo[3]); arg4.Setup(arginfo[4]); - // Zero all arguments when linedef action 0 (normal) is chosen - if(!preventchanges && (showaction == 0)) + if(!preventchanges) { - //mxd - arg0.SetDefaultValue(); - arg1.SetDefaultValue(); - arg2.SetDefaultValue(); - arg3.SetDefaultValue(); - arg4.SetDefaultValue(); - } + // mxd. Apply action's or thing's default arguments + if(showaction != 0 || thinginfo != null) + { + arg0.SetDefaultValue(); + arg1.SetDefaultValue(); + arg2.SetDefaultValue(); + arg3.SetDefaultValue(); + arg4.SetDefaultValue(); + } + else //or set them to 0 + { + arg0.SetValue(0); + arg1.SetValue(0); + arg2.SetValue(0); + arg3.SetValue(0); + arg4.SetValue(0); + } - if(!preventchanges) - { - UpdateScriptControls(); //mxd - actionhelp.UpdateAction(showaction); //mxd + //mxd. Update what must be updated + UpdateScriptControls(); + actionhelp.UpdateAction(showaction); } } -- GitLab