diff --git a/Build/Builder.exe b/Build/Builder.exe deleted file mode 100644 index 112682d9..00000000 Binary files a/Build/Builder.exe and /dev/null differ diff --git a/Build/Plugins/BuilderModes.dll b/Build/Plugins/BuilderModes.dll deleted file mode 100644 index 05c96fd4..00000000 Binary files a/Build/Plugins/BuilderModes.dll and /dev/null differ diff --git a/Build/Plugins/ColorPicker.dll b/Build/Plugins/ColorPicker.dll deleted file mode 100644 index cd85d7d8..00000000 Binary files a/Build/Plugins/ColorPicker.dll and /dev/null differ diff --git a/Build/Plugins/CopyPasteSectorProps.dll b/Build/Plugins/CopyPasteSectorProps.dll deleted file mode 100644 index 2f364263..00000000 Binary files a/Build/Plugins/CopyPasteSectorProps.dll and /dev/null differ diff --git a/Build/Plugins/GZDoomEditing.dll b/Build/Plugins/GZDoomEditing.dll deleted file mode 100644 index ea6290fa..00000000 Binary files a/Build/Plugins/GZDoomEditing.dll and /dev/null differ diff --git a/Build/Plugins/WadAuthorMode.dll b/Build/Plugins/WadAuthorMode.dll deleted file mode 100644 index 628fe7ed..00000000 Binary files a/Build/Plugins/WadAuthorMode.dll and /dev/null differ diff --git a/Source/Plugins/ColorPicker/BuilderPlug.cs b/Source/Plugins/ColorPicker/BuilderPlug.cs index be19928d..f0cb287d 100644 --- a/Source/Plugins/ColorPicker/BuilderPlug.cs +++ b/Source/Plugins/ColorPicker/BuilderPlug.cs @@ -46,16 +46,6 @@ namespace CodeImp.DoomBuilder.ColorPicker public override void OnMapOpenEnd() { if (toolsform == null) toolsform = new ToolsForm(); - - //dbg - /*CodeImp.DoomBuilder.Rendering.PixelColor c = new CodeImp.DoomBuilder.Rendering.PixelColor(255, 255, 64, 3); - int ic = c.ToColorRef(); - - CodeImp.DoomBuilder.Rendering.PixelColor c2 = CodeImp.DoomBuilder.Rendering.PixelColor.FromInt(ic); - - GZBuilder.GZGeneral.Trace("c: "+c.r+","+c.g+","+c.b); - GZBuilder.GZGeneral.Trace("ic: " + ic); - GZBuilder.GZGeneral.Trace("c2: " + c2.r + "," + c2.g + "," + c2.b);*/ } public override void OnMapNewEnd() { diff --git a/Source/Plugins/ColorPicker/Controls/ColorPickerControl.cs b/Source/Plugins/ColorPicker/Controls/ColorPickerControl.cs index ec732905..f3dde6b9 100644 --- a/Source/Plugins/ColorPicker/Controls/ColorPickerControl.cs +++ b/Source/Plugins/ColorPicker/Controls/ColorPickerControl.cs @@ -42,7 +42,10 @@ namespace CodeImp.DoomBuilder.ColorPicker.Controls { public void Initialize(Color startColor){ this.startColor = startColor; + + isInUpdate = true; InitializeComponent(); + isInUpdate = false; } private void nudValueChanged(object sender, System.EventArgs e) { diff --git a/Source/Plugins/ColorPicker/Windows/SectorColorPicker.cs b/Source/Plugins/ColorPicker/Windows/SectorColorPicker.cs index b242f585..0721547d 100644 --- a/Source/Plugins/ColorPicker/Windows/SectorColorPicker.cs +++ b/Source/Plugins/ColorPicker/Windows/SectorColorPicker.cs @@ -54,15 +54,20 @@ namespace CodeImp.DoomBuilder.ColorPicker.Windows //set colors curSectorColor = selection[0].Fields.GetValue("lightcolor", -1); - if (curSectorColor == -1) { //add lightcolor field + if (curSectorColor == -1) curSectorColor = defaultSectorColor; - selection[0].Fields.Add("lightcolor", new UniValue(UniversalType.Color, curSectorColor)); - } curFadeColor = selection[0].Fields.GetValue("fadecolor", -1); - if (curFadeColor == -1) { //add fadecolor field + if (curFadeColor == -1) curFadeColor = defaultFadeColor; - selection[0].Fields.Add("fadecolor", new UniValue(UniversalType.Color, curFadeColor)); + + //check that all sectors in selection have "lightcolor" and "fadecolor" fields + for (int i = 0; i < selection.Count; i++) { + if (!selection[i].Fields.ContainsKey("lightcolor")) + selection[i].Fields.Add("lightcolor", new UniValue(UniversalType.Color, curSectorColor)); + + if (!selection[i].Fields.ContainsKey("fadecolor")) + selection[i].Fields.Add("fadecolor", new UniValue(UniversalType.Color, curFadeColor)); } initialSectorColor = curSectorColor; @@ -70,10 +75,10 @@ namespace CodeImp.DoomBuilder.ColorPicker.Windows InitializeComponent(); + colorPickerControl1.Initialize(Color.FromArgb(currentColorTag == "lightcolor" ? curSectorColor : curFadeColor)); colorPickerControl1.ColorChanged += new EventHandler(colorPickerControl1_ColorChanged); colorPickerControl1.OnOkPressed += new EventHandler(colorPickerControl1_OnOkPressed); colorPickerControl1.OnCancelPressed += new EventHandler(colorPickerControl1_OnCancelPressed); - colorPickerControl1.Initialize(Color.FromArgb(currentColorTag == "lightcolor" ? curSectorColor : curFadeColor)); if (currentColorTag == "lightcolor") rbSectorColor.Checked = true;