Fixed brightness preview when changing sector brightnesses in Brightness Mode

This commit is contained in:
codeimp 2010-08-16 18:29:56 +00:00
parent a8322b7d45
commit 27d30072fb

View file

@ -68,9 +68,6 @@ namespace CodeImp.DoomBuilder.BuilderModes
// Highlighted item // Highlighted item
private Sector highlighted; private Sector highlighted;
// Interface
private bool editpressed;
// Labels // Labels
private Dictionary<Sector, TextLabel[]> labels; private Dictionary<Sector, TextLabel[]> labels;
@ -159,7 +156,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
foreach(Sector s in orderedselection) foreach(Sector s in orderedselection)
{ {
// We use the overlay to dim the brightness of the sectors // 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(); int brightnessint = brightnesscolor.ToInt();
// Render the geometry // Render the geometry