From e81c8d6acc0d4adc3b282863d44727dc123cb500 Mon Sep 17 00:00:00 2001 From: MascaraSnake Date: Tue, 12 Jan 2016 22:07:23 +0100 Subject: [PATCH] Added multimare support --- Build/ZoneBuilder.default.cfg | 9 +- Source/Core/Rendering/ColorCollection.cs | 40 ++- Source/Core/Rendering/Renderer2D.cs | 18 +- .../Core/Windows/PreferencesForm.Designer.cs | 243 +++++++++++++----- Source/Core/Windows/PreferencesForm.cs | 30 ++- 5 files changed, 252 insertions(+), 88 deletions(-) diff --git a/Build/ZoneBuilder.default.cfg b/Build/ZoneBuilder.default.cfg index d3964dc..97a894a 100644 --- a/Build/ZoneBuilder.default.cfg +++ b/Build/ZoneBuilder.default.cfg @@ -297,7 +297,14 @@ colors color38 = -4343957; color39 = -2448096; color40 = -17477; - color41 = -8688; + color41 = -8432; + color42 = -32752; + color43 = -65536; + color44 = -61217; + color45 = -8388353; + color46 = -16776961; + color47 = -15671297; + color48 = -16720128; } diff --git a/Source/Core/Rendering/ColorCollection.cs b/Source/Core/Rendering/ColorCollection.cs index 7f76d5c..90a209f 100644 --- a/Source/Core/Rendering/ColorCollection.cs +++ b/Source/Core/Rendering/ColorCollection.cs @@ -38,7 +38,7 @@ namespace CodeImp.DoomBuilder.Rendering private const float DARK_ADDITION = -0.2f; // Palette size - private const int NUM_COLORS = 42; + private const int NUM_COLORS = 49; public const int NUM_THING_COLORS = 20; public const int THING_COLORS_OFFSET = 20; @@ -84,15 +84,20 @@ namespace CodeImp.DoomBuilder.Rendering public const int THINGCOLOR18 = 38; public const int THINGCOLOR19 = 39; public const int THREEDFLOORCOLOR = 40; //mxd - public const int NIGHTSCOLOR = 41; + public const int NIGHTSCOLORMARE1 = 41; + public const int NIGHTSCOLORMARE2 = 42; + public const int NIGHTSCOLORMARE3 = 43; + public const int NIGHTSCOLORMARE4 = 44; + public const int NIGHTSCOLORMARE5 = 45; + public const int NIGHTSCOLORMARE6 = 46; + public const int NIGHTSCOLORMARE7 = 47; + public const int NIGHTSCOLORMARE8 = 48; + #endregion - - #endregion + #region ================== Variables - #region ================== Variables - - // Colors - private PixelColor[] colors; + // Colors + private PixelColor[] colors; private PixelColor[] brightcolors; private PixelColor[] darkcolors; @@ -120,8 +125,6 @@ namespace CodeImp.DoomBuilder.Rendering public PixelColor ModelWireframe { get { return colors[MODELWIRECOLOR]; } internal set { colors[MODELWIRECOLOR] = value; } } public PixelColor InfoLine { get { return colors[INFOLINECOLOR]; } internal set { colors[INFOLINECOLOR] = value; } } public PixelColor ThreeDFloor { get { return colors[THREEDFLOORCOLOR]; } internal set { colors[THREEDFLOORCOLOR] = value;} } - public PixelColor NiGHTSColor { get { return colors[NIGHTSCOLOR]; } internal set { colors[NIGHTSCOLOR] = value; } } - public PixelColor Crosshair3D { get { return colors[CROSSHAIR3D]; } internal set { colors[CROSSHAIR3D] = value; } } public PixelColor Highlight3D { get { return colors[HIGHLIGHT3D]; } internal set { colors[HIGHLIGHT3D] = value; } } @@ -275,7 +278,18 @@ namespace CodeImp.DoomBuilder.Rendering cfg.WriteSetting("colors.color" + i.ToString(CultureInfo.InvariantCulture), colors[i].ToInt()); } } - - #endregion - } + + public PixelColor GetNiGHTSColor(int mare) + { + if (mare < 0 || mare > 7) return colors[NIGHTSCOLORMARE1]; + return colors[NIGHTSCOLORMARE1 + mare]; + } + + public void SetNiGHTSColor(int mare, PixelColor c) + { + if (mare < 0 || mare > 7) return; + colors[NIGHTSCOLORMARE1 + mare] = c; + } + #endregion + } } diff --git a/Source/Core/Rendering/Renderer2D.cs b/Source/Core/Rendering/Renderer2D.cs index f4ed92b..b3ec596 100644 --- a/Source/Core/Rendering/Renderer2D.cs +++ b/Source/Core/Rendering/Renderer2D.cs @@ -1436,12 +1436,15 @@ namespace CodeImp.DoomBuilder.Rendering ICollection things = General.Map.Map.Things; List axes = new List(); List axistransferlines = new List(); + foreach (Thing t in things) { - if (t.Type % 4096 == General.Map.FormatInterface.AxisType) axes.Add(t); - if (t.Type % 4096 == General.Map.FormatInterface.AxisTransferLineType) axistransferlines.Add(t); + int type = t.Type % 4096; + if (type == General.Map.FormatInterface.AxisType) axes.Add(t); + if (type == General.Map.FormatInterface.AxisTransferLineType) axistransferlines.Add(t); } - axistransferlines.Sort((x, y) => x.GetFlagsValue().CompareTo(y.GetFlagsValue())); + //Sort by axis number and mare number. + axistransferlines.Sort((x, y) => (x.GetFlagsValue() | (x.Type / 4096)<<16).CompareTo((y.GetFlagsValue() | (y.Type / 4096) << 16))); //Render axis transfer lines. int i = 0; @@ -1453,7 +1456,8 @@ namespace CodeImp.DoomBuilder.Rendering if (iNext < size && axistransferlines[iNext].GetFlagsValue() == axistransferlines[i].GetFlagsValue() + 1) { - RenderLine((Vector2D)axistransferlines[i].Position, (Vector2D)axistransferlines[iNext].Position, 1f, General.Colors.NiGHTSColor, true); + int mare = axistransferlines[i].Type / 4096; + RenderLine((Vector2D)axistransferlines[i].Position, (Vector2D)axistransferlines[iNext].Position, 1f, General.Colors.GetNiGHTSColor(mare), true); /* Start looking for partners for the one beyond iNext. */ i = iNext + 1; } @@ -1462,12 +1466,12 @@ namespace CodeImp.DoomBuilder.Rendering /* No partner, so start looking for partners for iNext. */ i = iNext; } - } - + } //Render axes. foreach (Thing axis in axes) { - RenderCircle((Vector2D)axis.Position, (float)(axis.AngleDoom & 0x3FFF), 1f, General.Colors.NiGHTSColor, true); + int mare = axis.Type / 4096; + RenderCircle((Vector2D)axis.Position, (float)(axis.AngleDoom & 0x3FFF), 1f, General.Colors.GetNiGHTSColor(mare), true); } } #endregion diff --git a/Source/Core/Windows/PreferencesForm.Designer.cs b/Source/Core/Windows/PreferencesForm.Designer.cs index 3577f7d..7f25c66 100644 --- a/Source/Core/Windows/PreferencesForm.Designer.cs +++ b/Source/Core/Windows/PreferencesForm.Designer.cs @@ -67,7 +67,6 @@ namespace CodeImp.DoomBuilder.Windows this.defaultviewmode = new System.Windows.Forms.ComboBox(); this.keyusedlabel = new System.Windows.Forms.Label(); this.colorsgroup1 = new System.Windows.Forms.GroupBox(); - this.colorNiGHTS = new CodeImp.DoomBuilder.Controls.ColorControl(); this.color3dFloors = new CodeImp.DoomBuilder.Controls.ColorControl(); this.colorInfo = new CodeImp.DoomBuilder.Controls.ColorControl(); this.colorMD3 = new CodeImp.DoomBuilder.Controls.ColorControl(); @@ -175,14 +174,23 @@ namespace CodeImp.DoomBuilder.Windows this.colorlinenumbers = new CodeImp.DoomBuilder.Controls.ColorControl(); this.colorcomments = new CodeImp.DoomBuilder.Controls.ColorControl(); this.colorplaintext = new CodeImp.DoomBuilder.Controls.ColorControl(); + this.tabnights = new System.Windows.Forms.TabPage(); + this.nightscolormare8 = new CodeImp.DoomBuilder.Controls.ColorControl(); + this.nightscolormare7 = new CodeImp.DoomBuilder.Controls.ColorControl(); + this.nightscolormare6 = new CodeImp.DoomBuilder.Controls.ColorControl(); + this.nightscolormare5 = new CodeImp.DoomBuilder.Controls.ColorControl(); + this.nightscolormare4 = new CodeImp.DoomBuilder.Controls.ColorControl(); + this.nightscolormare3 = new CodeImp.DoomBuilder.Controls.ColorControl(); + this.nightscolormare2 = new CodeImp.DoomBuilder.Controls.ColorControl(); + this.nightscircleprecision = new System.Windows.Forms.TrackBar(); + this.label23 = new System.Windows.Forms.Label(); + this.nightscircleprecisionlabel = new System.Windows.Forms.Label(); + this.nightscolormare1 = new CodeImp.DoomBuilder.Controls.ColorControl(); this.tabpasting = new System.Windows.Forms.TabPage(); this.label16 = new System.Windows.Forms.Label(); this.pasteoptions = new CodeImp.DoomBuilder.Controls.PasteOptionsControl(); this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); this.browseScreenshotsFolderDialog = new System.Windows.Forms.FolderBrowserDialog(); - this.nightscircleprecision = new System.Windows.Forms.TrackBar(); - this.label23 = new System.Windows.Forms.Label(); - this.nightscircleprecisionlabel = new System.Windows.Forms.Label(); label7 = new System.Windows.Forms.Label(); label6 = new System.Windows.Forms.Label(); label5 = new System.Windows.Forms.Label(); @@ -220,8 +228,9 @@ namespace CodeImp.DoomBuilder.Windows ((System.ComponentModel.ISupportInitialize)(this.tbDynLightCount)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.imagebrightness)).BeginInit(); this.colorsgroup3.SuspendLayout(); - this.tabpasting.SuspendLayout(); + this.tabnights.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.nightscircleprecision)).BeginInit(); + this.tabpasting.SuspendLayout(); this.SuspendLayout(); // // label7 @@ -617,10 +626,6 @@ namespace CodeImp.DoomBuilder.Windows // this.colorsgroup1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left))); - this.colorsgroup1.Controls.Add(this.nightscircleprecision); - this.colorsgroup1.Controls.Add(this.label23); - this.colorsgroup1.Controls.Add(this.nightscircleprecisionlabel); - this.colorsgroup1.Controls.Add(this.colorNiGHTS); this.colorsgroup1.Controls.Add(this.color3dFloors); this.colorsgroup1.Controls.Add(this.colorInfo); this.colorsgroup1.Controls.Add(this.colorMD3); @@ -643,17 +648,6 @@ namespace CodeImp.DoomBuilder.Windows this.colorsgroup1.Text = " Display "; this.colorsgroup1.Visible = false; // - // colorNiGHTS - // - this.colorNiGHTS.BackColor = System.Drawing.Color.Transparent; - this.colorNiGHTS.Label = "NiGHTS path:"; - this.colorNiGHTS.Location = new System.Drawing.Point(15, 314); - this.colorNiGHTS.MaximumSize = new System.Drawing.Size(10000, 23); - this.colorNiGHTS.MinimumSize = new System.Drawing.Size(100, 23); - this.colorNiGHTS.Name = "colorNiGHTS"; - this.colorNiGHTS.Size = new System.Drawing.Size(168, 23); - this.colorNiGHTS.TabIndex = 25; - // // color3dFloors // this.color3dFloors.BackColor = System.Drawing.Color.Transparent; @@ -691,7 +685,7 @@ namespace CodeImp.DoomBuilder.Windows // this.doublesidedalpha.BackColor = System.Drawing.SystemColors.Window; this.doublesidedalpha.LargeChange = 3; - this.doublesidedalpha.Location = new System.Drawing.Point(11, 376); + this.doublesidedalpha.Location = new System.Drawing.Point(11, 349); this.doublesidedalpha.Name = "doublesidedalpha"; this.doublesidedalpha.Size = new System.Drawing.Size(130, 45); this.doublesidedalpha.TabIndex = 2; @@ -745,7 +739,7 @@ namespace CodeImp.DoomBuilder.Windows // label2 // this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(14, 355); + this.label2.Location = new System.Drawing.Point(14, 328); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(141, 13); this.label2.TabIndex = 14; @@ -755,7 +749,7 @@ namespace CodeImp.DoomBuilder.Windows // doublesidedalphalabel // this.doublesidedalphalabel.AutoSize = true; - this.doublesidedalphalabel.Location = new System.Drawing.Point(147, 388); + this.doublesidedalphalabel.Location = new System.Drawing.Point(147, 361); this.doublesidedalphalabel.Name = "doublesidedalphalabel"; this.doublesidedalphalabel.Size = new System.Drawing.Size(21, 13); this.doublesidedalphalabel.TabIndex = 16; @@ -858,6 +852,7 @@ namespace CodeImp.DoomBuilder.Windows this.tabs.Controls.Add(this.tabinterface); this.tabs.Controls.Add(this.tabkeys); this.tabs.Controls.Add(this.tabcolors); + this.tabs.Controls.Add(this.tabnights); this.tabs.Controls.Add(this.tabpasting); this.tabs.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.tabs.Location = new System.Drawing.Point(11, 13); @@ -1934,6 +1929,157 @@ namespace CodeImp.DoomBuilder.Windows this.colorplaintext.TabIndex = 2; this.colorplaintext.ColorChanged += new System.EventHandler(this.scriptcolor_ColorChanged); // + // tabnights + // + this.tabnights.Controls.Add(this.nightscolormare8); + this.tabnights.Controls.Add(this.nightscolormare7); + this.tabnights.Controls.Add(this.nightscolormare6); + this.tabnights.Controls.Add(this.nightscolormare5); + this.tabnights.Controls.Add(this.nightscolormare4); + this.tabnights.Controls.Add(this.nightscolormare3); + this.tabnights.Controls.Add(this.nightscolormare2); + this.tabnights.Controls.Add(this.nightscircleprecision); + this.tabnights.Controls.Add(this.label23); + this.tabnights.Controls.Add(this.nightscircleprecisionlabel); + this.tabnights.Controls.Add(this.nightscolormare1); + this.tabnights.Location = new System.Drawing.Point(4, 22); + this.tabnights.Name = "tabnights"; + this.tabnights.Padding = new System.Windows.Forms.Padding(3); + this.tabnights.Size = new System.Drawing.Size(682, 533); + this.tabnights.TabIndex = 4; + this.tabnights.Text = "NiGHTS"; + this.tabnights.UseVisualStyleBackColor = true; + // + // nightscolormare8 + // + this.nightscolormare8.BackColor = System.Drawing.Color.Transparent; + this.nightscolormare8.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.nightscolormare8.Label = "Path color (Mare 8):"; + this.nightscolormare8.Location = new System.Drawing.Point(238, 118); + this.nightscolormare8.MaximumSize = new System.Drawing.Size(10000, 23); + this.nightscolormare8.MinimumSize = new System.Drawing.Size(100, 23); + this.nightscolormare8.Name = "nightscolormare8"; + this.nightscolormare8.Size = new System.Drawing.Size(168, 23); + this.nightscolormare8.TabIndex = 39; + // + // nightscolormare7 + // + this.nightscolormare7.BackColor = System.Drawing.Color.Transparent; + this.nightscolormare7.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.nightscolormare7.Label = "Path color (Mare 7):"; + this.nightscolormare7.Location = new System.Drawing.Point(238, 89); + this.nightscolormare7.MaximumSize = new System.Drawing.Size(10000, 23); + this.nightscolormare7.MinimumSize = new System.Drawing.Size(100, 23); + this.nightscolormare7.Name = "nightscolormare7"; + this.nightscolormare7.Size = new System.Drawing.Size(168, 23); + this.nightscolormare7.TabIndex = 38; + // + // nightscolormare6 + // + this.nightscolormare6.BackColor = System.Drawing.Color.Transparent; + this.nightscolormare6.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.nightscolormare6.Label = "Path color (Mare 6):"; + this.nightscolormare6.Location = new System.Drawing.Point(238, 60); + this.nightscolormare6.MaximumSize = new System.Drawing.Size(10000, 23); + this.nightscolormare6.MinimumSize = new System.Drawing.Size(100, 23); + this.nightscolormare6.Name = "nightscolormare6"; + this.nightscolormare6.Size = new System.Drawing.Size(168, 23); + this.nightscolormare6.TabIndex = 37; + // + // nightscolormare5 + // + this.nightscolormare5.BackColor = System.Drawing.Color.Transparent; + this.nightscolormare5.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.nightscolormare5.Label = "Path color (Mare 5):"; + this.nightscolormare5.Location = new System.Drawing.Point(238, 31); + this.nightscolormare5.MaximumSize = new System.Drawing.Size(10000, 23); + this.nightscolormare5.MinimumSize = new System.Drawing.Size(100, 23); + this.nightscolormare5.Name = "nightscolormare5"; + this.nightscolormare5.Size = new System.Drawing.Size(168, 23); + this.nightscolormare5.TabIndex = 36; + // + // nightscolormare4 + // + this.nightscolormare4.BackColor = System.Drawing.Color.Transparent; + this.nightscolormare4.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.nightscolormare4.Label = "Path color (Mare 4):"; + this.nightscolormare4.Location = new System.Drawing.Point(21, 118); + this.nightscolormare4.MaximumSize = new System.Drawing.Size(10000, 23); + this.nightscolormare4.MinimumSize = new System.Drawing.Size(100, 23); + this.nightscolormare4.Name = "nightscolormare4"; + this.nightscolormare4.Size = new System.Drawing.Size(168, 23); + this.nightscolormare4.TabIndex = 35; + // + // nightscolormare3 + // + this.nightscolormare3.BackColor = System.Drawing.Color.Transparent; + this.nightscolormare3.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.nightscolormare3.Label = "Path color (Mare 3):"; + this.nightscolormare3.Location = new System.Drawing.Point(21, 89); + this.nightscolormare3.MaximumSize = new System.Drawing.Size(10000, 23); + this.nightscolormare3.MinimumSize = new System.Drawing.Size(100, 23); + this.nightscolormare3.Name = "nightscolormare3"; + this.nightscolormare3.Size = new System.Drawing.Size(168, 23); + this.nightscolormare3.TabIndex = 34; + // + // nightscolormare2 + // + this.nightscolormare2.BackColor = System.Drawing.Color.Transparent; + this.nightscolormare2.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.nightscolormare2.Label = "Path color (Mare 2):"; + this.nightscolormare2.Location = new System.Drawing.Point(21, 60); + this.nightscolormare2.MaximumSize = new System.Drawing.Size(10000, 23); + this.nightscolormare2.MinimumSize = new System.Drawing.Size(100, 23); + this.nightscolormare2.Name = "nightscolormare2"; + this.nightscolormare2.Size = new System.Drawing.Size(168, 23); + this.nightscolormare2.TabIndex = 33; + // + // nightscircleprecision + // + this.nightscircleprecision.BackColor = System.Drawing.SystemColors.Window; + this.nightscircleprecision.LargeChange = 1; + this.nightscircleprecision.Location = new System.Drawing.Point(474, 52); + this.nightscircleprecision.Maximum = 36; + this.nightscircleprecision.Minimum = 1; + this.nightscircleprecision.Name = "nightscircleprecision"; + this.nightscircleprecision.Size = new System.Drawing.Size(130, 45); + this.nightscircleprecision.TabIndex = 30; + this.nightscircleprecision.TickStyle = System.Windows.Forms.TickStyle.TopLeft; + this.nightscircleprecision.Value = 36; + // + // label23 + // + this.label23.AutoSize = true; + this.label23.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label23.Location = new System.Drawing.Point(477, 31); + this.label23.Name = "label23"; + this.label23.Size = new System.Drawing.Size(102, 13); + this.label23.TabIndex = 31; + this.label23.Text = "Axis circle precision:"; + this.label23.TextAlign = System.Drawing.ContentAlignment.TopRight; + // + // nightscircleprecisionlabel + // + this.nightscircleprecisionlabel.AutoSize = true; + this.nightscircleprecisionlabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.nightscircleprecisionlabel.Location = new System.Drawing.Point(610, 64); + this.nightscircleprecisionlabel.Name = "nightscircleprecisionlabel"; + this.nightscircleprecisionlabel.Size = new System.Drawing.Size(25, 13); + this.nightscircleprecisionlabel.TabIndex = 32; + this.nightscircleprecisionlabel.Text = "360"; + // + // nightscolormare1 + // + this.nightscolormare1.BackColor = System.Drawing.Color.Transparent; + this.nightscolormare1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.nightscolormare1.Label = "Path color (Mare 1):"; + this.nightscolormare1.Location = new System.Drawing.Point(21, 31); + this.nightscolormare1.MaximumSize = new System.Drawing.Size(10000, 23); + this.nightscolormare1.MinimumSize = new System.Drawing.Size(100, 23); + this.nightscolormare1.Name = "nightscolormare1"; + this.nightscolormare1.Size = new System.Drawing.Size(168, 23); + this.nightscolormare1.TabIndex = 29; + // // tabpasting // this.tabpasting.Controls.Add(this.label16); @@ -1973,39 +2119,6 @@ namespace CodeImp.DoomBuilder.Windows // this.browseScreenshotsFolderDialog.Description = "Select a Folder to Save Screenshots Into"; // - // nightscircleprecision - // - this.nightscircleprecision.BackColor = System.Drawing.SystemColors.Window; - this.nightscircleprecision.LargeChange = 1; - this.nightscircleprecision.Location = new System.Drawing.Point(11, 432); - this.nightscircleprecision.Maximum = 36; - this.nightscircleprecision.Minimum = 1; - this.nightscircleprecision.Name = "nightscircleprecision"; - this.nightscircleprecision.Size = new System.Drawing.Size(130, 45); - this.nightscircleprecision.TabIndex = 26; - this.nightscircleprecision.TickStyle = System.Windows.Forms.TickStyle.TopLeft; - this.nightscircleprecision.Value = 36; - this.nightscircleprecision.ValueChanged += new System.EventHandler(this.nightscircleprecision_ValueChanged); - // - // label23 - // - this.label23.AutoSize = true; - this.label23.Location = new System.Drawing.Point(14, 411); - this.label23.Name = "label23"; - this.label23.Size = new System.Drawing.Size(123, 13); - this.label23.TabIndex = 27; - this.label23.Text = "NiGHTS circle precision:"; - this.label23.TextAlign = System.Drawing.ContentAlignment.TopRight; - // - // nightscircleprecisionlabel - // - this.nightscircleprecisionlabel.AutoSize = true; - this.nightscircleprecisionlabel.Location = new System.Drawing.Point(147, 444); - this.nightscircleprecisionlabel.Name = "nightscircleprecisionlabel"; - this.nightscircleprecisionlabel.Size = new System.Drawing.Size(25, 13); - this.nightscircleprecisionlabel.TabIndex = 28; - this.nightscircleprecisionlabel.Text = "360"; - // // PreferencesForm // this.AcceptButton = this.apply; @@ -2066,8 +2179,10 @@ namespace CodeImp.DoomBuilder.Windows ((System.ComponentModel.ISupportInitialize)(this.imagebrightness)).EndInit(); this.colorsgroup3.ResumeLayout(false); this.colorsgroup3.PerformLayout(); - this.tabpasting.ResumeLayout(false); + this.tabnights.ResumeLayout(false); + this.tabnights.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.nightscircleprecision)).EndInit(); + this.tabpasting.ResumeLayout(false); this.ResumeLayout(false); } @@ -2214,9 +2329,17 @@ namespace CodeImp.DoomBuilder.Windows private System.Windows.Forms.Label labelBackups; private System.Windows.Forms.Label label27; private System.Windows.Forms.CheckBox cbDrawFullCrosshair; - private Controls.ColorControl colorNiGHTS; - private System.Windows.Forms.TrackBar nightscircleprecision; - private System.Windows.Forms.Label label23; + private System.Windows.Forms.TabPage tabnights; + private Controls.ColorControl nightscolormare1; private System.Windows.Forms.Label nightscircleprecisionlabel; + private System.Windows.Forms.Label label23; + private System.Windows.Forms.TrackBar nightscircleprecision; + private Controls.ColorControl nightscolormare2; + private Controls.ColorControl nightscolormare8; + private Controls.ColorControl nightscolormare7; + private Controls.ColorControl nightscolormare6; + private Controls.ColorControl nightscolormare5; + private Controls.ColorControl nightscolormare4; + private Controls.ColorControl nightscolormare3; } } \ No newline at end of file diff --git a/Source/Core/Windows/PreferencesForm.cs b/Source/Core/Windows/PreferencesForm.cs index aea0d15..e4ede64 100644 --- a/Source/Core/Windows/PreferencesForm.cs +++ b/Source/Core/Windows/PreferencesForm.cs @@ -179,7 +179,6 @@ namespace CodeImp.DoomBuilder.Windows colorMD3.Color = General.Colors.ModelWireframe; colorInfo.Color = General.Colors.InfoLine; color3dFloors.Color = General.Colors.ThreeDFloor; - colorNiGHTS.Color = General.Colors.NiGHTSColor; colorscriptbackground.Color = General.Colors.ScriptBackground; colorlinenumbers.Color = General.Colors.LineNumbers; @@ -193,9 +192,18 @@ namespace CodeImp.DoomBuilder.Windows classicbilinear.Checked = General.Settings.ClassicBilinear; visualbilinear.Checked = General.Settings.VisualBilinear; qualitydisplay.Checked = General.Settings.QualityDisplay; - - // Paste options - pasteoptions.Setup(General.Settings.PasteOptions.Copy()); + + nightscolormare1.Color = General.Colors.GetNiGHTSColor(0); + nightscolormare2.Color = General.Colors.GetNiGHTSColor(1); + nightscolormare3.Color = General.Colors.GetNiGHTSColor(2); + nightscolormare4.Color = General.Colors.GetNiGHTSColor(3); + nightscolormare5.Color = General.Colors.GetNiGHTSColor(4); + nightscolormare6.Color = General.Colors.GetNiGHTSColor(5); + nightscolormare7.Color = General.Colors.GetNiGHTSColor(6); + nightscolormare8.Color = General.Colors.GetNiGHTSColor(7); + + // Paste options + pasteoptions.Setup(General.Settings.PasteOptions.Copy()); UpdateScriptFontPreview(); //mxd // Allow plugins to add tabs @@ -303,7 +311,6 @@ namespace CodeImp.DoomBuilder.Windows General.Colors.ModelWireframe = colorMD3.Color; General.Colors.InfoLine = colorInfo.Color; General.Colors.ThreeDFloor = color3dFloors.Color; - General.Colors.NiGHTSColor = colorNiGHTS.Color; General.Colors.CreateAssistColors(); General.Settings.BlackBrowsers = blackbrowsers.Checked; @@ -312,8 +319,17 @@ namespace CodeImp.DoomBuilder.Windows General.Settings.VisualBilinear = visualbilinear.Checked; General.Settings.QualityDisplay = qualitydisplay.Checked; - //mxd - General.Settings.GZSynchCameras = cbSynchCameras.Checked; + General.Colors.SetNiGHTSColor(0, nightscolormare1.Color); + General.Colors.SetNiGHTSColor(1, nightscolormare2.Color); + General.Colors.SetNiGHTSColor(2, nightscolormare3.Color); + General.Colors.SetNiGHTSColor(3, nightscolormare4.Color); + General.Colors.SetNiGHTSColor(4, nightscolormare5.Color); + General.Colors.SetNiGHTSColor(5, nightscolormare6.Color); + General.Colors.SetNiGHTSColor(6, nightscolormare7.Color); + General.Colors.SetNiGHTSColor(7, nightscolormare8.Color); + + //mxd + General.Settings.GZSynchCameras = cbSynchCameras.Checked; General.Settings.GZMaxDynamicLights = tbDynLightCount.Value; General.Settings.GZDynamicLightRadius = (tbDynLightSize.Value / 10.0f); General.Settings.GZDynamicLightIntensity = (tbDynLightIntensity.Value / 10.0f);