From 85a817f649fc35c016379eb9db0c533a3fe6be36 Mon Sep 17 00:00:00 2001 From: MaxED Date: Thu, 25 Feb 2016 19:24:25 +0000 Subject: [PATCH] Fixed, Sector Edit and Linedef Edit windows: "Clear" button behavior was broken in r2515. +A couple of cosmetic tweaks and fixes. Updated ZDoom_DECORATE.cfg. --- Build/Scripting/ZDoom_DECORATE.cfg | 27 ++++++++++++++----- Help/gc_decoratekeys.html | 2 +- .../Controls/TagSelector.Designer.cs | 7 +++-- Source/Core/GZBuilder/Controls/TagSelector.cs | 6 ++--- .../Core/GZBuilder/Controls/TagsSelector.cs | 13 +++++---- .../Interface/JitterSectorsForm.Designer.cs | 2 +- 6 files changed, 37 insertions(+), 20 deletions(-) diff --git a/Build/Scripting/ZDoom_DECORATE.cfg b/Build/Scripting/ZDoom_DECORATE.cfg index 1ae6fbac..9c4a4835 100644 --- a/Build/Scripting/ZDoom_DECORATE.cfg +++ b/Build/Scripting/ZDoom_DECORATE.cfg @@ -382,17 +382,30 @@ keywords A_ShootGun = "A_ShootGun"; A_SPosAttackUseAtkSound = "A_SPosAttackUseAtkSound"; //Mathematical functions - abs = "float abs(x)\nReturns the absolute value of x."; - sin = "float sin(x)\nTrigonometry function, x must be in degrees."; - cos = "float cos(x)\nTrigonometry function, x must be in degrees."; - sqrt = "float sqrt(x)\nReturns the square root of x."; + abs = "abs(x)\nReturns the absolute value of x."; + sin = "sin(x)\nTrigonometry function, x must be in degrees."; + cos = "cos(x)\nTrigonometry function, x must be in degrees."; + tan = "tan(x)\nTrigonometry function, x must be in degrees."; + asin = "asin(x)\nTrigonometry function, returns an angle in degrees."; + acos = "acos(x)\nTrigonometry function, returns an angle in degrees."; + atan = "atan(x)\nTrigonometry function, returns an angle in degrees."; + sinh = "sinh(x)\nTrigonometry function, x must be in radians."; + cosh = "cosh(x)\nTrigonometry function, x must be in radians."; + tanh = "tanh(x)\nTrigonometry function, x must be in radians."; + exp = "exp(x)\nReturns the base-e exponential function of x, which is e raised to the power x."; + log = "log(x)\nReturns the natural logarithm of x - the opposite of exp."; + log10 = "log10(x)\nReturns the common (base-10) logarithm of x."; + ceil = "ceil(x)\nRounds the number upward to the next closest integer."; + floor = "floor(x)\nRounds the number downward to the next closest integer."; + sqrt = "sqrt(x)\nReturns the square root of x."; + min = "min(x1, ...)\nGets the smallest value of all values listed.\nCan take any amount of numbers, and can solve both ints and floats."; + max = "max(x1, ...)\nGets the largest value of all values listed.\nCan take any amount of numbers, and can solve both ints and floats."; +//Randum number functions random = "int random[identifier](min, max)\nReturns a random integer value between min and max."; random2 = "int random2[identifier](mask)\nReturns a random integer value between -mask and +mask."; frandom = "float frandom[identifier](min, max)\nReturns a random floating point value between min and max."; randompick = "int randompick[identifier](int, ...)\nPicks a number from the numbers placed in it.\nThis can take an unlimited amount of parameters."; frandompick = "float frandompick[identifier](float, ...)\nPicks a number from the numbers placed in it.\nThis can take an unlimited amount of parameters."; - min = "float min(float or int, ...)\nGets the smallest value of all values listed.\nCan take any amount of numbers, and can solve both ints and floats."; - max = "float max(float or int, ...)\nGets the largest value of all values listed.\nCan take any amount of numbers, and can solve both ints and floats."; //State functions Light = "Light(str lightname)"; Offset = "Offset(int x, int y)"; @@ -401,6 +414,8 @@ keywords IsPointerEqual = "bool IsPointerEqual(int ptr1, int ptr2)"; CountInv = "int CountInv(str itemclassname[, int ptr_select = AAPTR_DEFAULT])"; GetDistance = "float GetDistance(bool checkz[, int ptr_select = AAPTR_TARGET])"; + GetSpawnHealth = "int GetSpawnHealth()"; + GetGibHealth = "int GetGibHealth()"; } properties diff --git a/Help/gc_decoratekeys.html b/Help/gc_decoratekeys.html index 7ea42aa6..edb89ec6 100644 --- a/Help/gc_decoratekeys.html +++ b/Help/gc_decoratekeys.html @@ -32,7 +32,7 @@ Specifies which name to give to the actor. By default, a custom actor not identified in a configuration file will use the Tag property, and if not present, will default to the class name.

