From 1e9a08fc96cb0a539bdf8a738c02b6f9842d34de Mon Sep 17 00:00:00 2001 From: MaxED <j.maxed@gmail.com> Date: Wed, 14 Aug 2013 09:02:37 +0000 Subject: [PATCH] Removed newly created sectors coloring (because it was more slow than helpful). Some cosmetic changes in Linedef Edit form. Link, Unlink and Reset icons can now be properly seen on dark backgrounds. --- Source/Core/Config/ProgramConfiguration.cs | 25 ++--- Source/Core/General/Launcher.cs | 14 +-- Source/Core/Map/MapSet.cs | 27 +----- Source/Core/Rendering/ColorCollection.cs | 6 +- Source/Core/Rendering/Renderer2D.cs | 13 --- Source/Core/Resources/Link.png | Bin 462 -> 584 bytes Source/Core/Resources/Reset.png | Bin 217 -> 520 bytes Source/Core/Resources/Unlink.png | Bin 722 -> 715 bytes .../Core/Windows/LinedefEditForm.Designer.cs | 10 +- .../Core/Windows/PreferencesForm.Designer.cs | 88 ++++-------------- Source/Core/Windows/PreferencesForm.cs | 40 +++----- Source/Core/Windows/PreferencesForm.resx | 3 + 12 files changed, 53 insertions(+), 173 deletions(-) diff --git a/Source/Core/Config/ProgramConfiguration.cs b/Source/Core/Config/ProgramConfiguration.cs index 617231581..affa6f6fa 100644 --- a/Source/Core/Config/ProgramConfiguration.cs +++ b/Source/Core/Config/ProgramConfiguration.cs @@ -109,19 +109,18 @@ namespace CodeImp.DoomBuilder.Config private bool gzShowVisualVertices; private int gzVisualVertexSize; private bool gzLoadDefaultLightDefinitions; - private int gzNewSectorsCount; private bool gzForceDefaultTextures; private string lastUsedConfigName; // These are not stored in the configuration, only used at runtime private string defaulttexture; private int defaultbrightness = 192; - private int defaultfloorheight = 0; + private int defaultfloorheight; private int defaultceilheight = 128; private string defaultfloortexture; private string defaultceiltexture; private int defaultthingtype = 1; - private float defaultthingangle = 0.0f; + private float defaultthingangle; private List<string> defaultthingflags; #endregion @@ -195,7 +194,6 @@ namespace CodeImp.DoomBuilder.Config public bool GZShowVisualVertices { get { return gzShowVisualVertices; } internal set { gzShowVisualVertices = value; } } public int GZVisualVertexSize { get { return gzVisualVertexSize; } internal set { gzVisualVertexSize = value; } } public bool GZLoadDefaultLightDefinitions { get { return gzLoadDefaultLightDefinitions; } internal set { gzLoadDefaultLightDefinitions = value; } } - public int GZNewSectorsCount { get { return gzNewSectorsCount; } internal set { gzNewSectorsCount = value; } } public bool GZForceDefaultTextures { get { return gzForceDefaultTextures; } internal set { gzForceDefaultTextures = value; } } public string LastUsedConfigName { get { return lastUsedConfigName; } internal set { lastUsedConfigName = value; } } @@ -297,17 +295,13 @@ namespace CodeImp.DoomBuilder.Config gzShowVisualVertices = cfg.ReadSetting("gzshowvisualvertices", true); gzVisualVertexSize = cfg.ReadSetting("gzvisualvertexsize", 6); gzLoadDefaultLightDefinitions = cfg.ReadSetting("gzloaddefaultlightdefinitions", true); - gzNewSectorsCount = cfg.ReadSetting("gznewsectorscount", 3); lastUsedConfigName = cfg.ReadSetting("lastusedconfigname", ""); // Success return true; } - else - { - // Failed - return false; - } + // Failed + return false; } // This saves the program configuration @@ -380,7 +374,6 @@ namespace CodeImp.DoomBuilder.Config cfg.WriteSetting("gzshowvisualvertices", gzShowVisualVertices); cfg.WriteSetting("gzvisualvertexsize", gzVisualVertexSize); cfg.WriteSetting("gzloaddefaultlightdefinitions", gzLoadDefaultLightDefinitions); - cfg.WriteSetting("gznewsectorscount", gzNewSectorsCount); if(!string.IsNullOrEmpty(lastUsedConfigName)) cfg.WriteSetting("lastusedconfigname", lastUsedConfigName); @@ -590,7 +583,7 @@ namespace CodeImp.DoomBuilder.Config } // Default floor missing? - if((defaultfloortexture == null) || (defaultfloortexture.Length == 0)) + if(string.IsNullOrEmpty(defaultfloortexture)) { // Find default texture from map foundone = false; @@ -631,7 +624,7 @@ namespace CodeImp.DoomBuilder.Config } // Default ceiling missing? - if((defaultceiltexture == null) || (defaultceiltexture.Length == 0)) + if(string.IsNullOrEmpty(defaultceiltexture)) { // Find default texture from map foundone = false; @@ -672,9 +665,9 @@ namespace CodeImp.DoomBuilder.Config } // Texture names may not be null - if((defaulttexture == null) || (defaulttexture == "")) defaulttexture = "-"; - if((defaultfloortexture == null) || (defaultfloortexture == "")) defaultfloortexture = "-"; - if((defaultceiltexture == null) || (defaultceiltexture == "")) defaultceiltexture = "-"; + if(string.IsNullOrEmpty(defaulttexture)) defaulttexture = "-"; + if(string.IsNullOrEmpty(defaultfloortexture)) defaultfloortexture = "-"; + if(string.IsNullOrEmpty(defaultceiltexture)) defaultceiltexture = "-"; } #endregion diff --git a/Source/Core/General/Launcher.cs b/Source/Core/General/Launcher.cs index b0430206d..c6dde9d26 100644 --- a/Source/Core/General/Launcher.cs +++ b/Source/Core/General/Launcher.cs @@ -228,13 +228,8 @@ namespace CodeImp.DoomBuilder public void Test() { General.Settings.GZTestFromCurrentPosition = false; //mxd - - bool canTest = true; //mxd - canTest = General.Editing.Mode.OnMapTestBegin(); //mxd - if (!canTest) return; //mxd - + if(!General.Editing.Mode.OnMapTestBegin()) return; //mxd TestAtSkill(General.Map.ConfigSettings.TestSkill); - General.Editing.Mode.OnMapTestEnd(); //mxd } @@ -242,15 +237,12 @@ namespace CodeImp.DoomBuilder [BeginAction("testmapfromview")] public void TestFromView() { General.Settings.GZTestFromCurrentPosition = true; - - bool canTest = true; - canTest = General.Editing.Mode.OnMapTestBegin(); - if (!canTest) return; + if(!General.Editing.Mode.OnMapTestBegin()) return; //mxd General.MainWindow.StopProcessing(); TestAtSkill(General.Map.ConfigSettings.TestSkill); - General.Editing.Mode.OnMapTestEnd(); + General.Editing.Mode.OnMapTestEnd(); //mxd General.MainWindow.EnableProcessing(); General.MainWindow.FocusDisplay(); } diff --git a/Source/Core/Map/MapSet.cs b/Source/Core/Map/MapSet.cs index d471cbe1f..073c44816 100644 --- a/Source/Core/Map/MapSet.cs +++ b/Source/Core/Map/MapSet.cs @@ -267,7 +267,7 @@ namespace CodeImp.DoomBuilder.Map internal static void Initialize() { emptylongname = Lump.MakeLongName("-"); - virtualsectorvalue = new UniValue((int)UniversalType.Integer, (int)0); + virtualsectorvalue = new UniValue((int)UniversalType.Integer, 0); } #endregion @@ -1039,8 +1039,6 @@ namespace CodeImp.DoomBuilder.Map foreach(Sector s in sectors) s.CreateSurfaces(); General.Map.CRenderer2D.Surfaces.UnlockBuffers(); - - updateNewSectors(); //mxd } } @@ -2983,8 +2981,7 @@ namespace CodeImp.DoomBuilder.Map } else { - List<Sidedef> newlist = new List<Sidedef>(4); - newlist.Add(snsd); + List<Sidedef> newlist = new List<Sidedef>(4) {snsd}; storedsides.Add(checksum, newlist); } @@ -2998,7 +2995,7 @@ namespace CodeImp.DoomBuilder.Map // Output info float endtime = General.Clock.CurrentTime; float deltatimesec = (endtime - starttime) / 1000.0f; - float ratio = 100.0f - (((float)numsidedefs / (float)originalsidescount) * 100.0f); + float ratio = 100.0f - ((numsidedefs / (float)originalsidescount) * 100.0f); General.WriteLogLine("Sidedefs compressed: " + numsidedefs + " remaining out of " + originalsidescount + " (" + ratio.ToString("########0.00") + "%) in " + deltatimesec.ToString("########0.00") + " seconds"); } @@ -3036,24 +3033,6 @@ namespace CodeImp.DoomBuilder.Map foreach(Linedef l in linedefs) l.UpdateColorPreset(); } - - //mxd - private void updateNewSectors() { - int n = sectors.Length < General.Settings.GZNewSectorsCount ? sectors.Length : General.Settings.GZNewSectorsCount; - Sector[] newSectors = new Sector[n]; - Array.Copy(sectors, sectors.Length - n, newSectors, 0, n); - - List<int> newLineIndices = new List<int>(); - newSectorLineIndices = new Dictionary<int, int>(); - - for(int i = newSectors.Length-1; i > -1; i--) { - foreach (Sidedef side in newSectors[i].Sidedefs){ - if(newLineIndices.Contains(side.Line.Index)) continue; - newLineIndices.Add(side.Line.Index); - newSectorLineIndices.Add(side.Line.Index, i); - } - } - } #endregion } diff --git a/Source/Core/Rendering/ColorCollection.cs b/Source/Core/Rendering/ColorCollection.cs index c8e4c0a48..d046475b2 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 = 41; public const int NUM_THING_COLORS = 20; public const int THING_COLORS_OFFSET = 20; @@ -83,8 +83,7 @@ namespace CodeImp.DoomBuilder.Rendering public const int THINGCOLOR17 = 37; public const int THINGCOLOR18 = 38; public const int THINGCOLOR19 = 39; - public const int NEWSECTORCOLOR = 40;//mxd - public const int THREEDFLOORCOLOR = 41; //mxd + public const int THREEDFLOORCOLOR = 40; //mxd #endregion @@ -119,7 +118,6 @@ namespace CodeImp.DoomBuilder.Rendering //mxd 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 NewSector { get { return colors[NEWSECTORCOLOR]; } internal set { colors[NEWSECTORCOLOR] = value; } } public PixelColor ThreeDFloor { get { return colors[THREEDFLOORCOLOR]; } internal set { colors[THREEDFLOORCOLOR] = value;} } public PixelColor Crosshair3D { get { return colors[CROSSHAIR3D]; } internal set { colors[CROSSHAIR3D] = value; } } diff --git a/Source/Core/Rendering/Renderer2D.cs b/Source/Core/Rendering/Renderer2D.cs index f48936cd8..fb6d40a74 100644 --- a/Source/Core/Rendering/Renderer2D.cs +++ b/Source/Core/Rendering/Renderer2D.cs @@ -1591,19 +1591,6 @@ namespace CodeImp.DoomBuilder.Rendering Vector2D v1 = l.Start.Position.GetTransformed(translatex, translatey, scale, -scale); Vector2D v2 = l.End.Position.GetTransformed(translatex, translatey, scale, -scale); - //mxd. Newly created sectors colouring - if(General.Settings.GZNewSectorsCount > 0 && l.ColorPresetIndex == -1){ - if(General.Map.Map.NewSectorLineIndices.ContainsKey(l.Index)){ - int index = General.Map.Map.NewSectorLineIndices[l.Index]; - PixelColor highlight = General.Colors.NewSector; - highlight.a = (byte)(255 * (1.0f - (float)(index + 1) / General.Settings.GZNewSectorsCount)); - float ha = highlight.a * PixelColor.BYTE_TO_FLOAT; - c.r = (byte)Math.Min(255, (highlight.r * (1f - ha) + c.r * ha)); - c.g = (byte)Math.Min(255, (highlight.g * (1f - ha) + c.g * ha)); - c.b = (byte)Math.Min(255, (highlight.b * (1f - ha) + c.b * ha)); - } - } - // Draw line. mxd: added 3d-floor indication if(l.ExtraFloorFlag) { plotter.DrawLine3DFloor(v1, v2, ref c, General.Colors.ThreeDFloor); diff --git a/Source/Core/Resources/Link.png b/Source/Core/Resources/Link.png index 8a0276555218856e905e5d01d5d5054322616031..27c8db4e38aa3a84697fc712eda816d015600a58 100644 GIT binary patch delta 522 zcmV+l0`>jQ1IPrBNq_1|L_t(|+H8`~YZ^fm$7h2%6hgqRW)~Gi6imU0;(`h$DM%?E zy_QnQAqT}<3F$u&LcAp4G1nf2Vh&37pr(fkp$(;_CEE(2i_IoWnw|;)_eZ~P*-&e; z@L8Cd_nCR~<}us0*%ThI0G7c<tJV4(jYjQsI&CSZ$^quqL4ShXBhG;g*enzZ24l>g zq+YL&u(o!e$b+Zla`_Jh@;q-}XczAX?*^wF$2qd9s;_6*zt02aK@f!V`TTV}9%s6) zHw97nn9Jw1QmHhiz-F_#!qF-CW&sZ(U<oXO0Js6??z$8R1RiUe#@g-nF{L&OL`u&z z&23Q>|GQJQT7UhGwQeGjuxK2M#cV1Xn~?VWe!mkeNs`&`^}k`hXBfs2Rg~swQ_He; zFuzLTDh73*&*w<lY}Q2ZTasj19;Q+$M-l{qq+L3M4kPhpBoc8X+L_X-)oRz1>4rif zlD2LodTXxJ=?qY<Tre19qtU33zz@K1tNQ@_1Yf}?aDN7Vf$@x@C{#U`OeV+fvpmFo z<Kb}ld8JZ$g0TXQ!545vk`tw0>if4Tb-Uf~>JRnA>-9QgY67HH0>0@+q2IGcqj5If zTE$|~z}hPyxovnyd<0$$hr>6SOva*ymJj6<DjF!b4eyy2{|Ybw=E0BJ-A(n200000 MNkvXXt^-0~f(ifooB#j- delta 399 zcmV;A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aE;$ z6wrWAX!3wQ_@cKAM)`NLP$*2uLD=9f7o8ygbDLk&pqwEDIOvW7Ow)|YfNVC~<YJxH z@|O_A=&WIfP9+|Xx9E7Q)#@qg4q<~f(QkPXz8guHMMFr!w(W2#m7;ySqI=;N5a2zb zeb6DwfeKwB-m?e40P5J!Au0=V{Rdxh=SP460Jyg)qaw8SxBvhE07*qoM6N<$f;)iK AApigX delta 153 zcmV;K0A~M)1la+QNPhr(Nkl<Zc-mrM7-+zVN6sFJ{Q-zC5;AN)l&%Nj_dxs~4c|vI z6a&B%{U?Cq@fm=OL9SR2#QU+x=@T*l<Pv@)Iej$OttZ9>^RWafvOK|9z-0-FUM5P@ z0VxK=qooUy4G2JDZy?9DpjbH%jb3?jz06OEX4(LN00RIo>k=~0?|oC<00000NkvXX Hu0mjfN9I0v diff --git a/Source/Core/Resources/Unlink.png b/Source/Core/Resources/Unlink.png index db2ea29608a83cf9db19b200b31540b8afcdc894..7f48e14d3912693c76bab0970b5751f13c6ad039 100644 GIT binary patch delta 654 zcmV;90&)G)1<M7HNq=ogL_t(|+B{M{Xj)Mee*RTxh1N+oX%^|GDcBmJp#>L9!MGS5 z99#;Cia!;VhIFZmg|uXlf*{r4q;8>P(4tThx=4bBRxMglQ~xzVBl@22^&IKz@bTSy z?)lES=ew6+7)A<s0C)u0SS%JBz?<{=+zh;z&1O#(3I)mI@qZYxSWLTIu0IfeL!f9p z9>0jiVv%C8_!jm~ilPF*?=zW9fzRhN1VJ!dE_cNUi^VcPq3Y=9C~PvBn4O)SX|vhP zK<p%)PX87Pg{wrZR!em{oo+N5onQeDhr^)oak*UHcQ_o^Mx&9j+wD}l-R|o3dJ;uC zosNQ>OBQQuYk%~rGt8uhfW6!8o_IVS62(rZldRQh{ZJ@$Gn>uIaQ+=d;c$5R|Jo3E zLesPl`15c$?D+kDR!ogXqc+4*Sd7Qx*X)eDySqICDx!M_kw~PbR;#H>rPBBLd@Hfd zW}~23yVYv-SdrCg9b-Or+)E~t1%W`Y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Nx92^|KK@6Z@GeESZrRB^62M&PKA<%F4X3m_sSxHIB z2^df}fHo@tU6%?r9T>rDL8gOJ128Rqg9SM-APys^VPGOrNk~ZONlHr6g9`!!Vm~Y` vf@ok8+X0hHOG^W#StevdfN7c$Aix03bqXjzeGWud00000NkvXXu0mjf$P7C0 diff --git a/Source/Core/Windows/LinedefEditForm.Designer.cs b/Source/Core/Windows/LinedefEditForm.Designer.cs index 85f82763c..d7c8dcaeb 100644 --- a/Source/Core/Windows/LinedefEditForm.Designer.cs +++ b/Source/Core/Windows/LinedefEditForm.Designer.cs @@ -746,9 +746,9 @@ namespace CodeImp.DoomBuilder.Windows this.frontTextureOffset.ButtonStep = 16; this.frontTextureOffset.DefaultValue = 0; this.frontTextureOffset.Label = "Texture Offset:"; - this.frontTextureOffset.Location = new System.Drawing.Point(1, 65); + this.frontTextureOffset.Location = new System.Drawing.Point(3, 65); this.frontTextureOffset.Name = "frontTextureOffset"; - this.frontTextureOffset.Size = new System.Drawing.Size(249, 26); + this.frontTextureOffset.Size = new System.Drawing.Size(247, 26); this.frontTextureOffset.TabIndex = 41; this.frontTextureOffset.OnValuesChanged += new System.EventHandler(this.frontTextureOffset_OnValuesChanged); // @@ -1033,9 +1033,9 @@ namespace CodeImp.DoomBuilder.Windows this.backTextureOffset.ButtonStep = 16; this.backTextureOffset.DefaultValue = 0; this.backTextureOffset.Label = "Texture Offset:"; - this.backTextureOffset.Location = new System.Drawing.Point(1, 65); + this.backTextureOffset.Location = new System.Drawing.Point(3, 65); this.backTextureOffset.Name = "backTextureOffset"; - this.backTextureOffset.Size = new System.Drawing.Size(249, 28); + this.backTextureOffset.Size = new System.Drawing.Size(247, 28); this.backTextureOffset.TabIndex = 42; this.backTextureOffset.OnValuesChanged += new System.EventHandler(this.backTextureOffset_OnValuesChanged); // @@ -1134,7 +1134,7 @@ namespace CodeImp.DoomBuilder.Windows this.udmfPropertiesBack.Controls.Add(this.tabBackOffsets); this.udmfPropertiesBack.Controls.Add(this.tabBackFlags); this.udmfPropertiesBack.ItemSize = new System.Drawing.Size(100, 19); - this.udmfPropertiesBack.Location = new System.Drawing.Point(10, 172); + this.udmfPropertiesBack.Location = new System.Drawing.Point(6, 172); this.udmfPropertiesBack.Margin = new System.Windows.Forms.Padding(1); this.udmfPropertiesBack.Name = "udmfPropertiesBack"; this.udmfPropertiesBack.SelectedIndex = 0; diff --git a/Source/Core/Windows/PreferencesForm.Designer.cs b/Source/Core/Windows/PreferencesForm.Designer.cs index f4f8d82ae..0ead14c88 100644 --- a/Source/Core/Windows/PreferencesForm.Designer.cs +++ b/Source/Core/Windows/PreferencesForm.Designer.cs @@ -58,9 +58,6 @@ namespace CodeImp.DoomBuilder.Windows this.keyusedlabel = new System.Windows.Forms.Label(); this.colorsgroup1 = new System.Windows.Forms.GroupBox(); this.color3dFloors = new CodeImp.DoomBuilder.Controls.ColorControl(); - this.label23 = new System.Windows.Forms.Label(); - this.numSectorsLabel = new System.Windows.Forms.Label(); - this.colorNewSectors = new CodeImp.DoomBuilder.Controls.ColorControl(); this.colorInfo = new CodeImp.DoomBuilder.Controls.ColorControl(); this.colorMD3 = new CodeImp.DoomBuilder.Controls.ColorControl(); this.doublesidedalpha = new Dotnetrix.Controls.TrackBar(); @@ -74,7 +71,6 @@ namespace CodeImp.DoomBuilder.Windows this.colorvertices = new CodeImp.DoomBuilder.Controls.ColorControl(); this.colorhighlight = new CodeImp.DoomBuilder.Controls.ColorControl(); this.colorlinedefs = new CodeImp.DoomBuilder.Controls.ColorControl(); - this.tbNumSectors = new Dotnetrix.Controls.TrackBar(); this.cbStretchModels = new System.Windows.Forms.CheckBox(); this.squarethings = new System.Windows.Forms.CheckBox(); this.qualitydisplay = new System.Windows.Forms.CheckBox(); @@ -179,7 +175,6 @@ namespace CodeImp.DoomBuilder.Windows ((System.ComponentModel.ISupportInitialize)(this.previewsize)).BeginInit(); this.colorsgroup1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.doublesidedalpha)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbNumSectors)).BeginInit(); this.tabs.SuspendLayout(); this.tabinterface.SuspendLayout(); this.groupBox5.SuspendLayout(); @@ -431,7 +426,7 @@ namespace CodeImp.DoomBuilder.Windows // label1 // label1.AutoSize = true; - label1.Location = new System.Drawing.Point(28, 22); + label1.Location = new System.Drawing.Point(28, 29); label1.Name = "label1"; label1.Size = new System.Drawing.Size(147, 14); label1.TabIndex = 20; @@ -441,7 +436,7 @@ namespace CodeImp.DoomBuilder.Windows // label18 // label18.AutoSize = true; - label18.Location = new System.Drawing.Point(22, 54); + label18.Location = new System.Drawing.Point(22, 61); label18.Name = "label18"; label18.Size = new System.Drawing.Size(151, 14); label18.TabIndex = 25; @@ -451,7 +446,7 @@ namespace CodeImp.DoomBuilder.Windows // label20 // label20.AutoSize = true; - label20.Location = new System.Drawing.Point(76, 86); + label20.Location = new System.Drawing.Point(76, 93); label20.Name = "label20"; label20.Size = new System.Drawing.Size(96, 14); label20.TabIndex = 28; @@ -461,7 +456,7 @@ namespace CodeImp.DoomBuilder.Windows // label21 // label21.AutoSize = true; - label21.Location = new System.Drawing.Point(55, 118); + label21.Location = new System.Drawing.Point(55, 125); label21.Name = "label21"; label21.Size = new System.Drawing.Size(116, 14); label21.TabIndex = 31; @@ -483,9 +478,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.color3dFloors); - this.colorsgroup1.Controls.Add(this.label23); - this.colorsgroup1.Controls.Add(this.numSectorsLabel); - this.colorsgroup1.Controls.Add(this.colorNewSectors); this.colorsgroup1.Controls.Add(this.colorInfo); this.colorsgroup1.Controls.Add(this.colorMD3); this.colorsgroup1.Controls.Add(this.doublesidedalpha); @@ -499,7 +491,6 @@ namespace CodeImp.DoomBuilder.Windows this.colorsgroup1.Controls.Add(this.colorvertices); this.colorsgroup1.Controls.Add(this.colorhighlight); this.colorsgroup1.Controls.Add(this.colorlinedefs); - this.colorsgroup1.Controls.Add(this.tbNumSectors); this.colorsgroup1.Location = new System.Drawing.Point(8, 8); this.colorsgroup1.Name = "colorsgroup1"; this.colorsgroup1.Size = new System.Drawing.Size(203, 493); @@ -520,37 +511,6 @@ namespace CodeImp.DoomBuilder.Windows this.color3dFloors.Size = new System.Drawing.Size(168, 23); this.color3dFloors.TabIndex = 24; // - // label23 - // - this.label23.AutoSize = true; - this.label23.Location = new System.Drawing.Point(14, 344); - this.label23.Name = "label23"; - this.label23.Size = new System.Drawing.Size(182, 14); - this.label23.TabIndex = 22; - this.label23.Text = "Number of new sectors to highlight: "; - this.label23.TextAlign = System.Drawing.ContentAlignment.TopRight; - // - // numSectorsLabel - // - this.numSectorsLabel.AutoSize = true; - this.numSectorsLabel.Location = new System.Drawing.Point(148, 371); - this.numSectorsLabel.Name = "numSectorsLabel"; - this.numSectorsLabel.Size = new System.Drawing.Size(13, 14); - this.numSectorsLabel.TabIndex = 23; - this.numSectorsLabel.Text = "3"; - // - // colorNewSectors - // - this.colorNewSectors.BackColor = System.Drawing.Color.Transparent; - this.colorNewSectors.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.colorNewSectors.Label = "New sectors:"; - this.colorNewSectors.Location = new System.Drawing.Point(15, 312); - this.colorNewSectors.MaximumSize = new System.Drawing.Size(10000, 23); - this.colorNewSectors.MinimumSize = new System.Drawing.Size(100, 23); - this.colorNewSectors.Name = "colorNewSectors"; - this.colorNewSectors.Size = new System.Drawing.Size(168, 23); - this.colorNewSectors.TabIndex = 20; - // // colorInfo // this.colorInfo.BackColor = System.Drawing.Color.Transparent; @@ -578,7 +538,7 @@ namespace CodeImp.DoomBuilder.Windows // doublesidedalpha // this.doublesidedalpha.LargeChange = 3; - this.doublesidedalpha.Location = new System.Drawing.Point(11, 426); + 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; @@ -636,7 +596,7 @@ namespace CodeImp.DoomBuilder.Windows // label2 // this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(14, 405); + this.label2.Location = new System.Drawing.Point(14, 328); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(147, 14); this.label2.TabIndex = 14; @@ -646,7 +606,7 @@ namespace CodeImp.DoomBuilder.Windows // doublesidedalphalabel // this.doublesidedalphalabel.AutoSize = true; - this.doublesidedalphalabel.Location = new System.Drawing.Point(147, 438); + this.doublesidedalphalabel.Location = new System.Drawing.Point(147, 361); this.doublesidedalphalabel.Name = "doublesidedalphalabel"; this.doublesidedalphalabel.Size = new System.Drawing.Size(23, 14); this.doublesidedalphalabel.TabIndex = 16; @@ -700,18 +660,6 @@ namespace CodeImp.DoomBuilder.Windows this.colorlinedefs.Size = new System.Drawing.Size(168, 23); this.colorlinedefs.TabIndex = 2; // - // tbNumSectors - // - this.tbNumSectors.LargeChange = 3; - this.tbNumSectors.Location = new System.Drawing.Point(11, 359); - this.tbNumSectors.Maximum = 8; - this.tbNumSectors.Name = "tbNumSectors"; - this.tbNumSectors.Size = new System.Drawing.Size(130, 45); - this.tbNumSectors.TabIndex = 21; - this.tbNumSectors.TickStyle = System.Windows.Forms.TickStyle.TopLeft; - this.toolTip1.SetToolTip(this.tbNumSectors, "Will draw selected number of newly created sectors using \"New sector\" color"); - this.tbNumSectors.ValueChanged += new System.EventHandler(this.tbNumSectors_ValueChanged); - // // cbStretchModels // this.cbStretchModels.AutoSize = true; @@ -1381,7 +1329,7 @@ namespace CodeImp.DoomBuilder.Windows // labelDynLightIntensity // this.labelDynLightIntensity.AutoSize = true; - this.labelDynLightIntensity.Location = new System.Drawing.Point(337, 116); + this.labelDynLightIntensity.Location = new System.Drawing.Point(337, 123); this.labelDynLightIntensity.Name = "labelDynLightIntensity"; this.labelDynLightIntensity.Size = new System.Drawing.Size(22, 14); this.labelDynLightIntensity.TabIndex = 32; @@ -1390,7 +1338,7 @@ namespace CodeImp.DoomBuilder.Windows // tbDynLightIntensity // this.tbDynLightIntensity.LargeChange = 1; - this.tbDynLightIntensity.Location = new System.Drawing.Point(176, 106); + this.tbDynLightIntensity.Location = new System.Drawing.Point(176, 113); this.tbDynLightIntensity.Minimum = 1; this.tbDynLightIntensity.Name = "tbDynLightIntensity"; this.tbDynLightIntensity.Size = new System.Drawing.Size(154, 45); @@ -1402,7 +1350,7 @@ namespace CodeImp.DoomBuilder.Windows // labelDynLightSize // this.labelDynLightSize.AutoSize = true; - this.labelDynLightSize.Location = new System.Drawing.Point(337, 85); + this.labelDynLightSize.Location = new System.Drawing.Point(337, 92); this.labelDynLightSize.Name = "labelDynLightSize"; this.labelDynLightSize.Size = new System.Drawing.Size(22, 14); this.labelDynLightSize.TabIndex = 29; @@ -1411,7 +1359,7 @@ namespace CodeImp.DoomBuilder.Windows // tbDynLightSize // this.tbDynLightSize.LargeChange = 1; - this.tbDynLightSize.Location = new System.Drawing.Point(176, 74); + this.tbDynLightSize.Location = new System.Drawing.Point(176, 81); this.tbDynLightSize.Maximum = 20; this.tbDynLightSize.Minimum = 1; this.tbDynLightSize.Name = "tbDynLightSize"; @@ -1424,7 +1372,7 @@ namespace CodeImp.DoomBuilder.Windows // labelDynLightCount // this.labelDynLightCount.AutoSize = true; - this.labelDynLightCount.Location = new System.Drawing.Point(337, 53); + this.labelDynLightCount.Location = new System.Drawing.Point(337, 60); this.labelDynLightCount.Name = "labelDynLightCount"; this.labelDynLightCount.Size = new System.Drawing.Size(19, 14); this.labelDynLightCount.TabIndex = 26; @@ -1433,7 +1381,7 @@ namespace CodeImp.DoomBuilder.Windows // tbDynLightCount // this.tbDynLightCount.LargeChange = 3; - this.tbDynLightCount.Location = new System.Drawing.Point(176, 42); + this.tbDynLightCount.Location = new System.Drawing.Point(176, 49); this.tbDynLightCount.Maximum = 32; this.tbDynLightCount.Minimum = 1; this.tbDynLightCount.Name = "tbDynLightCount"; @@ -1487,7 +1435,7 @@ namespace CodeImp.DoomBuilder.Windows // imagebrightnesslabel // this.imagebrightnesslabel.AutoSize = true; - this.imagebrightnesslabel.Location = new System.Drawing.Point(337, 22); + this.imagebrightnesslabel.Location = new System.Drawing.Point(337, 29); this.imagebrightnesslabel.Name = "imagebrightnesslabel"; this.imagebrightnesslabel.Size = new System.Drawing.Size(31, 14); this.imagebrightnesslabel.TabIndex = 22; @@ -1496,7 +1444,7 @@ namespace CodeImp.DoomBuilder.Windows // imagebrightness // this.imagebrightness.LargeChange = 3; - this.imagebrightness.Location = new System.Drawing.Point(176, 11); + this.imagebrightness.Location = new System.Drawing.Point(176, 18); this.imagebrightness.Name = "imagebrightness"; this.imagebrightness.Size = new System.Drawing.Size(154, 45); this.imagebrightness.TabIndex = 3; @@ -1537,6 +1485,7 @@ namespace CodeImp.DoomBuilder.Windows this.scripttabwidth.AllowNegative = false; this.scripttabwidth.AllowRelative = false; this.scripttabwidth.ButtonStep = 2; + this.scripttabwidth.ButtonStepFloat = 1F; this.scripttabwidth.Location = new System.Drawing.Point(259, 155); this.scripttabwidth.Name = "scripttabwidth"; this.scripttabwidth.Size = new System.Drawing.Size(71, 24); @@ -1797,7 +1746,6 @@ namespace CodeImp.DoomBuilder.Windows this.colorsgroup1.ResumeLayout(false); this.colorsgroup1.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.doublesidedalpha)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbNumSectors)).EndInit(); this.tabs.ResumeLayout(false); this.tabinterface.ResumeLayout(false); this.groupBox5.ResumeLayout(false); @@ -1948,10 +1896,6 @@ namespace CodeImp.DoomBuilder.Windows private CodeImp.DoomBuilder.Controls.ColorControl colorInfo; private System.Windows.Forms.CheckBox cbOldHighlightMode; private System.Windows.Forms.CheckBox cbLoadGameGldefs; - private CodeImp.DoomBuilder.Controls.ColorControl colorNewSectors; - private System.Windows.Forms.Label label23; - private System.Windows.Forms.Label numSectorsLabel; - private Dotnetrix.Controls.TrackBar tbNumSectors; private System.Windows.Forms.Button bClearActionFilter; private System.Windows.Forms.TextBox tbFilterActions; private System.Windows.Forms.Label label24; diff --git a/Source/Core/Windows/PreferencesForm.cs b/Source/Core/Windows/PreferencesForm.cs index f10b54026..c569302a3 100644 --- a/Source/Core/Windows/PreferencesForm.cs +++ b/Source/Core/Windows/PreferencesForm.cs @@ -104,12 +104,10 @@ namespace CodeImp.DoomBuilder.Windows vertexScale.Value = General.Clamp((int)(General.Settings.GZVertexScale2D), vertexScale.Minimum, vertexScale.Maximum); vertexScaleLabel.Text = vertexScale.Value * 100 + "%" + (vertexScale.Value == 1 ? " (default)" : ""); cbLoadGameGldefs.Checked = General.Settings.GZLoadDefaultLightDefinitions; - tbNumSectors.Value = General.Clamp(General.Settings.GZNewSectorsCount, tbNumSectors.Minimum, tbNumSectors.Maximum); - numSectorsLabel.Text = tbNumSectors.Value.ToString(); // Fill fonts list scriptfontname.BeginUpdate(); - foreach(FontFamily ff in System.Drawing.FontFamily.Families) + foreach(FontFamily ff in FontFamily.Families) scriptfontname.Items.Add(ff.Name); scriptfontname.EndUpdate(); @@ -167,7 +165,6 @@ namespace CodeImp.DoomBuilder.Windows //mxd colorMD3.Color = General.Colors.ModelWireframe; colorInfo.Color = General.Colors.InfoLine; - colorNewSectors.Color = General.Colors.NewSector; color3dFloors.Color = General.Colors.ThreeDFloor; colorscriptbackground.Color = General.Colors.ScriptBackground; @@ -214,12 +211,12 @@ namespace CodeImp.DoomBuilder.Windows // Apply interface General.Settings.ImageBrightness = imagebrightness.Value; General.Settings.SquareThings = squarethings.Checked; - General.Settings.DoubleSidedAlpha = 1.0f - (float)(doublesidedalpha.Value * 0.1f); + General.Settings.DoubleSidedAlpha = 1.0f - (doublesidedalpha.Value * 0.1f); General.Settings.DefaultViewMode = defaultviewmode.SelectedIndex; General.Settings.VisualFOV = fieldofview.Value * 10; General.Settings.MouseSpeed = mousespeed.Value * 100; General.Settings.MoveSpeed = movespeed.Value * 100; - General.Settings.ViewDistance = (float)viewdistance.Value * 200.0f; + General.Settings.ViewDistance = viewdistance.Value * 200.0f; General.Settings.InvertYAxis = invertyaxis.Checked; General.Settings.ScriptFontBold = scriptfontbold.Checked; General.Settings.ScriptFontName = scriptfontname.Text; @@ -250,7 +247,6 @@ namespace CodeImp.DoomBuilder.Windows General.Settings.ScriptFontSize = fontsize; // Apply control keys to actions - //foreach(ListViewItem item in listactions.Items) foreach(ListViewItem item in actionListItems) //mxd General.Actions[item.Name].SetShortcutKey((int)item.SubItems[1].Tag); @@ -275,7 +271,6 @@ namespace CodeImp.DoomBuilder.Windows //mxd General.Colors.ModelWireframe = colorMD3.Color; General.Colors.InfoLine = colorInfo.Color; - General.Colors.NewSector = colorNewSectors.Color; General.Colors.ThreeDFloor = color3dFloors.Color; General.Colors.CreateAssistColors(); @@ -287,13 +282,12 @@ namespace CodeImp.DoomBuilder.Windows //mxd General.Settings.GZSynchCameras = cbSynchCameras.Checked; General.Settings.GZMaxDynamicLights = tbDynLightCount.Value; - General.Settings.GZDynamicLightRadius = ((float)tbDynLightSize.Value / 10.0f); - General.Settings.GZDynamicLightIntensity = ((float)tbDynLightIntensity.Value / 10.0f); + General.Settings.GZDynamicLightRadius = (tbDynLightSize.Value / 10.0f); + General.Settings.GZDynamicLightIntensity = (tbDynLightIntensity.Value / 10.0f); General.Settings.GZStretchModels = cbStretchModels.Checked; - General.Settings.GZVertexScale2D = (float)vertexScale.Value; + General.Settings.GZVertexScale2D = vertexScale.Value; General.Settings.GZOldHighlightMode = cbOldHighlightMode.Checked; General.Settings.GZLoadDefaultLightDefinitions = cbLoadGameGldefs.Checked; - General.Settings.GZNewSectorsCount = tbNumSectors.Value; // Paste options General.Settings.PasteOptions = pasteoptions.GetOptions(); @@ -352,7 +346,6 @@ namespace CodeImp.DoomBuilder.Windows } colorsgroup1.Visible = (tabs.SelectedTab == tabcolors); - //colorsgroup2.Visible = (tabs.SelectedTab == tabcolors); colorsgroup3.Visible = (tabs.SelectedTab == tabcolors); } @@ -409,7 +402,7 @@ namespace CodeImp.DoomBuilder.Windows } // This updates the script font preview label - private void UpdateScriptFontPreview() + /*private void UpdateScriptFontPreview() { if((scriptfontname.SelectedIndex > -1) && (scriptfontsize.SelectedIndex > -1)) @@ -452,7 +445,7 @@ namespace CodeImp.DoomBuilder.Windows if(ff.IsStyleAvailable(style)) scriptfontlabel.Font = new Font(scriptfontname.Text, (float)fontsize, style); } - } + }*/ #endregion @@ -566,10 +559,8 @@ namespace CodeImp.DoomBuilder.Windows // Item selected private void listactions_ItemSelectionChanged(object sender, ListViewItemSelectionChangedEventArgs e) { - Actions.Action action; KeyControl keycontrol; string disregardkeys = ""; - int key; // Anything selected? if(listactions.SelectedItems.Count > 0) @@ -578,8 +569,8 @@ namespace CodeImp.DoomBuilder.Windows allowapplycontrol = false; // Get the selected action - action = General.Actions[listactions.SelectedItems[0].Name]; - key = (int)listactions.SelectedItems[0].SubItems[1].Tag; + Actions.Action action = General.Actions[listactions.SelectedItems[0].Name]; + int key = (int)listactions.SelectedItems[0].SubItems[1].Tag; disregardshift = action.DisregardShift; disregardcontrol = action.DisregardControl; @@ -692,8 +683,6 @@ namespace CodeImp.DoomBuilder.Windows // Special key selected private void actioncontrol_SelectedIndexChanged(object sender, EventArgs e) { - KeyControl key; - // Leave when not allowed to update if(!allowapplycontrol) return; @@ -707,7 +696,7 @@ namespace CodeImp.DoomBuilder.Windows actionkey.Text = ""; // Get the key control - key = (KeyControl)actioncontrol.SelectedItem; + KeyControl key = (KeyControl)actioncontrol.SelectedItem; // Apply the key combination listactions.SelectedItems[0].SubItems[1].Text = Actions.Action.GetShortcutKeyDesc(key.key); @@ -736,7 +725,7 @@ namespace CodeImp.DoomBuilder.Windows // Apply the key combination listactions.SelectedItems[0].SubItems[1].Text = ""; - listactions.SelectedItems[0].SubItems[1].Tag = (int)0; + listactions.SelectedItems[0].SubItems[1].Tag = 0; // Show actions with same key UpdateKeyUsedActions(); @@ -822,11 +811,6 @@ namespace CodeImp.DoomBuilder.Windows labelDynLightIntensity.Text = ((float)tbDynLightIntensity.Value / 10).ToString(); } - //mxd - private void tbNumSectors_ValueChanged(object sender, EventArgs e) { - numSectorsLabel.Text = tbNumSectors.Value.ToString(); - } - #endregion // Help diff --git a/Source/Core/Windows/PreferencesForm.resx b/Source/Core/Windows/PreferencesForm.resx index d68fbbd5f..983bf1dca 100644 --- a/Source/Core/Windows/PreferencesForm.resx +++ b/Source/Core/Windows/PreferencesForm.resx @@ -144,4 +144,7 @@ <metadata name="label21.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <value>False</value> </metadata> + <metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> </root> \ No newline at end of file -- GitLab