diff --git a/Source/Core/Editing/ClassicMode.cs b/Source/Core/Editing/ClassicMode.cs index 295ec4eb..9a6470d3 100644 --- a/Source/Core/Editing/ClassicMode.cs +++ b/Source/Core/Editing/ClassicMode.cs @@ -75,7 +75,6 @@ namespace CodeImp.DoomBuilder.Editing // View panning protected bool panning; private bool autopanenabled; - protected bool paintselectpressed; //mxd //mxd. used in "Play From Here" Action private Thing playerStart; @@ -870,29 +869,6 @@ namespace CodeImp.DoomBuilder.Editing SetViewMode(ViewMode.CeilingTextures); } - //mxd - [BeginAction("classicpaintselect")] - protected virtual void OnPaintSelectBegin() { - paintselectpressed = true; - } - - //mxd - [EndAction("classicpaintselect")] - protected virtual void OnPaintSelectEnd() { - paintselectpressed = false; - } - - //mxd - [BeginAction("togglebrightness")] - protected virtual void ToggleBrightness() { - renderer.FullBrightness = !renderer.FullBrightness; - string onoff = renderer.FullBrightness ? "ON" : "OFF"; - General.Interface.DisplayStatus(StatusType.Action, "Full Brightness is now " + onoff + "."); - - // Redraw display to show changes - General.Interface.RedrawDisplay(); - } - #endregion } diff --git a/Source/Core/Rendering/ColorCollection.cs b/Source/Core/Rendering/ColorCollection.cs index a062e74a..1d27b3cd 100644 --- a/Source/Core/Rendering/ColorCollection.cs +++ b/Source/Core/Rendering/ColorCollection.cs @@ -191,8 +191,8 @@ namespace CodeImp.DoomBuilder.Rendering internal void CreateCorrectionTable() { // Determine amounts - float gamma = (float)(General.Settings.ImageBrightness + 10) * 0.1f; - float bright = (float)General.Settings.ImageBrightness * 5f; + float gamma = (General.Settings.ImageBrightness + 10) * 0.1f; + float bright = General.Settings.ImageBrightness * 5f; // Make table correctiontable = new byte[256]; @@ -201,7 +201,7 @@ namespace CodeImp.DoomBuilder.Rendering for(int i = 0; i < 256; i++) { byte b; - float a = (float)i * gamma + bright; + float a = i * gamma + bright; if(a < 0f) b = 0; else if(a > 255f) b = 255; else b = (byte)a; correctiontable[i] = b; } diff --git a/Source/Core/Windows/TextureBrowserForm.Designer.cs b/Source/Core/Windows/TextureBrowserForm.Designer.cs index 0f33689f..31cdce19 100644 --- a/Source/Core/Windows/TextureBrowserForm.Designer.cs +++ b/Source/Core/Windows/TextureBrowserForm.Designer.cs @@ -79,6 +79,7 @@ namespace CodeImp.DoomBuilder.Windows this.tvTextureSets.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Right))); this.tvTextureSets.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.tvTextureSets.HideSelection = false; this.tvTextureSets.ImageIndex = 0; this.tvTextureSets.ImageList = this.smallimages; this.tvTextureSets.Location = new System.Drawing.Point(681, 12); diff --git a/Source/Core/Windows/TextureBrowserForm.resx b/Source/Core/Windows/TextureBrowserForm.resx index 4ed554b8..5d7f9d92 100644 --- a/Source/Core/Windows/TextureBrowserForm.resx +++ b/Source/Core/Windows/TextureBrowserForm.resx @@ -125,7 +125,7 @@ AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj0yLjAuMC4w LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAAc - DwAAAk1TRnQBSQFMAgEBBwEAAdQBAAHUAQABEAEAARYBAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo + DwAAAk1TRnQBSQFMAgEBBwEAAdwBAAHcAQABEAEAARYBAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo AwABQAMAASwDAAEBAQABCAYAAQsYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5 AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA diff --git a/Source/Plugins/BuilderModes/ClassicModes/BaseClassicMode.cs b/Source/Plugins/BuilderModes/ClassicModes/BaseClassicMode.cs index 0079d16f..aa3a7559 100644 --- a/Source/Plugins/BuilderModes/ClassicModes/BaseClassicMode.cs +++ b/Source/Plugins/BuilderModes/ClassicModes/BaseClassicMode.cs @@ -39,6 +39,8 @@ namespace CodeImp.DoomBuilder.BuilderModes #endregion #region ================== Variables + + protected bool paintselectpressed; //mxd #endregion @@ -291,6 +293,29 @@ namespace CodeImp.DoomBuilder.BuilderModes General.Interface.RedrawDisplay(); } + //mxd + [BeginAction("classicpaintselect")] + protected virtual void OnPaintSelectBegin() { + paintselectpressed = true; + } + + //mxd + [EndAction("classicpaintselect")] + protected virtual void OnPaintSelectEnd() { + paintselectpressed = false; + } + + //mxd + [BeginAction("togglebrightness")] + protected virtual void ToggleBrightness() { + renderer.FullBrightness = !renderer.FullBrightness; + string onoff = renderer.FullBrightness ? "ON" : "OFF"; + General.Interface.DisplayStatus(StatusType.Action, "Full Brightness is now " + onoff + "."); + + // Redraw display to show changes + General.Interface.RedrawDisplay(); + } + //mxd [BeginAction("togglehighlight")] public void ToggleHighlight() {