//$IgnoreRenderstyle - GZDB only.
- "RenderStyle" DECORATE property will be ignored by the editor. Helpful when you want to see the sprite of an invivsible actor in Visual mode.
+ "RenderStyle" DECORATE property will be ignored by the editor. Helpful when you want to see the sprite of an invisible actor in Visual mode.

//$ArgN <name> - GZDB only.
Allows to override default argument names for this actor.
diff --git a/Source/Core/GZBuilder/Controls/TagSelector.Designer.cs b/Source/Core/GZBuilder/Controls/TagSelector.Designer.cs index ec024c59..139c6d99 100644 --- a/Source/Core/GZBuilder/Controls/TagSelector.Designer.cs +++ b/Source/Core/GZBuilder/Controls/TagSelector.Designer.cs @@ -68,8 +68,7 @@ this.newTag.Size = new System.Drawing.Size(54, 24); this.newTag.TabIndex = 2; this.newTag.Text = "New"; - this.tooltip.SetToolTip(this.newTag, "Finds a tag, which is not used as a tag or tag action argument \r\nby any map eleme" + - "nt"); + this.tooltip.SetToolTip(this.newTag, "Find a tag, which is not used as a tag or tag action argument\r\nby any map element"); this.newTag.UseVisualStyleBackColor = true; this.newTag.Click += new System.EventHandler(this.newTag_Click); // @@ -80,7 +79,7 @@ this.unusedTag.Size = new System.Drawing.Size(54, 24); this.unusedTag.TabIndex = 3; this.unusedTag.Text = "Unused"; - this.tooltip.SetToolTip(this.unusedTag, "Finds a tag, which is not used as a tag \r\nby any map element of this type"); + this.tooltip.SetToolTip(this.unusedTag, "Find a tag, which is not used as a tag\r\nby any map element of this type"); this.unusedTag.UseVisualStyleBackColor = true; this.unusedTag.Click += new System.EventHandler(this.unusedTag_Click); // @@ -98,7 +97,7 @@ this.clear.Name = "clear"; this.clear.Size = new System.Drawing.Size(26, 24); this.clear.TabIndex = 4; - this.tooltip.SetToolTip(this.clear, "Sets tag to 0"); + this.tooltip.SetToolTip(this.clear, "Set tag to 0"); this.clear.UseVisualStyleBackColor = true; this.clear.Click += new System.EventHandler(this.clear_Click); // diff --git a/Source/Core/GZBuilder/Controls/TagSelector.cs b/Source/Core/GZBuilder/Controls/TagSelector.cs index f5833b82..e2689760 100644 --- a/Source/Core/GZBuilder/Controls/TagSelector.cs +++ b/Source/Core/GZBuilder/Controls/TagSelector.cs @@ -255,9 +255,9 @@ namespace CodeImp.DoomBuilder.GZBuilder.Controls private void TagSelector_Resize(object sender, EventArgs e) { clear.Left = this.Width - clear.Width - clear.Margin.Right; - unusedTag.Left = clear.Left - clear.Margin.Left - unusedTag.Margin.Right - unusedTag.Width; - newTag.Left = unusedTag.Left - unusedTag.Margin.Left - newTag.Margin.Right - newTag.Width; - cbTagPicker.Width = newTag.Left - newTag.Margin.Left - cbTagPicker.Margin.Right - cbTagPicker.Left; + unusedTag.Left = clear.Left - unusedTag.Margin.Right - unusedTag.Width; + newTag.Left = unusedTag.Left - newTag.Margin.Right - newTag.Width; + cbTagPicker.Width = newTag.Left - cbTagPicker.Margin.Right - cbTagPicker.Left; } #endregion diff --git a/Source/Core/GZBuilder/Controls/TagsSelector.cs b/Source/Core/GZBuilder/Controls/TagsSelector.cs index 70a6219c..b3d0e837 100644 --- a/Source/Core/GZBuilder/Controls/TagsSelector.cs +++ b/Source/Core/GZBuilder/Controls/TagsSelector.cs @@ -258,6 +258,8 @@ namespace CodeImp.DoomBuilder.GZBuilder.Controls if(tagpicker.SelectedIndex == -1) tagpicker.Text = tag.ToString(); } + clear.Enabled = (tagpicker.Text.Trim() != "0"); + blockupdate = false; } @@ -280,6 +282,7 @@ namespace CodeImp.DoomBuilder.GZBuilder.Controls private void clear_Click(object sender, EventArgs e) { tagpicker.Focus(); + tagpicker.SelectedIndex = -1; tagpicker.Text = "0"; tagpicker.SelectAll(); } @@ -358,6 +361,7 @@ namespace CodeImp.DoomBuilder.GZBuilder.Controls { if(blockupdate) return; + clear.Enabled = (tagpicker.Text.Trim() != "0"); if(tagpicker.SelectedItem != null) { TagInfo info = (TagInfo)tagpicker.SelectedItem; @@ -367,7 +371,6 @@ namespace CodeImp.DoomBuilder.GZBuilder.Controls } string text = tagpicker.Text.Trim(); - clear.Enabled = (text != "0"); if(string.IsNullOrEmpty(text)) { tags[curtagindex] = int.MinValue; @@ -423,11 +426,11 @@ namespace CodeImp.DoomBuilder.GZBuilder.Controls private void TagsSelector_Resize(object sender, EventArgs e) { clear.Left = this.Width - clear.Width - clear.Margin.Right; - unusedtag.Left = clear.Left - clear.Margin.Left - unusedtag.Margin.Right - unusedtag.Width; - newtag.Left = unusedtag.Left - unusedtag.Margin.Left - newtag.Margin.Right - newtag.Width; - tagpicker.Width = newtag.Left - newtag.Margin.Left - tagpicker.Margin.Right - tagpicker.Left; + unusedtag.Left = clear.Left - unusedtag.Margin.Right - unusedtag.Width; + newtag.Left = unusedtag.Left - newtag.Margin.Right - newtag.Width; + tagpicker.Width = newtag.Left - tagpicker.Margin.Right - tagpicker.Left; removetag.Left = clear.Left; - addtag.Left = removetag.Left - removetag.Margin.Left - addtag.Margin.Right - addtag.Width; + addtag.Left = removetag.Left - addtag.Margin.Right - addtag.Width; } #endregion diff --git a/Source/Plugins/BuilderEffects/Interface/JitterSectorsForm.Designer.cs b/Source/Plugins/BuilderEffects/Interface/JitterSectorsForm.Designer.cs index 88117c95..60576d7e 100644 --- a/Source/Plugins/BuilderEffects/Interface/JitterSectorsForm.Designer.cs +++ b/Source/Plugins/BuilderEffects/Interface/JitterSectorsForm.Designer.cs @@ -238,7 +238,7 @@ // this.floorHeightAmmount.AllowNegative = false; this.floorHeightAmmount.ExtendedLimits = false; - this.floorHeightAmmount.Label = "Floor height:"; + this.floorHeightAmmount.Label = "Height:"; this.floorHeightAmmount.Location = new System.Drawing.Point(6, 19); this.floorHeightAmmount.Maximum = 100; this.floorHeightAmmount.Minimum = 0;