From e487a9c80a0fc960949b5f816b5290ef226014c6 Mon Sep 17 00:00:00 2001 From: MaxED Date: Thu, 16 Jan 2014 09:32:05 +0000 Subject: [PATCH] Added Draw Grid mode. When Draw Rectangle or Draw Ellipse mode is enabled, it's settings are now shown in side panel. Draw Ellipse mode: increased maximum number of sides to 512. Changed the way tags are shown in Tag Selector controls. Tags without labels are now shown as a number (not "Tag N"), and tags with label are now shown as "N (label)", not "label (N)". Tag labels are now shown in Thing, Sector and Linedef info panels. Once again changed the way things are rendered while dragged. Rearranged the label in PairedIntControl and PairedFieldControl (it is now behind numeric controls). Optimized MapSet.GetSectorByCoordinates(). --- Source/Core/Actions/HintsManager.cs | 11 + Source/Core/Builder.csproj | 1 + Source/Core/Controls/LinedefInfoPanel.cs | 4 +- Source/Core/Controls/SectorInfoPanel.cs | 2 +- .../Core/Controls/ThingInfoPanel.Designer.cs | 22 +- Source/Core/Controls/ThingInfoPanel.cs | 6 +- Source/Core/Controls/ThingInfoPanel.resx | 12 - .../Controls/PairedFieldsControl.Designer.cs | 2 +- .../Controls/PairedFieldsControl.resx | 210 +++++----- .../Controls/PairedIntControl.Designer.cs | 6 +- .../GZBuilder/Controls/PairedIntControl.resx | 210 +++++----- Source/Core/GZBuilder/Controls/TagSelector.cs | 22 +- .../Windows/TagStatisticsForm.Designer.cs | 87 ++-- .../GZBuilder/Windows/TagStatisticsForm.cs | 71 +++- .../GZBuilder/Windows/TagStatisticsForm.resx | 220 +++++----- Source/Core/Map/MapSet.cs | 20 +- Source/Core/Properties/AssemblyInfo.cs | 2 +- Source/Core/Properties/Resources.Designer.cs | 2 +- Source/Core/Properties/Resources.resx | 6 +- Source/Core/Rendering/Presentation.cs | 11 +- .../Plugins/BuilderModes/BuilderModes.csproj | 37 ++ .../ClassicModes/DrawCurveMode.cs | 2 +- .../ClassicModes/DrawEllipseMode.cs | 100 ++++- .../ClassicModes/DrawGeometryMode.cs | 4 +- .../BuilderModes/ClassicModes/DrawGridMode.cs | 379 ++++++++++++++++++ .../ClassicModes/DrawRectangleMode.cs | 119 ++++-- .../BuilderModes/ClassicModes/SectorsMode.cs | 4 +- .../BuilderModes/General/BuilderPlug.cs | 24 +- .../Plugins/BuilderModes/General/HintLabel.cs | 6 +- .../DrawEllipseOptionsPanel.Designer.cs | 180 +++++++++ .../Interface/DrawEllipseOptionsPanel.cs | 47 +++ .../Interface/DrawEllipseOptionsPanel.resx | 120 ++++++ .../DrawGridOptionsPanel.Designer.cs | 169 ++++++++ .../Interface/DrawGridOptionsPanel.cs | 31 ++ .../Interface/DrawGridOptionsPanel.resx | 120 ++++++ .../DrawRectangleOptionsPanel.Designer.cs | 170 ++++++++ .../Interface/DrawRectangleOptionsPanel.cs | 47 +++ .../Interface/DrawRectangleOptionsPanel.resx | 120 ++++++ .../Interface/EditSelectionPanel.Designer.cs | 190 +-------- .../Interface/EditSelectionPanel.resx | 212 +++++----- .../BuilderModes/Properties/AssemblyInfo.cs | 2 +- .../Properties/Resources.Designer.cs | 14 + .../BuilderModes/Properties/Resources.resx | 18 +- .../BuilderModes/Resources/Actions.cfg | 11 + .../BuilderModes/Resources/DrawGridMode.png | Bin 0 -> 435 bytes .../Plugins/BuilderModes/Resources/Reset.png | Bin 0 -> 520 bytes 46 files changed, 2276 insertions(+), 777 deletions(-) create mode 100644 Source/Core/Actions/HintsManager.cs create mode 100644 Source/Plugins/BuilderModes/ClassicModes/DrawGridMode.cs create mode 100644 Source/Plugins/BuilderModes/Interface/DrawEllipseOptionsPanel.Designer.cs create mode 100644 Source/Plugins/BuilderModes/Interface/DrawEllipseOptionsPanel.cs create mode 100644 Source/Plugins/BuilderModes/Interface/DrawEllipseOptionsPanel.resx create mode 100644 Source/Plugins/BuilderModes/Interface/DrawGridOptionsPanel.Designer.cs create mode 100644 Source/Plugins/BuilderModes/Interface/DrawGridOptionsPanel.cs create mode 100644 Source/Plugins/BuilderModes/Interface/DrawGridOptionsPanel.resx create mode 100644 Source/Plugins/BuilderModes/Interface/DrawRectangleOptionsPanel.Designer.cs create mode 100644 Source/Plugins/BuilderModes/Interface/DrawRectangleOptionsPanel.cs create mode 100644 Source/Plugins/BuilderModes/Interface/DrawRectangleOptionsPanel.resx create mode 100644 Source/Plugins/BuilderModes/Resources/DrawGridMode.png create mode 100644 Source/Plugins/BuilderModes/Resources/Reset.png diff --git a/Source/Core/Actions/HintsManager.cs b/Source/Core/Actions/HintsManager.cs new file mode 100644 index 00000000..808caa33 --- /dev/null +++ b/Source/Core/Actions/HintsManager.cs @@ -0,0 +1,11 @@ + +namespace CodeImp.DoomBuilder.Actions +{ + public class HintsManager + { + public static string GetRtfString(string text) { + text = text.Replace("", "{\\b ").Replace("", "}").Replace("
", "\\par\\par "); + return "{\\rtf1" + text + "}"; + } + } +} diff --git a/Source/Core/Builder.csproj b/Source/Core/Builder.csproj index f5d1c01b..36d13ded 100644 --- a/Source/Core/Builder.csproj +++ b/Source/Core/Builder.csproj @@ -656,6 +656,7 @@ + diff --git a/Source/Core/Controls/LinedefInfoPanel.cs b/Source/Core/Controls/LinedefInfoPanel.cs index ec720ad7..d4ea9559 100644 --- a/Source/Core/Controls/LinedefInfoPanel.cs +++ b/Source/Core/Controls/LinedefInfoPanel.cs @@ -137,8 +137,8 @@ namespace CodeImp.DoomBuilder.Controls infopanel.Text = " Linedef " + l.Index + " "; action.Text = act.ToString(); length.Text = l.Length.ToString("0.##"); - angle.Text = l.AngleDeg.ToString() + "\u00B0"; - tag.Text = l.Tag.ToString(); + angle.Text = l.AngleDeg + "\u00B0"; + tag.Text = l.Tag + (General.Map.Options.TagLabels.ContainsKey(l.Tag) ? " (" + General.Map.Options.TagLabels[l.Tag] + ")" : string.Empty); unpegged.Text = peggedness; //mxd diff --git a/Source/Core/Controls/SectorInfoPanel.cs b/Source/Core/Controls/SectorInfoPanel.cs index 0b487acb..8d1ccda4 100644 --- a/Source/Core/Controls/SectorInfoPanel.cs +++ b/Source/Core/Controls/SectorInfoPanel.cs @@ -59,7 +59,7 @@ namespace CodeImp.DoomBuilder.Controls effect.Text = effectinfo; ceiling.Text = s.CeilHeight.ToString(); floor.Text = s.FloorHeight.ToString(); - tag.Text = s.Tag.ToString(); + tag.Text = s.Tag + (General.Map.Options.TagLabels.ContainsKey(s.Tag) ? " (" + General.Map.Options.TagLabels[s.Tag] + ")" : string.Empty); height.Text = sheight.ToString(); brightness.Text = s.Brightness.ToString(); floorname.Text = s.FloorTexture; diff --git a/Source/Core/Controls/ThingInfoPanel.Designer.cs b/Source/Core/Controls/ThingInfoPanel.Designer.cs index 318e352b..ba3ba2df 100644 --- a/Source/Core/Controls/ThingInfoPanel.Designer.cs +++ b/Source/Core/Controls/ThingInfoPanel.Designer.cs @@ -34,6 +34,7 @@ namespace CodeImp.DoomBuilder.Controls System.Windows.Forms.Label label1; this.labelaction = new System.Windows.Forms.Label(); this.infopanel = new System.Windows.Forms.GroupBox(); + this.anglecontrol = new CodeImp.DoomBuilder.GZBuilder.Controls.AngleControl(); this.arg5 = new System.Windows.Forms.Label(); this.arglbl5 = new System.Windows.Forms.Label(); this.arglbl4 = new System.Windows.Forms.Label(); @@ -54,7 +55,6 @@ namespace CodeImp.DoomBuilder.Controls this.spritetex = new System.Windows.Forms.Panel(); this.flagsPanel = new System.Windows.Forms.GroupBox(); this.flags = new System.Windows.Forms.ListView(); - this.anglecontrol = new CodeImp.DoomBuilder.GZBuilder.Controls.AngleControl(); label5 = new System.Windows.Forms.Label(); label4 = new System.Windows.Forms.Label(); label3 = new System.Windows.Forms.Label(); @@ -67,7 +67,7 @@ namespace CodeImp.DoomBuilder.Controls // label5 // label5.AutoSize = true; - label5.Location = new System.Drawing.Point(165, 77); + label5.Location = new System.Drawing.Point(165, 58); label5.Name = "label5"; label5.Size = new System.Drawing.Size(38, 14); label5.TabIndex = 8; @@ -139,6 +139,14 @@ namespace CodeImp.DoomBuilder.Controls this.infopanel.TabStop = false; this.infopanel.Text = " Thing "; // + // anglecontrol + // + this.anglecontrol.Angle = 0; + this.anglecontrol.Location = new System.Drawing.Point(232, 52); + this.anglecontrol.Name = "anglecontrol"; + this.anglecontrol.Size = new System.Drawing.Size(24, 24); + this.anglecontrol.TabIndex = 38; + // // arg5 // this.arg5.AutoEllipsis = true; @@ -242,7 +250,7 @@ namespace CodeImp.DoomBuilder.Controls // angle // this.angle.AutoSize = true; - this.angle.Location = new System.Drawing.Point(206, 77); + this.angle.Location = new System.Drawing.Point(206, 58); this.angle.Name = "angle"; this.angle.Size = new System.Drawing.Size(25, 14); this.angle.TabIndex = 11; @@ -339,14 +347,6 @@ namespace CodeImp.DoomBuilder.Controls this.flags.UseCompatibleStateImageBehavior = false; this.flags.View = System.Windows.Forms.View.List; // - // anglecontrol - // - this.anglecontrol.Angle = 0; - this.anglecontrol.Location = new System.Drawing.Point(234, 71); - this.anglecontrol.Name = "anglecontrol"; - this.anglecontrol.Size = new System.Drawing.Size(24, 24); - this.anglecontrol.TabIndex = 38; - // // ThingInfoPanel // this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); diff --git a/Source/Core/Controls/ThingInfoPanel.cs b/Source/Core/Controls/ThingInfoPanel.cs index e418576c..072c5339 100644 --- a/Source/Core/Controls/ThingInfoPanel.cs +++ b/Source/Core/Controls/ThingInfoPanel.cs @@ -126,9 +126,9 @@ namespace CodeImp.DoomBuilder.Controls infopanel.Text = " Thing " + t.Index + " "; type.Text = t.Type + " - " + ti.Title; action.Text = actioninfo; - position.Text = t.Position.x.ToString() + ", " + t.Position.y.ToString() + ", " + zinfo; - tag.Text = t.Tag.ToString(); - angle.Text = t.AngleDoom.ToString() + "\u00B0"; + position.Text = t.Position.x + ", " + t.Position.y + ", " + zinfo; + tag.Text = t.Tag + (General.Map.Options.TagLabels.ContainsKey(t.Tag) ? " (" + General.Map.Options.TagLabels[t.Tag] + ")" : string.Empty); + angle.Text = t.AngleDoom + "\u00B0"; anglecontrol.Angle = t.AngleDoom; anglecontrol.Left = angle.Right + 1; diff --git a/Source/Core/Controls/ThingInfoPanel.resx b/Source/Core/Controls/ThingInfoPanel.resx index abaec611..c404d498 100644 --- a/Source/Core/Controls/ThingInfoPanel.resx +++ b/Source/Core/Controls/ThingInfoPanel.resx @@ -117,9 +117,6 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - True - False @@ -177,9 +174,6 @@ True - - True - True @@ -201,10 +195,4 @@ True - - True - - - True - \ No newline at end of file diff --git a/Source/Core/GZBuilder/Controls/PairedFieldsControl.Designer.cs b/Source/Core/GZBuilder/Controls/PairedFieldsControl.Designer.cs index 4cd95e7b..c6c2d5dc 100644 --- a/Source/Core/GZBuilder/Controls/PairedFieldsControl.Designer.cs +++ b/Source/Core/GZBuilder/Controls/PairedFieldsControl.Designer.cs @@ -102,9 +102,9 @@ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; this.Controls.Add(this.bReset); this.Controls.Add(this.bLink); - this.Controls.Add(this.label); this.Controls.Add(this.value1); this.Controls.Add(this.value2); + this.Controls.Add(this.label); this.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); this.Name = "PairedFieldsControl"; this.Size = new System.Drawing.Size(268, 26); diff --git a/Source/Core/GZBuilder/Controls/PairedFieldsControl.resx b/Source/Core/GZBuilder/Controls/PairedFieldsControl.resx index 965f82d3..ff31a6db 100644 --- a/Source/Core/GZBuilder/Controls/PairedFieldsControl.resx +++ b/Source/Core/GZBuilder/Controls/PairedFieldsControl.resx @@ -1,120 +1,120 @@ + 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. + --> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - text/microsoft-resx + text/microsoft-resx - 2.0 + 2.0 - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 \ No newline at end of file diff --git a/Source/Core/GZBuilder/Controls/PairedIntControl.Designer.cs b/Source/Core/GZBuilder/Controls/PairedIntControl.Designer.cs index 1305bcd5..b93a3550 100644 --- a/Source/Core/GZBuilder/Controls/PairedIntControl.Designer.cs +++ b/Source/Core/GZBuilder/Controls/PairedIntControl.Designer.cs @@ -33,7 +33,7 @@ // // label // - this.label.Location = new System.Drawing.Point(0, 6); + this.label.Location = new System.Drawing.Point(3, 6); this.label.Name = "label"; this.label.Size = new System.Drawing.Size(87, 14); this.label.TabIndex = 40; @@ -47,6 +47,7 @@ this.value1.AllowRelative = true; this.value1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.value1.ButtonStep = 1; + this.value1.ButtonStepFloat = 1F; this.value1.Location = new System.Drawing.Point(89, 1); this.value1.Name = "value1"; this.value1.Size = new System.Drawing.Size(62, 24); @@ -62,6 +63,7 @@ this.value2.AllowRelative = true; this.value2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.value2.ButtonStep = 1; + this.value2.ButtonStepFloat = 1F; this.value2.Location = new System.Drawing.Point(157, 1); this.value2.Name = "value2"; this.value2.Size = new System.Drawing.Size(62, 24); @@ -87,9 +89,9 @@ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.Controls.Add(this.bReset); - this.Controls.Add(this.label); this.Controls.Add(this.value1); this.Controls.Add(this.value2); + this.Controls.Add(this.label); this.Name = "PairedIntControl"; this.Size = new System.Drawing.Size(249, 26); this.ResumeLayout(false); diff --git a/Source/Core/GZBuilder/Controls/PairedIntControl.resx b/Source/Core/GZBuilder/Controls/PairedIntControl.resx index 965f82d3..ff31a6db 100644 --- a/Source/Core/GZBuilder/Controls/PairedIntControl.resx +++ b/Source/Core/GZBuilder/Controls/PairedIntControl.resx @@ -1,120 +1,120 @@ + 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. + --> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - text/microsoft-resx + text/microsoft-resx - 2.0 + 2.0 - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 \ No newline at end of file diff --git a/Source/Core/GZBuilder/Controls/TagSelector.cs b/Source/Core/GZBuilder/Controls/TagSelector.cs index 743a20a4..a03674a5 100644 --- a/Source/Core/GZBuilder/Controls/TagSelector.cs +++ b/Source/Core/GZBuilder/Controls/TagSelector.cs @@ -9,24 +9,15 @@ namespace CodeImp.DoomBuilder.GZBuilder.Controls { internal struct TagInfo { - public string Label; - public int Tag; - public bool HasLabel; + public readonly string Label; + public readonly int Tag; public TagInfo(int tag, string label) { - if(string.IsNullOrEmpty(label)) { - Label = "Tag " + tag; - HasLabel = false; - } else { - Label = label; - HasLabel = true; - } - + Label = (string.IsNullOrEmpty(label) ? tag.ToString() : tag + " (" + label + ")"); Tag = tag; } public override string ToString() { - if(HasLabel) return Label + " (tag " + Tag + ")"; return Label; } } @@ -116,14 +107,13 @@ namespace CodeImp.DoomBuilder.GZBuilder.Controls return; } - if(string.IsNullOrEmpty(cbTagPicker.Text)) { + //check text + string text = cbTagPicker.Text.Trim().ToLowerInvariant(); + if(string.IsNullOrEmpty(text)) { valid = false; return; } - //check text - string text = cbTagPicker.Text.Trim().ToLowerInvariant(); - if(!int.TryParse(text, NumberStyles.Integer, CultureInfo.InvariantCulture, out tag)) { //maybe it's user-pasted label? foreach(TagInfo info in infos) { diff --git a/Source/Core/GZBuilder/Windows/TagStatisticsForm.Designer.cs b/Source/Core/GZBuilder/Windows/TagStatisticsForm.Designer.cs index ae5a3fcf..ec5b7acf 100644 --- a/Source/Core/GZBuilder/Windows/TagStatisticsForm.Designer.cs +++ b/Source/Core/GZBuilder/Windows/TagStatisticsForm.Designer.cs @@ -25,12 +25,12 @@ /// the contents of this method with the code editor. /// private void InitializeComponent() { - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle13 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle14 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle15 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle16 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle17 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle18 = new System.Windows.Forms.DataGridViewCellStyle(); this.dataGridView = new System.Windows.Forms.DataGridView(); this.TagColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.Label = new System.Windows.Forms.DataGridViewTextBoxColumn(); @@ -39,7 +39,7 @@ this.Things = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.apply = new System.Windows.Forms.Button(); this.cancel = new System.Windows.Forms.Button(); - this.label1 = new System.Windows.Forms.Label(); + this.textBox1 = new System.Windows.Forms.TextBox(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView)).BeginInit(); this.SuspendLayout(); // @@ -55,21 +55,21 @@ this.dataGridView.BorderStyle = System.Windows.Forms.BorderStyle.None; this.dataGridView.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; this.dataGridView.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single; - dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); - dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1; + dataGridViewCellStyle13.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle13.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle13.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); + dataGridViewCellStyle13.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle13.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle13.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle13.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle13; this.dataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dataGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { - this.TagColumn, - this.Label, - this.Sectors, - this.Linedefs, - this.Things}); + this.TagColumn, + this.Label, + this.Sectors, + this.Linedefs, + this.Things}); this.dataGridView.Location = new System.Drawing.Point(12, 12); this.dataGridView.MultiSelect = false; this.dataGridView.Name = "dataGridView"; @@ -84,8 +84,8 @@ // TagColumn // this.TagColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.ColumnHeader; - dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - this.TagColumn.DefaultCellStyle = dataGridViewCellStyle2; + dataGridViewCellStyle14.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + this.TagColumn.DefaultCellStyle = dataGridViewCellStyle14; this.TagColumn.HeaderText = "Tag"; this.TagColumn.Name = "TagColumn"; this.TagColumn.ReadOnly = true; @@ -94,16 +94,16 @@ // Label // this.Label.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; - dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.Label.DefaultCellStyle = dataGridViewCellStyle3; + dataGridViewCellStyle15.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.Label.DefaultCellStyle = dataGridViewCellStyle15; this.Label.HeaderText = "Label"; this.Label.Name = "Label"; // // Sectors // this.Sectors.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.ColumnHeader; - dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - this.Sectors.DefaultCellStyle = dataGridViewCellStyle4; + dataGridViewCellStyle16.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + this.Sectors.DefaultCellStyle = dataGridViewCellStyle16; this.Sectors.HeaderText = "Sectors"; this.Sectors.Name = "Sectors"; this.Sectors.ReadOnly = true; @@ -113,8 +113,8 @@ // Linedefs // this.Linedefs.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.ColumnHeader; - dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - this.Linedefs.DefaultCellStyle = dataGridViewCellStyle5; + dataGridViewCellStyle17.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + this.Linedefs.DefaultCellStyle = dataGridViewCellStyle17; this.Linedefs.HeaderText = "Linedefs"; this.Linedefs.Name = "Linedefs"; this.Linedefs.ReadOnly = true; @@ -124,8 +124,8 @@ // Things // this.Things.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.ColumnHeader; - dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - this.Things.DefaultCellStyle = dataGridViewCellStyle6; + dataGridViewCellStyle18.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + this.Things.DefaultCellStyle = dataGridViewCellStyle18; this.Things.HeaderText = "Things"; this.Things.Name = "Things"; this.Things.ReadOnly = true; @@ -155,17 +155,20 @@ this.cancel.UseVisualStyleBackColor = true; this.cancel.Click += new System.EventHandler(this.cancel_Click); // - // label1 + // textBox1 // - this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(12, 278); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(472, 26); - this.label1.TabIndex = 6; - this.label1.Text = "Double click on a cell in Sectors, Linedefs or Things column to select map elemen" + - "ts with given tag.\r\nRight click to open Properties form for map elements with gi" + - "ven tag."; + this.textBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.textBox1.BackColor = System.Drawing.SystemColors.Control; + this.textBox1.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.textBox1.Location = new System.Drawing.Point(12, 274); + this.textBox1.Multiline = true; + this.textBox1.Name = "textBox1"; + this.textBox1.Size = new System.Drawing.Size(477, 68); + this.textBox1.TabIndex = 7; + this.textBox1.Text = "Click on a cell in Sectors, Linedefs or Things column to select map elements with" + + " given tag.\r\nRight click to open Properties form for map elements with given tag" + + "."; // // TagStatisticsForm // @@ -174,9 +177,9 @@ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; this.CancelButton = this.cancel; this.ClientSize = new System.Drawing.Size(501, 348); - this.Controls.Add(this.label1); this.Controls.Add(this.cancel); this.Controls.Add(this.apply); + this.Controls.Add(this.textBox1); this.Controls.Add(this.dataGridView); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow; this.MinimumSize = new System.Drawing.Size(120, 80); @@ -200,6 +203,6 @@ private System.Windows.Forms.DataGridViewTextBoxColumn Sectors; private System.Windows.Forms.DataGridViewTextBoxColumn Linedefs; private System.Windows.Forms.DataGridViewTextBoxColumn Things; - private System.Windows.Forms.Label label1; + private System.Windows.Forms.TextBox textBox1; } } \ No newline at end of file diff --git a/Source/Core/GZBuilder/Windows/TagStatisticsForm.cs b/Source/Core/GZBuilder/Windows/TagStatisticsForm.cs index 7a6961f4..96780c35 100644 --- a/Source/Core/GZBuilder/Windows/TagStatisticsForm.cs +++ b/Source/Core/GZBuilder/Windows/TagStatisticsForm.cs @@ -196,8 +196,77 @@ namespace CodeImp.DoomBuilder.GZBuilder.Windows } private void dataGridView_CellMouseClick(object sender, DataGridViewCellMouseEventArgs e) { + if(e.ColumnIndex < 2) return; + + //select + if (e.Button == MouseButtons.Left) { + int tag = (int)dataGridView.Rows[e.RowIndex].Cells[0].Value; + + if(e.ColumnIndex == 2) { //sectors + List list = getSectorsWithTag(tag, (int)dataGridView.Rows[e.RowIndex].Cells[2].Value); + if(list.Count > 0) { + General.Map.Map.ClearSelectedSectors(); + General.Map.Map.ClearSelectedLinedefs(); + + List points = new List(); + General.Editing.ChangeMode("SectorsMode"); + ClassicMode mode = (ClassicMode)General.Editing.Mode; + + foreach(Sector s in list) { + //s.Selected = true; + mode.SelectMapElement(s); + + foreach(Sidedef sd in s.Sidedefs) { + points.Add(sd.Line.Start.Position); + points.Add(sd.Line.End.Position); + } + } + + //General.Map.Map.Update(); + showSelection(points); + } + } else if(e.ColumnIndex == 3) { //linedefs + List list = getLinedefsWithTag(tag, (int)dataGridView.Rows[e.RowIndex].Cells[3].Value); + if(list.Count > 0) { + General.Map.Map.ClearSelectedSectors(); + General.Map.Map.ClearSelectedLinedefs(); + + List points = new List(); + foreach(Linedef l in list) { + l.Selected = true; + points.Add(l.Start.Position); + points.Add(l.End.Position); + } + + General.Map.Map.Update(); + General.Editing.ChangeMode("LinedefsMode"); + showSelection(points); + } + } else if(e.ColumnIndex == 4) { //things + List list = getThingsWithTag(tag, (int)dataGridView.Rows[e.RowIndex].Cells[4].Value); + if(list.Count > 0) { + General.Map.Map.ClearSelectedThings(); + + List points = new List(); + foreach(Thing t in list) { + t.Selected = true; + + Vector2D p = (Vector2D)t.Position; + points.Add(p); + points.Add(p + new Vector2D(t.Size * 2.0f, t.Size * 2.0f)); + points.Add(p + new Vector2D(t.Size * 2.0f, -t.Size * 2.0f)); + points.Add(p + new Vector2D(-t.Size * 2.0f, t.Size * 2.0f)); + points.Add(p + new Vector2D(-t.Size * 2.0f, -t.Size * 2.0f)); + } + + General.Map.Map.Update(); + General.Editing.ChangeMode("ThingsMode"); + showSelection(points); + } + } + //open properties window - if(e.ColumnIndex > 1 && e.Button == MouseButtons.Right) { + } else if(e.Button == MouseButtons.Right) { dataGridView.Rows[e.RowIndex].Cells[e.ColumnIndex].Selected = true; int tag = (int)dataGridView.Rows[e.RowIndex].Cells[0].Value; diff --git a/Source/Core/GZBuilder/Windows/TagStatisticsForm.resx b/Source/Core/GZBuilder/Windows/TagStatisticsForm.resx index 5fc9514b..304e4ca8 100644 --- a/Source/Core/GZBuilder/Windows/TagStatisticsForm.resx +++ b/Source/Core/GZBuilder/Windows/TagStatisticsForm.resx @@ -1,135 +1,135 @@ + 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. + --> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - text/microsoft-resx + text/microsoft-resx - 2.0 + 2.0 - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - True + True - True + True - True + True - True + True - True + True \ No newline at end of file diff --git a/Source/Core/Map/MapSet.cs b/Source/Core/Map/MapSet.cs index 4b8aa1b6..d19b90f7 100644 --- a/Source/Core/Map/MapSet.cs +++ b/Source/Core/Map/MapSet.cs @@ -2922,21 +2922,25 @@ namespace CodeImp.DoomBuilder.Map //mxd /// This returns a sector if given coordinates are inside one. public Sector GetSectorByCoordinates(Vector2D pos) { - Linedef nl; - Sector sector = null; + List lines = new List(10); - nl = NearestLinedef(pos); - if (nl != null) { + foreach (Sector s in sectors) { + if(pos.x < s.BBox.Left || pos.x > s.BBox.Right || pos.y < s.BBox.Top || pos.y > s.BBox.Bottom) continue; + foreach (Sidedef side in s.Sidedefs) lines.Add(side.Line); + } + + Linedef nl = NearestLinedef(lines, pos); + if(nl != null) { // Check what side of line we are at - if (nl.SideOfLine(pos) < 0f) { + if(nl.SideOfLine(pos) < 0f) { // Front side - if (nl.Front != null) sector = nl.Front.Sector; + if(nl.Front != null) return nl.Front.Sector; } else { // Back side - if (nl.Back != null) sector = nl.Back.Sector; + if(nl.Back != null) return nl.Back.Sector; } } - return sector; + return null; } /// This finds the line closest to the specified position. diff --git a/Source/Core/Properties/AssemblyInfo.cs b/Source/Core/Properties/AssemblyInfo.cs index 34f49044..42819a78 100644 --- a/Source/Core/Properties/AssemblyInfo.cs +++ b/Source/Core/Properties/AssemblyInfo.cs @@ -28,4 +28,4 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("1.14.0.1879")] \ No newline at end of file +[assembly: AssemblyVersion("1.14.0.1880")] \ No newline at end of file diff --git a/Source/Core/Properties/Resources.Designer.cs b/Source/Core/Properties/Resources.Designer.cs index 089cedaf..c253c4cb 100644 --- a/Source/Core/Properties/Resources.Designer.cs +++ b/Source/Core/Properties/Resources.Designer.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:2.0.50727.5466 +// Runtime Version:2.0.50727.4927 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. diff --git a/Source/Core/Properties/Resources.resx b/Source/Core/Properties/Resources.resx index d2749915..6ce2961b 100644 --- a/Source/Core/Properties/Resources.resx +++ b/Source/Core/Properties/Resources.resx @@ -283,9 +283,6 @@ ..\Resources\ErrorLarge.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\Lightbulb.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\Resources\MCrash.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -406,4 +403,7 @@ ..\Resources\ClearTextures.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\Lightbulb.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/Source/Core/Rendering/Presentation.cs b/Source/Core/Rendering/Presentation.cs index 9646307c..c89d20f5 100644 --- a/Source/Core/Rendering/Presentation.cs +++ b/Source/Core/Rendering/Presentation.cs @@ -82,11 +82,12 @@ namespace CodeImp.DoomBuilder.Rendering dragThings = new Presentation(); dragThings.layers.Add(new PresentLayer(RendererLayer.Background, BlendingMode.Mask, General.Settings.BackgroundAlpha)); dragThings.layers.Add(new PresentLayer(RendererLayer.Surface, BlendingMode.Mask)); - dragThings.layers.Add(new PresentLayer(RendererLayer.Geometry, BlendingMode.Alpha, 1.0f, true)); - dragThings.layers.Add(new PresentLayer(RendererLayer.Things, BlendingMode.Alpha, 1f, false)); + dragThings.layers.Add(new PresentLayer(RendererLayer.Things, BlendingMode.Alpha, 1f)); dragThings.layers.Add(new PresentLayer(RendererLayer.Grid, BlendingMode.Mask)); - dragThings.layers.Add(new PresentLayer(RendererLayer.Geometry, BlendingMode.Alpha, 0.5f, true)); + dragThings.layers.Add(new PresentLayer(RendererLayer.Geometry, BlendingMode.Alpha, 1f, true)); dragThings.layers.Add(new PresentLayer(RendererLayer.Overlay, BlendingMode.Alpha, 1f, true)); + dragThings.layers.Add(new PresentLayer(RendererLayer.Things, BlendingMode.Alpha, 0.5f)); + } } @@ -147,7 +148,7 @@ namespace CodeImp.DoomBuilder.Rendering } // The different layers - public enum RendererLayer : int + public enum RendererLayer { Background, Grid, @@ -158,7 +159,7 @@ namespace CodeImp.DoomBuilder.Rendering } // Blending modes - public enum BlendingMode : int + public enum BlendingMode { None, Mask, diff --git a/Source/Plugins/BuilderModes/BuilderModes.csproj b/Source/Plugins/BuilderModes/BuilderModes.csproj index cb654fdd..1966aa04 100644 --- a/Source/Plugins/BuilderModes/BuilderModes.csproj +++ b/Source/Plugins/BuilderModes/BuilderModes.csproj @@ -224,6 +224,7 @@ + @@ -275,6 +276,24 @@ BridgeModeForm.cs + + UserControl + + + DrawEllipseOptionsPanel.cs + + + UserControl + + + DrawGridOptionsPanel.cs + + + UserControl + + + DrawRectangleOptionsPanel.cs + UserControl @@ -397,6 +416,15 @@ + + DrawEllipseOptionsPanel.cs + + + DrawGridOptionsPanel.cs + + + DrawRectangleOptionsPanel.cs + SectorDrawingOptionsPanel.cs @@ -423,6 +451,15 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Source/Plugins/BuilderModes/Interface/DrawGridOptionsPanel.Designer.cs b/Source/Plugins/BuilderModes/Interface/DrawGridOptionsPanel.Designer.cs new file mode 100644 index 00000000..17992290 --- /dev/null +++ b/Source/Plugins/BuilderModes/Interface/DrawGridOptionsPanel.Designer.cs @@ -0,0 +1,169 @@ +namespace CodeImp.DoomBuilder.BuilderModes +{ + partial class DrawGridOptionsPanel + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) { + if(disposing && (components != null)) { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() { + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.slicesV = new System.Windows.Forms.NumericUpDown(); + this.slicesH = new System.Windows.Forms.NumericUpDown(); + this.label2 = new System.Windows.Forms.Label(); + this.label1 = new System.Windows.Forms.Label(); + this.triangulate = new System.Windows.Forms.CheckBox(); + this.groupBox2 = new System.Windows.Forms.GroupBox(); + this.hints = new System.Windows.Forms.RichTextBox(); + this.groupBox1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.slicesV)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.slicesH)).BeginInit(); + this.groupBox2.SuspendLayout(); + this.SuspendLayout(); + // + // groupBox1 + // + this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.groupBox1.Controls.Add(this.slicesV); + this.groupBox1.Controls.Add(this.slicesH); + this.groupBox1.Controls.Add(this.label2); + this.groupBox1.Controls.Add(this.label1); + this.groupBox1.Controls.Add(this.triangulate); + this.groupBox1.Location = new System.Drawing.Point(3, 3); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(243, 106); + this.groupBox1.TabIndex = 1; + this.groupBox1.TabStop = false; + this.groupBox1.Text = "Draw Options:"; + // + // slicesV + // + this.slicesV.Location = new System.Drawing.Point(102, 50); + this.slicesV.Maximum = new decimal(new int[] { + 128, + 0, + 0, + 0}); + this.slicesV.Name = "slicesV"; + this.slicesV.Size = new System.Drawing.Size(72, 20); + this.slicesV.TabIndex = 4; + this.slicesV.ValueChanged += new System.EventHandler(this.ValueChanged); + // + // slicesH + // + this.slicesH.Location = new System.Drawing.Point(102, 23); + this.slicesH.Maximum = new decimal(new int[] { + 128, + 0, + 0, + 0}); + this.slicesH.Name = "slicesH"; + this.slicesH.Size = new System.Drawing.Size(72, 20); + this.slicesH.TabIndex = 3; + this.slicesH.ValueChanged += new System.EventHandler(this.ValueChanged); + // + // label2 + // + this.label2.Location = new System.Drawing.Point(6, 52); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(90, 14); + this.label2.TabIndex = 2; + this.label2.Text = "Vertical Slices:"; + this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // label1 + // + this.label1.Location = new System.Drawing.Point(6, 26); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(90, 13); + this.label1.TabIndex = 1; + this.label1.Text = "Horizontal Slices:"; + this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // triangulate + // + this.triangulate.AutoSize = true; + this.triangulate.Location = new System.Drawing.Point(9, 78); + this.triangulate.Name = "triangulate"; + this.triangulate.Size = new System.Drawing.Size(79, 18); + this.triangulate.TabIndex = 0; + this.triangulate.Text = "Triangulate"; + this.triangulate.UseVisualStyleBackColor = true; + this.triangulate.CheckedChanged += new System.EventHandler(this.ValueChanged); + // + // groupBox2 + // + this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.groupBox2.Controls.Add(this.hints); + this.groupBox2.Location = new System.Drawing.Point(3, 115); + this.groupBox2.Name = "groupBox2"; + this.groupBox2.Size = new System.Drawing.Size(243, 115); + this.groupBox2.TabIndex = 2; + this.groupBox2.TabStop = false; + this.groupBox2.Text = "Quick Help:"; + // + // hints + // + this.hints.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.hints.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.hints.Location = new System.Drawing.Point(9, 19); + this.hints.Name = "hints"; + this.hints.ReadOnly = true; + this.hints.ScrollBars = System.Windows.Forms.RichTextBoxScrollBars.Vertical; + this.hints.ShortcutsEnabled = false; + this.hints.Size = new System.Drawing.Size(228, 90); + this.hints.TabIndex = 0; + this.hints.Text = ""; + // + // DrawGridOptionsPanel + // + this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; + this.Controls.Add(this.groupBox2); + this.Controls.Add(this.groupBox1); + this.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); + this.Name = "DrawGridOptionsPanel"; + this.Size = new System.Drawing.Size(249, 240); + this.groupBox1.ResumeLayout(false); + this.groupBox1.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.slicesV)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.slicesH)).EndInit(); + this.groupBox2.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.GroupBox groupBox1; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.CheckBox triangulate; + private System.Windows.Forms.NumericUpDown slicesV; + private System.Windows.Forms.NumericUpDown slicesH; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.GroupBox groupBox2; + private System.Windows.Forms.RichTextBox hints; + } +} diff --git a/Source/Plugins/BuilderModes/Interface/DrawGridOptionsPanel.cs b/Source/Plugins/BuilderModes/Interface/DrawGridOptionsPanel.cs new file mode 100644 index 00000000..52d88c4f --- /dev/null +++ b/Source/Plugins/BuilderModes/Interface/DrawGridOptionsPanel.cs @@ -0,0 +1,31 @@ +using System; +using System.Windows.Forms; +using CodeImp.DoomBuilder.Actions; + +namespace CodeImp.DoomBuilder.BuilderModes +{ + public partial class DrawGridOptionsPanel : UserControl + { + public event EventHandler OnValueChanged; + private bool blockEvents; + + public bool Triangulate { get { return triangulate.Checked; } set { blockEvents = true; triangulate.Checked = value; blockEvents = false; } } + public int HorizontalSlices { get { return (int)slicesH.Value; } set { blockEvents = true; slicesH.Value = value; blockEvents = false; } } + public int VerticalSlices { get { return (int)slicesV.Value; } set { blockEvents = true; slicesV.Value = value; blockEvents = false; } } + + public DrawGridOptionsPanel() { + InitializeComponent(); + + //set hints + string help = "Use " + Actions.Action.GetShortcutKeyDesc("buildermodes_increasebevel") + " and " + Actions.Action.GetShortcutKeyDesc("buildermodes_decreasebevel") + " to change the number of horizontal slices
" + + "Use " + Actions.Action.GetShortcutKeyDesc("buildermodes_increasesubdivlevel") + " and " + Actions.Action.GetShortcutKeyDesc("buildermodes_decreasesubdivlevel") + " to change the number of vertical slices"; + hints.SelectedRtf = HintsManager.GetRtfString(help); + } + + private void ValueChanged(object sender, EventArgs e) { + if(blockEvents) return; + if(OnValueChanged != null) OnValueChanged(this, EventArgs.Empty); + } + + } +} diff --git a/Source/Plugins/BuilderModes/Interface/DrawGridOptionsPanel.resx b/Source/Plugins/BuilderModes/Interface/DrawGridOptionsPanel.resx new file mode 100644 index 00000000..ff31a6db --- /dev/null +++ b/Source/Plugins/BuilderModes/Interface/DrawGridOptionsPanel.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Source/Plugins/BuilderModes/Interface/DrawRectangleOptionsPanel.Designer.cs b/Source/Plugins/BuilderModes/Interface/DrawRectangleOptionsPanel.Designer.cs new file mode 100644 index 00000000..42af0c26 --- /dev/null +++ b/Source/Plugins/BuilderModes/Interface/DrawRectangleOptionsPanel.Designer.cs @@ -0,0 +1,170 @@ +namespace CodeImp.DoomBuilder.BuilderModes +{ + partial class DrawRectangleOptionsPanel + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) { + if(disposing && (components != null)) { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() { + this.groupBox2 = new System.Windows.Forms.GroupBox(); + this.hints = new System.Windows.Forms.RichTextBox(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.subdivs = new System.Windows.Forms.NumericUpDown(); + this.radius = new System.Windows.Forms.NumericUpDown(); + this.label2 = new System.Windows.Forms.Label(); + this.label1 = new System.Windows.Forms.Label(); + this.reset = new System.Windows.Forms.Button(); + this.groupBox2.SuspendLayout(); + this.groupBox1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.subdivs)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.radius)).BeginInit(); + this.SuspendLayout(); + // + // groupBox2 + // + this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.groupBox2.Controls.Add(this.hints); + this.groupBox2.Location = new System.Drawing.Point(3, 89); + this.groupBox2.Name = "groupBox2"; + this.groupBox2.Size = new System.Drawing.Size(243, 115); + this.groupBox2.TabIndex = 4; + this.groupBox2.TabStop = false; + this.groupBox2.Text = "Quick Help:"; + // + // hints + // + this.hints.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.hints.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.hints.Location = new System.Drawing.Point(9, 19); + this.hints.Name = "hints"; + this.hints.ReadOnly = true; + this.hints.ScrollBars = System.Windows.Forms.RichTextBoxScrollBars.Vertical; + this.hints.ShortcutsEnabled = false; + this.hints.Size = new System.Drawing.Size(228, 90); + this.hints.TabIndex = 0; + this.hints.Text = ""; + // + // groupBox1 + // + this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.groupBox1.Controls.Add(this.reset); + this.groupBox1.Controls.Add(this.subdivs); + this.groupBox1.Controls.Add(this.radius); + this.groupBox1.Controls.Add(this.label2); + this.groupBox1.Controls.Add(this.label1); + this.groupBox1.Location = new System.Drawing.Point(3, 3); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(243, 80); + this.groupBox1.TabIndex = 3; + this.groupBox1.TabStop = false; + this.groupBox1.Text = "Draw Options:"; + // + // subdivs + // + this.subdivs.Location = new System.Drawing.Point(92, 50); + this.subdivs.Maximum = new decimal(new int[] { + 128, + 0, + 0, + 0}); + this.subdivs.Name = "subdivs"; + this.subdivs.Size = new System.Drawing.Size(72, 20); + this.subdivs.TabIndex = 4; + // + // radius + // + this.radius.Location = new System.Drawing.Point(92, 23); + this.radius.Maximum = new decimal(new int[] { + 32767, + 0, + 0, + 0}); + this.radius.Minimum = new decimal(new int[] { + 32768, + 0, + 0, + -2147483648}); + this.radius.Name = "radius"; + this.radius.Size = new System.Drawing.Size(72, 20); + this.radius.TabIndex = 3; + // + // label2 + // + this.label2.Location = new System.Drawing.Point(6, 52); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(80, 14); + this.label2.TabIndex = 2; + this.label2.Text = "Bevel Detail:"; + this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // label1 + // + this.label1.Location = new System.Drawing.Point(6, 26); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(80, 13); + this.label1.TabIndex = 1; + this.label1.Text = "Bevel Radius:"; + this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // reset + // + this.reset.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.Reset; + this.reset.Location = new System.Drawing.Point(170, 22); + this.reset.Name = "reset"; + this.reset.Size = new System.Drawing.Size(26, 49); + this.reset.TabIndex = 5; + this.reset.UseVisualStyleBackColor = true; + this.reset.Click += new System.EventHandler(this.reset_Click); + // + // DrawRectangleOptionsPanel + // + this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; + this.Controls.Add(this.groupBox2); + this.Controls.Add(this.groupBox1); + this.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); + this.Name = "DrawRectangleOptionsPanel"; + this.Size = new System.Drawing.Size(249, 240); + this.groupBox2.ResumeLayout(false); + this.groupBox1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.subdivs)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.radius)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.GroupBox groupBox2; + private System.Windows.Forms.RichTextBox hints; + private System.Windows.Forms.GroupBox groupBox1; + private System.Windows.Forms.NumericUpDown subdivs; + private System.Windows.Forms.NumericUpDown radius; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Button reset; + } +} diff --git a/Source/Plugins/BuilderModes/Interface/DrawRectangleOptionsPanel.cs b/Source/Plugins/BuilderModes/Interface/DrawRectangleOptionsPanel.cs new file mode 100644 index 00000000..93bc0b87 --- /dev/null +++ b/Source/Plugins/BuilderModes/Interface/DrawRectangleOptionsPanel.cs @@ -0,0 +1,47 @@ +using System; +using System.Windows.Forms; +using CodeImp.DoomBuilder.Actions; + +namespace CodeImp.DoomBuilder.BuilderModes +{ + public partial class DrawRectangleOptionsPanel : UserControl + { + public event EventHandler OnValueChanged; + private bool blockEvents; + + private static int radiusValue; + private static int subdivsValue; + + public int BevelWidth { get { return (int)radius.Value; } set { blockEvents = true; radius.Value = value; blockEvents = false; } } + public int Subdivisions { get { return (int)subdivs.Value; } set { blockEvents = true; subdivs.Value = value; blockEvents = false; } } + public int MaxSubdivisions { set { subdivs.Maximum = value; } } + + public DrawRectangleOptionsPanel() { + InitializeComponent(); + + radius.Value = radiusValue; + subdivs.Value = subdivsValue; + radius.ValueChanged += ValueChanged; + subdivs.ValueChanged += ValueChanged; + + //set hints + string help = "Use " + Actions.Action.GetShortcutKeyDesc("buildermodes_increasebevel") + " and " + Actions.Action.GetShortcutKeyDesc("buildermodes_decreasebevel") + " to change corners bevel by current grid size
" + + "Use " + Actions.Action.GetShortcutKeyDesc("buildermodes_increasesubdivlevel") + " and " + Actions.Action.GetShortcutKeyDesc("buildermodes_decreasesubdivlevel") + " to change bevel detail level"; + hints.SelectedRtf = HintsManager.GetRtfString(help); + } + + private void ValueChanged(object sender, EventArgs e) { + radiusValue = (int)radius.Value; + subdivsValue = (int)subdivs.Value; + + if(blockEvents) return; + if(OnValueChanged != null) OnValueChanged(this, EventArgs.Empty); + } + + private void reset_Click(object sender, EventArgs e) { + radius.Value = 0; + subdivs.Value = 0; + } + + } +} diff --git a/Source/Plugins/BuilderModes/Interface/DrawRectangleOptionsPanel.resx b/Source/Plugins/BuilderModes/Interface/DrawRectangleOptionsPanel.resx new file mode 100644 index 00000000..ff31a6db --- /dev/null +++ b/Source/Plugins/BuilderModes/Interface/DrawRectangleOptionsPanel.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Source/Plugins/BuilderModes/Interface/EditSelectionPanel.Designer.cs b/Source/Plugins/BuilderModes/Interface/EditSelectionPanel.Designer.cs index 0857c470..a9f5a67d 100644 --- a/Source/Plugins/BuilderModes/Interface/EditSelectionPanel.Designer.cs +++ b/Source/Plugins/BuilderModes/Interface/EditSelectionPanel.Designer.cs @@ -61,23 +61,9 @@ namespace CodeImp.DoomBuilder.BuilderModes this.label13 = new System.Windows.Forms.Label(); this.label11 = new System.Windows.Forms.Label(); this.absrot = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox(); - this.groupBox5 = new System.Windows.Forms.GroupBox(); - this.orgCenterY = new System.Windows.Forms.Button(); - this.orgCenterX = new System.Windows.Forms.Button(); - this.label10 = new System.Windows.Forms.Label(); - this.label18 = new System.Windows.Forms.Label(); - this.label20 = new System.Windows.Forms.Label(); - this.label21 = new System.Windows.Forms.Label(); - this.relCenterY = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox(); - this.relCenterX = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox(); - this.absCenterY = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox(); - this.absCenterX = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox(); - this.label22 = new System.Windows.Forms.Label(); - this.label23 = new System.Windows.Forms.Label(); this.groupBox1.SuspendLayout(); this.groupBox2.SuspendLayout(); this.groupBox3.SuspendLayout(); - this.groupBox5.SuspendLayout(); this.SuspendLayout(); // // groupBox1 @@ -96,7 +82,7 @@ namespace CodeImp.DoomBuilder.BuilderModes this.groupBox1.Controls.Add(this.absposx); this.groupBox1.Controls.Add(this.label2); this.groupBox1.Controls.Add(this.label1); - this.groupBox1.Location = new System.Drawing.Point(3, 130); + this.groupBox1.Location = new System.Drawing.Point(3, 3); this.groupBox1.Name = "groupBox1"; this.groupBox1.Size = new System.Drawing.Size(243, 117); this.groupBox1.TabIndex = 0; @@ -167,6 +153,7 @@ namespace CodeImp.DoomBuilder.BuilderModes this.relposy.AllowNegative = true; this.relposy.AllowRelative = true; this.relposy.ButtonStep = 1; + this.relposy.ButtonStepFloat = 1F; this.relposy.Location = new System.Drawing.Point(136, 83); this.relposy.Name = "relposy"; this.relposy.Size = new System.Drawing.Size(72, 24); @@ -183,6 +170,7 @@ namespace CodeImp.DoomBuilder.BuilderModes this.relposx.AllowNegative = true; this.relposx.AllowRelative = true; this.relposx.ButtonStep = 1; + this.relposx.ButtonStepFloat = 1F; this.relposx.Location = new System.Drawing.Point(58, 83); this.relposx.Name = "relposx"; this.relposx.Size = new System.Drawing.Size(72, 24); @@ -199,6 +187,7 @@ namespace CodeImp.DoomBuilder.BuilderModes this.absposy.AllowNegative = true; this.absposy.AllowRelative = true; this.absposy.ButtonStep = 1; + this.absposy.ButtonStepFloat = 1F; this.absposy.Location = new System.Drawing.Point(136, 53); this.absposy.Name = "absposy"; this.absposy.Size = new System.Drawing.Size(72, 24); @@ -215,6 +204,7 @@ namespace CodeImp.DoomBuilder.BuilderModes this.absposx.AllowNegative = true; this.absposx.AllowRelative = true; this.absposx.ButtonStep = 1; + this.absposx.ButtonStepFloat = 1F; this.absposx.Location = new System.Drawing.Point(58, 53); this.absposx.Name = "absposx"; this.absposx.Size = new System.Drawing.Size(72, 24); @@ -259,7 +249,7 @@ namespace CodeImp.DoomBuilder.BuilderModes this.groupBox2.Controls.Add(this.abssizey); this.groupBox2.Controls.Add(this.abssizex); this.groupBox2.Controls.Add(this.label3); - this.groupBox2.Location = new System.Drawing.Point(3, 253); + this.groupBox2.Location = new System.Drawing.Point(3, 126); this.groupBox2.Name = "groupBox2"; this.groupBox2.Size = new System.Drawing.Size(243, 117); this.groupBox2.TabIndex = 1; @@ -330,6 +320,7 @@ namespace CodeImp.DoomBuilder.BuilderModes this.relsizey.AllowNegative = true; this.relsizey.AllowRelative = true; this.relsizey.ButtonStep = 1; + this.relsizey.ButtonStepFloat = 1F; this.relsizey.Location = new System.Drawing.Point(136, 83); this.relsizey.Name = "relsizey"; this.relsizey.Size = new System.Drawing.Size(72, 24); @@ -346,6 +337,7 @@ namespace CodeImp.DoomBuilder.BuilderModes this.relsizex.AllowNegative = true; this.relsizex.AllowRelative = true; this.relsizex.ButtonStep = 1; + this.relsizex.ButtonStepFloat = 1F; this.relsizex.Location = new System.Drawing.Point(58, 83); this.relsizex.Name = "relsizex"; this.relsizex.Size = new System.Drawing.Size(72, 24); @@ -371,6 +363,7 @@ namespace CodeImp.DoomBuilder.BuilderModes this.abssizey.AllowNegative = true; this.abssizey.AllowRelative = true; this.abssizey.ButtonStep = 1; + this.abssizey.ButtonStepFloat = 1F; this.abssizey.Location = new System.Drawing.Point(136, 53); this.abssizey.Name = "abssizey"; this.abssizey.Size = new System.Drawing.Size(72, 24); @@ -387,6 +380,7 @@ namespace CodeImp.DoomBuilder.BuilderModes this.abssizex.AllowNegative = true; this.abssizex.AllowRelative = true; this.abssizex.ButtonStep = 1; + this.abssizex.ButtonStepFloat = 1F; this.abssizex.Location = new System.Drawing.Point(58, 53); this.abssizex.Name = "abssizex"; this.abssizex.Size = new System.Drawing.Size(72, 24); @@ -416,7 +410,7 @@ namespace CodeImp.DoomBuilder.BuilderModes this.groupBox3.Controls.Add(this.label13); this.groupBox3.Controls.Add(this.label11); this.groupBox3.Controls.Add(this.absrot); - this.groupBox3.Location = new System.Drawing.Point(3, 376); + this.groupBox3.Location = new System.Drawing.Point(3, 249); this.groupBox3.Name = "groupBox3"; this.groupBox3.Size = new System.Drawing.Size(243, 91); this.groupBox3.TabIndex = 2; @@ -478,6 +472,7 @@ namespace CodeImp.DoomBuilder.BuilderModes this.absrot.AllowNegative = true; this.absrot.AllowRelative = true; this.absrot.ButtonStep = 1; + this.absrot.ButtonStepFloat = 1F; this.absrot.Location = new System.Drawing.Point(58, 23); this.absrot.Name = "absrot"; this.absrot.Size = new System.Drawing.Size(82, 24); @@ -488,156 +483,10 @@ namespace CodeImp.DoomBuilder.BuilderModes this.absrot.WhenButtonsClicked += new System.EventHandler(this.absrot_Validated); this.absrot.WhenTextChanged += new System.EventHandler(this.WhenTextChanged); // - // groupBox5 - // - this.groupBox5.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.groupBox5.Controls.Add(this.orgCenterY); - this.groupBox5.Controls.Add(this.orgCenterX); - this.groupBox5.Controls.Add(this.label10); - this.groupBox5.Controls.Add(this.label18); - this.groupBox5.Controls.Add(this.label20); - this.groupBox5.Controls.Add(this.label21); - this.groupBox5.Controls.Add(this.relCenterY); - this.groupBox5.Controls.Add(this.relCenterX); - this.groupBox5.Controls.Add(this.absCenterY); - this.groupBox5.Controls.Add(this.absCenterX); - this.groupBox5.Controls.Add(this.label22); - this.groupBox5.Controls.Add(this.label23); - this.groupBox5.Location = new System.Drawing.Point(3, 7); - this.groupBox5.Name = "groupBox5"; - this.groupBox5.Size = new System.Drawing.Size(243, 117); - this.groupBox5.TabIndex = 30; - this.groupBox5.TabStop = false; - this.groupBox5.Text = "Center:"; - // - // orgCenterY - // - this.orgCenterY.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.orgCenterY.Location = new System.Drawing.Point(136, 23); - this.orgCenterY.Name = "orgCenterY"; - this.orgCenterY.Size = new System.Drawing.Size(72, 24); - this.orgCenterY.TabIndex = 29; - this.orgCenterY.Text = "-2000"; - this.orgCenterY.UseVisualStyleBackColor = true; - // - // orgCenterX - // - this.orgCenterX.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.orgCenterX.Location = new System.Drawing.Point(58, 23); - this.orgCenterX.Name = "orgCenterX"; - this.orgCenterX.Size = new System.Drawing.Size(72, 24); - this.orgCenterX.TabIndex = 28; - this.orgCenterX.Text = "-2000"; - this.orgCenterX.UseVisualStyleBackColor = true; - // - // label10 - // - this.label10.AutoSize = true; - this.label10.Location = new System.Drawing.Point(214, 28); - this.label10.Name = "label10"; - this.label10.Size = new System.Drawing.Size(21, 14); - this.label10.TabIndex = 26; - this.label10.Text = "mp"; - // - // label18 - // - this.label18.AutoSize = true; - this.label18.Location = new System.Drawing.Point(9, 28); - this.label18.Name = "label18"; - this.label18.Size = new System.Drawing.Size(46, 14); - this.label18.TabIndex = 23; - this.label18.Text = "Original:"; - // - // label20 - // - this.label20.AutoSize = true; - this.label20.Location = new System.Drawing.Point(214, 88); - this.label20.Name = "label20"; - this.label20.Size = new System.Drawing.Size(21, 14); - this.label20.TabIndex = 13; - this.label20.Text = "mp"; - // - // label21 - // - this.label21.AutoSize = true; - this.label21.Location = new System.Drawing.Point(214, 58); - this.label21.Name = "label21"; - this.label21.Size = new System.Drawing.Size(21, 14); - this.label21.TabIndex = 12; - this.label21.Text = "mp"; - // - // relCenterY - // - this.relCenterY.AllowDecimal = true; - this.relCenterY.AllowNegative = true; - this.relCenterY.AllowRelative = true; - this.relCenterY.ButtonStep = 1; - this.relCenterY.Location = new System.Drawing.Point(136, 83); - this.relCenterY.Name = "relCenterY"; - this.relCenterY.Size = new System.Drawing.Size(72, 24); - this.relCenterY.StepValues = null; - this.relCenterY.TabIndex = 11; - // - // relCenterX - // - this.relCenterX.AllowDecimal = true; - this.relCenterX.AllowNegative = true; - this.relCenterX.AllowRelative = true; - this.relCenterX.ButtonStep = 1; - this.relCenterX.Location = new System.Drawing.Point(58, 83); - this.relCenterX.Name = "relCenterX"; - this.relCenterX.Size = new System.Drawing.Size(72, 24); - this.relCenterX.StepValues = null; - this.relCenterX.TabIndex = 10; - // - // absCenterY - // - this.absCenterY.AllowDecimal = true; - this.absCenterY.AllowNegative = true; - this.absCenterY.AllowRelative = true; - this.absCenterY.ButtonStep = 1; - this.absCenterY.Location = new System.Drawing.Point(136, 53); - this.absCenterY.Name = "absCenterY"; - this.absCenterY.Size = new System.Drawing.Size(72, 24); - this.absCenterY.StepValues = null; - this.absCenterY.TabIndex = 9; - // - // absCenterX - // - this.absCenterX.AllowDecimal = true; - this.absCenterX.AllowNegative = true; - this.absCenterX.AllowRelative = true; - this.absCenterX.ButtonStep = 1; - this.absCenterX.Location = new System.Drawing.Point(58, 53); - this.absCenterX.Name = "absCenterX"; - this.absCenterX.Size = new System.Drawing.Size(72, 24); - this.absCenterX.StepValues = null; - this.absCenterX.TabIndex = 8; - // - // label22 - // - this.label22.AutoSize = true; - this.label22.Location = new System.Drawing.Point(7, 88); - this.label22.Name = "label22"; - this.label22.Size = new System.Drawing.Size(48, 14); - this.label22.TabIndex = 1; - this.label22.Text = "Relative:"; - // - // label23 - // - this.label23.AutoSize = true; - this.label23.Location = new System.Drawing.Point(6, 58); - this.label23.Name = "label23"; - this.label23.Size = new System.Drawing.Size(53, 14); - this.label23.TabIndex = 0; - this.label23.Text = "Absolute:"; - // // EditSelectionPanel // this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; - this.Controls.Add(this.groupBox5); this.Controls.Add(this.groupBox3); this.Controls.Add(this.groupBox2); this.Controls.Add(this.groupBox1); @@ -650,8 +499,6 @@ namespace CodeImp.DoomBuilder.BuilderModes this.groupBox2.PerformLayout(); this.groupBox3.ResumeLayout(false); this.groupBox3.PerformLayout(); - this.groupBox5.ResumeLayout(false); - this.groupBox5.PerformLayout(); this.ResumeLayout(false); } @@ -691,18 +538,5 @@ namespace CodeImp.DoomBuilder.BuilderModes private System.Windows.Forms.Button orgposy; private System.Windows.Forms.Button orgsizey; private System.Windows.Forms.Button orgsizex; - private System.Windows.Forms.GroupBox groupBox5; - private System.Windows.Forms.Button orgCenterY; - private System.Windows.Forms.Button orgCenterX; - private System.Windows.Forms.Label label10; - private System.Windows.Forms.Label label18; - private System.Windows.Forms.Label label20; - private System.Windows.Forms.Label label21; - private CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox relCenterY; - private CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox relCenterX; - private CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox absCenterY; - private CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox absCenterX; - private System.Windows.Forms.Label label22; - private System.Windows.Forms.Label label23; } } diff --git a/Source/Plugins/BuilderModes/Interface/EditSelectionPanel.resx b/Source/Plugins/BuilderModes/Interface/EditSelectionPanel.resx index f77bb97c..a764f1c7 100644 --- a/Source/Plugins/BuilderModes/Interface/EditSelectionPanel.resx +++ b/Source/Plugins/BuilderModes/Interface/EditSelectionPanel.resx @@ -1,123 +1,123 @@ + 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. + --> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - text/microsoft-resx + text/microsoft-resx - 2.0 + 2.0 - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - True + True \ No newline at end of file diff --git a/Source/Plugins/BuilderModes/Properties/AssemblyInfo.cs b/Source/Plugins/BuilderModes/Properties/AssemblyInfo.cs index 0926c1db..2eb15864 100644 --- a/Source/Plugins/BuilderModes/Properties/AssemblyInfo.cs +++ b/Source/Plugins/BuilderModes/Properties/AssemblyInfo.cs @@ -28,4 +28,4 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("1.14.0.1879")] +[assembly: AssemblyVersion("1.14.0.1880")] diff --git a/Source/Plugins/BuilderModes/Properties/Resources.Designer.cs b/Source/Plugins/BuilderModes/Properties/Resources.Designer.cs index 19dfdba2..fca4a610 100644 --- a/Source/Plugins/BuilderModes/Properties/Resources.Designer.cs +++ b/Source/Plugins/BuilderModes/Properties/Resources.Designer.cs @@ -130,6 +130,13 @@ namespace CodeImp.DoomBuilder.BuilderModes.Properties { } } + internal static System.Drawing.Bitmap DrawGridMode { + get { + object obj = ResourceManager.GetObject("DrawGridMode", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + internal static System.Drawing.Bitmap DrawLinesMode { get { object obj = ResourceManager.GetObject("DrawLinesMode", resourceCulture); @@ -193,6 +200,13 @@ namespace CodeImp.DoomBuilder.BuilderModes.Properties { } } + internal static System.Drawing.Bitmap Reset { + get { + object obj = ResourceManager.GetObject("Reset", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + internal static System.Drawing.Bitmap SelectTouching { get { object obj = ResourceManager.GetObject("SelectTouching", resourceCulture); diff --git a/Source/Plugins/BuilderModes/Properties/Resources.resx b/Source/Plugins/BuilderModes/Properties/Resources.resx index a8393602..9977c403 100644 --- a/Source/Plugins/BuilderModes/Properties/Resources.resx +++ b/Source/Plugins/BuilderModes/Properties/Resources.resx @@ -118,8 +118,8 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - ..\Resources\DrawEllipseMode.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\ViewSelectionEffects.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\AlignThings.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -127,6 +127,9 @@ ..\Resources\SelectTouching.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\DrawEllipseMode.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\Resources\PasteProperties.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -172,6 +175,9 @@ ..\Resources\VisualModeGZ.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\TextureLock.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\Resources\CopyProperties.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -196,10 +202,10 @@ ..\Resources\ThingPointAtCursor.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\TextureLock.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\Reset.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\ViewSelectionEffects.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\DrawGridMode.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a \ No newline at end of file diff --git a/Source/Plugins/BuilderModes/Resources/Actions.cfg b/Source/Plugins/BuilderModes/Resources/Actions.cfg index de98e358..0be258ae 100644 --- a/Source/Plugins/BuilderModes/Resources/Actions.cfg +++ b/Source/Plugins/BuilderModes/Resources/Actions.cfg @@ -124,6 +124,17 @@ drawcurvemode default = 393284; //Ctrl-Alt-D } +//mxd +drawgridmode +{ + title = "Start Grid Drawing"; + category = "drawing"; + description = "Starts drawing a grid. Increase/Decrease Subdivision Level and Increase/Decrease Corners Bevel actions are avaliable in this mode."; + allowkeys = true; + allowmouse = true; + allowscroll = true; +} + //mxd increasesubdivlevel { diff --git a/Source/Plugins/BuilderModes/Resources/DrawGridMode.png b/Source/Plugins/BuilderModes/Resources/DrawGridMode.png new file mode 100644 index 0000000000000000000000000000000000000000..f6953ec7957c2f1b689c84597037ead8e3951af3 GIT binary patch literal 435 zcmV;k0ZjghP)s8jGz8;Gw1@f#$|Pr(>y>Ygw`#eX6x{t4Cm1SSA<#S?6V1QEMt9>`Xf*H_6@)MgOKy_=8)ZK#_zz+4d5>y>106*ghHeOg5 dfeZi$FaQT&(anJF?Y;m2002ovPDHLkV1gLtt}Flm literal 0 HcmV?d00001 diff --git a/Source/Plugins/BuilderModes/Resources/Reset.png b/Source/Plugins/BuilderModes/Resources/Reset.png new file mode 100644 index 0000000000000000000000000000000000000000..cc6af841d4029ed2be2d768d36cb59bae211cfd5 GIT binary patch literal 520 zcmV+j0{8uiP)xO!P{5uHaHCmZ+KqHN{pf8w!^0t)6tL?J zpqW^fb;6x0G{8MO3g)(b3fTH>269g%TEDxU>&ps0R#CA83GvUPD2gG=7-tGTiW=8F z!x)6%9a?;>bAF)|(11^9@_;`0qPGl2`FFBVC``yf*x)V~ogn{nn_ttQoFN1_=#BzR z(~Qc1Y&P5EVx89Vmk`A0tYL>vB_5Br=yM80DVS_f&Z+Q{E8%dZ&NW!-5a4MCe zeY>K2;TI6#J)wQjAMkUvcM0fB^uww<)6{wD!0F0000< KMNUMnLSTZQ?&CKA literal 0 HcmV?d00001