From 27d30072fbd9980dadf88ea005661f78cfe8d2c2 Mon Sep 17 00:00:00 2001 From: codeimp Date: Mon, 16 Aug 2010 18:29:56 +0000 Subject: [PATCH] Fixed brightness preview when changing sector brightnesses in Brightness Mode --- Source/Plugins/BuilderModes/ClassicModes/BrightnessMode.cs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Source/Plugins/BuilderModes/ClassicModes/BrightnessMode.cs b/Source/Plugins/BuilderModes/ClassicModes/BrightnessMode.cs index 67eb65ef..718f4a9c 100644 --- a/Source/Plugins/BuilderModes/ClassicModes/BrightnessMode.cs +++ b/Source/Plugins/BuilderModes/ClassicModes/BrightnessMode.cs @@ -68,9 +68,6 @@ namespace CodeImp.DoomBuilder.BuilderModes // Highlighted item private Sector highlighted; - // Interface - private bool editpressed; - // Labels private Dictionary labels; @@ -159,7 +156,8 @@ namespace CodeImp.DoomBuilder.BuilderModes foreach(Sector s in orderedselection) { // We use the overlay to dim the brightness of the sectors - PixelColor brightnesscolor = new PixelColor((byte)(255 - s.Brightness), 0, 0, 0); + PixelColor c = PixelColor.FromInt(General.Map.Renderer2D.CalculateBrightness(s.Brightness)); + PixelColor brightnesscolor = new PixelColor((byte)(255 - c.r), 0, 0, 0); int brightnessint = brightnesscolor.ToInt(); // Render the geometry