diff --git a/Help/gzdb/features/classic_modes/linedef_color_presets.html b/Help/gzdb/features/classic_modes/linedef_color_presets.html index 67ccf4b4f7252aa0e75fae9b1e37825e53d3a036..94b93a5bddf25961843ab2baef14684e2e300658 100644 --- a/Help/gzdb/features/classic_modes/linedef_color_presets.html +++ b/Help/gzdb/features/classic_modes/linedef_color_presets.html @@ -21,7 +21,10 @@ <div id="gz_title"><h1>Custom linedef colors</h1></div> <div id="contents"> - <p>You can create custom linedef color presets to show linedefs with any combination of action, flags and activation using a specified color in 2D modes.</p> + <p>You can create <strong>custom linedef color presets</strong> to show linedefs with any combination of <strong>action</strong>, <strong>flags</strong> and <strong>activation</strong> using a specified color in 2D modes.</p> + <p>You can choose which presets to apply using the drop down menu on the main toolbar.<br />While the drop down is opened, hold <strong>Shift</strong> to toggle several items at once.<br /> + <img src="linedef_color_presets_dropdown.jpg" /> + </p> <p><strong>Technical notice: </strong>color presets are evaluated from top to bottom, so if you have a setup like this:<br /> <span class="style1">"Any action" [no flags]<strong> [any action]</strong> [no activation]<br /> "Slopes" [no flags]<strong> [action 181]</strong> [no activation]</span><br /> diff --git a/Help/gzdb/features/classic_modes/linedef_color_presets.jpg b/Help/gzdb/features/classic_modes/linedef_color_presets.jpg index 221aeca7d552b617ef527d6acc4ca569933d5f48..6ebcd7bd01c5a9aee981026a3d65d1350caa85f2 100644 Binary files a/Help/gzdb/features/classic_modes/linedef_color_presets.jpg and b/Help/gzdb/features/classic_modes/linedef_color_presets.jpg differ diff --git a/Help/gzdb/features/classic_modes/linedef_color_presets_dropdown.jpg b/Help/gzdb/features/classic_modes/linedef_color_presets_dropdown.jpg new file mode 100644 index 0000000000000000000000000000000000000000..40fda93a7858eeb3b06e69adccf31bbdc7dff463 Binary files /dev/null and b/Help/gzdb/features/classic_modes/linedef_color_presets_dropdown.jpg differ diff --git a/Source/Core/Builder.csproj b/Source/Core/Builder.csproj index fe35b728ca9b92d09cae0e6ede38bfcff9dfcd3a..7aa8625493b9d01facfe5471134460c03cc83975 100644 --- a/Source/Core/Builder.csproj +++ b/Source/Core/Builder.csproj @@ -801,19 +801,7 @@ <Compile Include="GZBuilder\Controls\TagsSelector.Designer.cs"> <DependentUpon>TagsSelector.cs</DependentUpon> </Compile> - <Compile Include="GZBuilder\Controls\CustomLinedefColorProperties.cs"> - <SubType>UserControl</SubType> - </Compile> - <Compile Include="GZBuilder\Controls\CustomLinedefColorProperties.designer.cs"> - <DependentUpon>CustomLinedefColorProperties.cs</DependentUpon> - </Compile> - <Compile Include="GZBuilder\Controls\CustomLinedefColorsControl.cs"> - <SubType>UserControl</SubType> - </Compile> - <Compile Include="GZBuilder\Controls\CustomLinedefColorsControl.designer.cs"> - <DependentUpon>CustomLinedefColorsControl.cs</DependentUpon> - </Compile> - <Compile Include="GZBuilder\Controls\IconListBox.cs"> + <Compile Include="Controls\CheckedColoredListBox.cs"> <SubType>Component</SubType> </Compile> <Compile Include="GZBuilder\Controls\MultiSelectTreeview.cs"> @@ -925,6 +913,12 @@ <Compile Include="Windows\FlagsForm.Designer.cs"> <DependentUpon>FlagsForm.cs</DependentUpon> </Compile> + <Compile Include="Windows\LinedefColorPresetsForm.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="Windows\LinedefColorPresetsForm.Designer.cs"> + <DependentUpon>LinedefColorPresetsForm.cs</DependentUpon> + </Compile> <Compile Include="Windows\LinedefEditFormUDMF.cs"> <SubType>Form</SubType> </Compile> @@ -1031,12 +1025,6 @@ <EmbeddedResource Include="GZBuilder\Controls\TagsSelector.resx"> <DependentUpon>TagsSelector.cs</DependentUpon> </EmbeddedResource> - <EmbeddedResource Include="GZBuilder\Controls\CustomLinedefColorProperties.resx"> - <DependentUpon>CustomLinedefColorProperties.cs</DependentUpon> - </EmbeddedResource> - <EmbeddedResource Include="GZBuilder\Controls\CustomLinedefColorsControl.resx"> - <DependentUpon>CustomLinedefColorsControl.cs</DependentUpon> - </EmbeddedResource> <EmbeddedResource Include="GZBuilder\Controls\PairedFieldsControl.resx"> <DependentUpon>PairedFieldsControl.cs</DependentUpon> </EmbeddedResource> @@ -1097,6 +1085,7 @@ <EmbeddedResource Include="Resources\MissingThing.png" /> <None Include="Resources\MCrash.png" /> <None Include="Resources\MixedThings.png" /> + <None Include="Resources\LinedefColorPresets.png" /> <Content Include="Resources\Model.png" /> <None Include="Resources\ModelDisabled.png" /> <None Include="Resources\ModelFiltered.png" /> @@ -1242,6 +1231,9 @@ <EmbeddedResource Include="Windows\FlagsForm.resx"> <DependentUpon>FlagsForm.cs</DependentUpon> </EmbeddedResource> + <EmbeddedResource Include="Windows\LinedefColorPresetsForm.resx"> + <DependentUpon>LinedefColorPresetsForm.cs</DependentUpon> + </EmbeddedResource> <EmbeddedResource Include="Windows\LinedefEditFormUDMF.resx"> <DependentUpon>LinedefEditFormUDMF.cs</DependentUpon> </EmbeddedResource> diff --git a/Source/Core/Config/ConfigurationInfo.cs b/Source/Core/Config/ConfigurationInfo.cs index 709a0908d69ceab31b4989aae533e1fd594ac059..c1afddbfe47fd53806018b8c2a9cff82158a1fd4 100644 --- a/Source/Core/Config/ConfigurationInfo.cs +++ b/Source/Core/Config/ConfigurationInfo.cs @@ -170,9 +170,7 @@ namespace CodeImp.DoomBuilder.Config //no presets? add "classic" ones then. if(list.Count == 0) { - LinedefColorPreset anyActionPreset = new LinedefColorPreset("Any action", PixelColor.FromColor(System.Drawing.Color.PaleGreen), -1, 0, new List<string>(), new List<string>()); - anyActionPreset.SetValid(); - colorPresets.Add(anyActionPreset); + colorPresets.Add(new LinedefColorPreset("Any action", PixelColor.FromColor(System.Drawing.Color.PaleGreen), -1, 0, new List<string>(), new List<string>(), true)); } else { @@ -181,6 +179,7 @@ namespace CodeImp.DoomBuilder.Config { string path = "configurations." + settingskey + ".linedefcolorpresets." + de.Key; string presetname = General.Settings.ReadSetting(path + ".name", "Unnamed"); + bool presetenabled = General.Settings.ReadSetting(path + ".enabled", true); PixelColor color = PixelColor.FromInt(General.Settings.ReadSetting(path + ".color", -1)); int action = General.Settings.ReadSetting(path + ".action", 0); int activation = General.Settings.ReadSetting(path + ".activation", 0); @@ -188,7 +187,7 @@ namespace CodeImp.DoomBuilder.Config flags.AddRange(General.Settings.ReadSetting(path + ".flags", "").Split(LINEDEF_COLOR_PRESET_FLAGS_SEPARATOR, StringSplitOptions.RemoveEmptyEntries)); List<string> restrictedFlags = new List<string>(); restrictedFlags.AddRange(General.Settings.ReadSetting(path + ".restrictedflags", "").Split(LINEDEF_COLOR_PRESET_FLAGS_SEPARATOR, StringSplitOptions.RemoveEmptyEntries)); - LinedefColorPreset preset = new LinedefColorPreset(presetname, color, action, activation, flags, restrictedFlags); + LinedefColorPreset preset = new LinedefColorPreset(presetname, color, action, activation, flags, restrictedFlags, presetenabled); colorPresets.Add(preset); } } @@ -336,6 +335,7 @@ namespace CodeImp.DoomBuilder.Config { rlinfo = new ListDictionary(); rlinfo.Add("name", linedefColorPresets[i].Name); + rlinfo.Add("enabled", linedefColorPresets[i].Enabled); rlinfo.Add("color", linedefColorPresets[i].Color.ToInt()); rlinfo.Add("action", linedefColorPresets[i].Action); rlinfo.Add("activation", linedefColorPresets[i].Activation); diff --git a/Source/Core/Controls/CheckedColoredListBox.cs b/Source/Core/Controls/CheckedColoredListBox.cs new file mode 100644 index 0000000000000000000000000000000000000000..8923190865c436d3dbdee114384ecd2cf85c8030 --- /dev/null +++ b/Source/Core/Controls/CheckedColoredListBox.cs @@ -0,0 +1,66 @@ +using System; +using System.Windows.Forms; +using System.Drawing; +using System.Windows.Forms.VisualStyles; + +namespace CodeImp.DoomBuilder.Controls +{ + public class CheckedColoredListBox : CheckedListBox + { + public Image WarningIcon { private get; set; } + + public CheckedColoredListBox() + { + this.DrawMode = DrawMode.OwnerDrawVariable; + } + + protected override void OnMeasureItem(MeasureItemEventArgs e) + { + e.ItemHeight = (int)Math.Ceiling(this.Font.Height * (e.Graphics.DpiY / 96.0f)); + } + + protected override void OnDrawItem(DrawItemEventArgs e) + { + if(Items.Count == 0) return; //sanity check + IColoredListBoxItem item = (IColoredListBoxItem)Items[e.Index]; + + // Draw background + e.DrawBackground(); + + // Draw checkbox + CheckBoxRenderer.DrawCheckBox(e.Graphics, new Point(e.Bounds.Left + 1, e.Bounds.Top + 1), CheckedIndices.Contains(e.Index) ? CheckBoxState.CheckedNormal : CheckBoxState.UncheckedNormal); + + // Draw warning icon + if(item.ShowWarning && WarningIcon != null) + { + e.Graphics.DrawImage(WarningIcon, e.Bounds.Left + e.Bounds.Height + 2, e.Bounds.Top, WarningIcon.Width, WarningIcon.Height); + } + else // Draw color rectangle + { + using(SolidBrush bg = new SolidBrush(item.Color)) + { + e.Graphics.FillRectangle(bg, e.Bounds.Left + e.Bounds.Height + 2, e.Bounds.Top + 2, e.Bounds.Height, e.Bounds.Height - 5); + } + using(Pen outline = new Pen(Color.Black)) + { + e.Graphics.DrawRectangle(outline, e.Bounds.Left + e.Bounds.Height + 2, e.Bounds.Top + 2, e.Bounds.Height, e.Bounds.Height - 5); + } + } + + // Draw text + int offset = e.Bounds.Left + e.Bounds.Height * 2 + 4; + Rectangle textbounds = new Rectangle(offset, e.Bounds.Top, e.Bounds.Width - offset, e.Bounds.Height); + e.Graphics.DrawString(item.ToString(), e.Font, new SolidBrush(e.ForeColor), textbounds.Left, textbounds.Top); + + // Draw focus rectangle + if(e.State == DrawItemState.Focus) + ControlPaint.DrawFocusRectangle(e.Graphics, textbounds, e.ForeColor, e.BackColor); + } + } + + interface IColoredListBoxItem + { + bool ShowWarning { get; } + Color Color { get; } + } +} diff --git a/Source/Core/Editing/ThingsFilter.cs b/Source/Core/Editing/ThingsFilter.cs index b30e697cea9cfc7d5e47e599b7dea0bd8ebeacd0..c1c7b141b73e51d394390cb7a36aeff56cc518b0 100644 --- a/Source/Core/Editing/ThingsFilter.cs +++ b/Source/Core/Editing/ThingsFilter.cs @@ -101,6 +101,7 @@ namespace CodeImp.DoomBuilder.Editing public ICollection<Thing> VisibleThings { get { return visiblethings; } } public ICollection<Thing> HiddenThings { get { return hiddenthings; } } internal bool IsDisposed { get { return isdisposed; } } + public const string DEFAULT_NAME = "Unnamed filter"; //mxd #endregion @@ -140,7 +141,7 @@ namespace CodeImp.DoomBuilder.Editing customfields = new UniFields(); // Read settings from config - name = cfg.ReadSetting(path + ".name", "Unnamed filter"); + name = cfg.ReadSetting(path + ".name", DEFAULT_NAME); categoryname = cfg.ReadSetting(path + ".category", ""); invert = cfg.ReadSetting(path + ".invert", false); //mxd displaymode = (ThingsFilterDisplayMode)cfg.ReadSetting(path + ".displaymode", 0); //mxd @@ -194,7 +195,7 @@ namespace CodeImp.DoomBuilder.Editing thingargs = new int[Thing.NUM_ARGS]; for(int i = 0 ; i < Thing.NUM_ARGS; i++) thingargs[i] = -1; thingtag = -1; - name = "Unnamed filter"; + name = DEFAULT_NAME; // We have no destructor GC.SuppressFinalize(this); @@ -273,12 +274,22 @@ namespace CodeImp.DoomBuilder.Editing AdjustForMapFormat(); //Integrity check - if(string.IsNullOrEmpty(categoryname) && thingtype == -1 && thingangle == -1 - && thingzheight == int.MinValue && thingaction == -1 && thingtag == -1 - && requiredfields.Count == 0 && forbiddenfields.Count == 0 && customfields.Count == 0) - { + if(!IsValid()) General.ErrorLogger.Add(ErrorType.Warning, "Things filter '" + name + "' has invalid properties. Configure the thing filter to fix this!"); - } + } + + //mxd + public bool IsValid() + { + return (!string.IsNullOrEmpty(categoryname) + || thingtype > 0 + || thingangle != -1 + || thingzheight != int.MinValue + || thingaction != -1 + || thingtag != -1 + || requiredfields.Count > 0 + || forbiddenfields.Count > 0 + || customfields.Count > 0); } /// <summary> diff --git a/Source/Core/GZBuilder/Controls/CustomLinedefColorProperties.cs b/Source/Core/GZBuilder/Controls/CustomLinedefColorProperties.cs deleted file mode 100644 index 3833f2ca1de8e0f93820e17dd086822cf8604263..0000000000000000000000000000000000000000 --- a/Source/Core/GZBuilder/Controls/CustomLinedefColorProperties.cs +++ /dev/null @@ -1,357 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Windows.Forms; -using CodeImp.DoomBuilder.Rendering; -using CodeImp.DoomBuilder.GZBuilder.Data; -using CodeImp.DoomBuilder.Config; - -namespace CodeImp.DoomBuilder.GZBuilder.Controls -{ - public partial class CustomLinedefColorProperties : UserControl - { - public event EventHandler PresetChanged; - - public PixelColor DefaultColor { get { return defaultColor; } } - private PixelColor defaultColor; - private bool presetUpdating; - private LinedefColorPreset preset; - - public bool UDMF { get { return udmf; } } - private bool udmf; - - private struct FlagData - { - public string Title { get { return title; } } - private string title; - - public string Flag { get { return flag; } } - private string flag; - - public FlagData(string title, string flag) - { - this.title = title; - this.flag = flag; - } - - public override string ToString() - { - return Title; - } - } - - public CustomLinedefColorProperties() - { - InitializeComponent(); - - defaultColor = lineColor.Color; - - //disable controls - this.Enabled = false; - labelErrors.Text = ""; - } - - public void Setup(GameConfiguration config) - { - udmf = (config.FormatInterface == "UniversalMapSetIO"); - - presetUpdating = true; - //add flags - flags.Items.Clear(); - foreach(KeyValuePair<string, string> lf in config.LinedefFlags) - flags.Items.Add(new FlagData(lf.Value, lf.Key), CheckState.Indeterminate); - - // Fill actions list - action.GeneralizedCategories = config.GenActionCategories; - - LinedefActionInfo anyAction = new LinedefActionInfo(-1, "Any action", true, false); - List<LinedefActionInfo> infos = config.SortedLinedefActions; - infos.Insert(0, anyAction); - - action.AddInfo(infos.ToArray()); - action.Value = -1; - - //activations - udmfactivates.Visible = udmf; - activation.Visible = !udmf; - activation.Items.Clear(); - udmfactivates.Items.Clear(); - - //get activates - List<LinedefActivateInfo> activations = config.LinedefActivates; - - if(activations.Count > 0) - { - activations.Insert(0, new LinedefActivateInfo("-1", "Any activation")); - - if(udmf) - { - foreach(LinedefActivateInfo ai in config.LinedefActivates) - udmfactivates.Items.Add(new FlagData(ai.Title, ai.Key), CheckState.Indeterminate); - } - else - { - activation.Items.AddRange(activations.ToArray()); - } - - if(!tcLineSettings.TabPages.Contains(tabActivation)) - tcLineSettings.TabPages.Add(tabActivation); - } - else - { - tcLineSettings.TabPages.Remove(tabActivation); - } - - //disable controls - flags.Enabled = false; - action.Enabled = false; - activation.Enabled = false; - udmfactivates.Enabled = false; - - presetUpdating = false; - } - - public void SetPreset(LinedefColorPreset preset) - { - this.Enabled = true; - presetUpdating = true; - - this.preset = preset; - - //set color - lineColor.Color = this.preset.Color; - - //set flags - ApplyFlagsToControl(flags, cbUseFlags); - - //set activation - if(udmf) - { - ApplyFlagsToControl(udmfactivates, cbUseActivation); - } - else if(tcLineSettings.TabPages.Contains(tabActivation)) - { - if(this.preset.Activation == 0) - { - activation.SelectedIndex = 1; - cbUseActivation.Checked = false; - activation.Enabled = false; - } - else - { - for(int i = 0; i < activation.Items.Count; i++) - { - if(((LinedefActivateInfo)activation.Items[i]).Index == this.preset.Activation) - { - activation.SelectedIndex = i; - cbUseActivation.Checked = true; - activation.Enabled = true; - break; - } - } - } - } - - //set action - action.Value = this.preset.Action; - cbUseAction.Checked = this.preset.Action != 0; - action.Enabled = this.preset.Action != 0; - - //warnings/errors? - UpdateMessages(); - - presetUpdating = false; - } - - /*public LinedefColorPreset GetPreset() - { - return preset; - }*/ - - public void UpdateMessages() - { - //warnings/errors? - List<string> errors = new List<string>(); - if(!preset.Valid) errors.Add(preset.ErrorDescription); - if(!string.IsNullOrEmpty(preset.WarningDescription)) errors.Add(preset.WarningDescription); - labelErrors.Text = (errors.Count > 0 ? string.Join(Environment.NewLine, errors.ToArray()) : ""); - } - - private void RaiseEvent() - { - if(PresetChanged != null) PresetChanged(this, EventArgs.Empty); - } - - private void ApplyFlagsToPreset(CheckedListBox source) - { - if(source.Enabled) - { - for(int i = 0; i < source.Items.Count; i++) - { - string flag = ((FlagData)source.Items[i]).Flag; - CheckState state = source.GetItemCheckState(i); - - switch (state) - { - case CheckState.Checked: - if(!preset.Flags.Contains(flag)) - preset.Flags.Add(flag); - if(preset.RestrictedFlags.Contains(flag)) - preset.RestrictedFlags.Remove(flag); - break; - - case CheckState.Unchecked: - if(preset.Flags.Contains(flag)) - preset.Flags.Remove(flag); - if(!preset.RestrictedFlags.Contains(flag)) - preset.RestrictedFlags.Add(flag); - break; - - default: - if(preset.Flags.Contains(flag)) - preset.Flags.Remove(flag); - if(preset.RestrictedFlags.Contains(flag)) - preset.RestrictedFlags.Remove(flag); - break; - } - } - } - else - { - for(int i = 0; i < source.Items.Count; i++) - { - string flag = ((FlagData)source.Items[i]).Flag; - - if(preset.Flags.Contains(flag)) - preset.Flags.Remove(flag); - if(preset.RestrictedFlags.Contains(flag)) - preset.RestrictedFlags.Remove(flag); - } - } - } - - private void ApplyFlagsToControl(CheckedListBox target, CheckBox cb) - { - if(preset.Flags.Count == 0 && preset.RestrictedFlags.Count == 0) - { - cb.Checked = false; - target.Enabled = false; - - for(int i = 0; i < target.Items.Count; i++) - target.SetItemCheckState(i, CheckState.Indeterminate); - } - else - { - bool hasFlags = false; - CheckState flagState; - - for(int i = 0; i < target.Items.Count; i++) - { - string flag = ((FlagData)target.Items[i]).Flag; - - if(preset.Flags.Contains(flag)) - flagState = CheckState.Checked; - else if(preset.RestrictedFlags.Contains(flag)) - flagState = CheckState.Unchecked; - else - flagState = CheckState.Indeterminate; - - target.SetItemCheckState(i, flagState); - if(flagState != CheckState.Indeterminate) hasFlags = true; - } - - cb.Checked = hasFlags; - target.Enabled = hasFlags; - } - } - -//EVENTS - private void cbUseFlags_CheckedChanged(object sender, EventArgs e) - { - if(presetUpdating) return; - flags.Enabled = cbUseFlags.Checked; - ApplyFlagsToPreset(flags); - - if(!flags.Enabled) RaiseEvent(); - } - - private void flags_SelectedValueChanged(object sender, EventArgs e) - { - if(presetUpdating) return; - ApplyFlagsToPreset(flags); - - RaiseEvent(); - } - - private void cbUseAction_CheckedChanged(object sender, EventArgs e) - { - if(presetUpdating) return; - action.Enabled = cbUseAction.Checked; - action.Value = 0; - } - - private void action_ValueChanges(object sender, EventArgs e) - { - if(presetUpdating) return; - preset.Action = action.Value; - RaiseEvent(); - } - - private void cbUseActivation_CheckedChanged(object sender, EventArgs e) - { - if(presetUpdating) return; - activation.Enabled = cbUseActivation.Checked; - udmfactivates.Enabled = cbUseActivation.Checked; - - if(udmf) ApplyFlagsToPreset(udmfactivates); - else if(!cbUseActivation.Checked) activation.SelectedIndex = 1; - - if(!cbUseActivation.Checked) RaiseEvent(); - } - - private void activation_SelectedIndexChanged(object sender, EventArgs e) - { - if(presetUpdating) return; - preset.Activation = ((LinedefActivateInfo)activation.SelectedItem).Index; - RaiseEvent(); - } - - private void udmfactivates_SelectedValueChanged(object sender, EventArgs e) - { - if(presetUpdating) return; - ApplyFlagsToPreset(udmfactivates); - RaiseEvent(); - } - - private void lineColor_ColorChanged(object sender, EventArgs e) - { - if(presetUpdating) return; - preset.Color = lineColor.Color; - RaiseEvent(); - } - - private void flags_ItemCheck(object sender, ItemCheckEventArgs e) - { - if(presetUpdating) return; - switch (e.CurrentValue) - { - case CheckState.Checked: - e.NewValue = CheckState.Indeterminate; - break; - case CheckState.Indeterminate: - e.NewValue = CheckState.Unchecked; - break; - default: - e.NewValue = CheckState.Checked; - break; - } - } - - //mxd. Because anchor-based alignment fails when using high-Dpi settings... - private void CustomLinedefColorProperties_Resize(object sender, EventArgs e) - { - gbLineColor.Width = this.Width - gbLineColor.Margin.Left - gbLineColor.Margin.Right; - tcLineSettings.Width = gbLineColor.Width; - tcLineSettings.Height = this.Height - tcLineSettings.Margin.Bottom - tcLineSettings.Top; - } - } -} diff --git a/Source/Core/GZBuilder/Controls/CustomLinedefColorProperties.designer.cs b/Source/Core/GZBuilder/Controls/CustomLinedefColorProperties.designer.cs deleted file mode 100644 index 1d0c24ff278d21d53f342c69012daa1eed637885..0000000000000000000000000000000000000000 --- a/Source/Core/GZBuilder/Controls/CustomLinedefColorProperties.designer.cs +++ /dev/null @@ -1,266 +0,0 @@ -namespace CodeImp.DoomBuilder.GZBuilder.Controls -{ - partial class CustomLinedefColorProperties - { - /// <summary> - /// Required designer variable. - /// </summary> - private System.ComponentModel.IContainer components = null; - - /// <summary> - /// Clean up any resources being used. - /// </summary> - /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> - protected override void Dispose(bool disposing) - { - if(disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Component Designer generated code - - /// <summary> - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// </summary> - private void InitializeComponent() - { - this.gbLineColor = new System.Windows.Forms.GroupBox(); - this.labelErrors = new System.Windows.Forms.Label(); - this.tcLineSettings = new System.Windows.Forms.TabControl(); - this.tabFlags = new System.Windows.Forms.TabPage(); - this.flags = new System.Windows.Forms.CheckedListBox(); - this.cbUseFlags = new System.Windows.Forms.CheckBox(); - this.tabAction = new System.Windows.Forms.TabPage(); - this.cbUseAction = new System.Windows.Forms.CheckBox(); - this.tabActivation = new System.Windows.Forms.TabPage(); - this.activation = new System.Windows.Forms.ComboBox(); - this.cbUseActivation = new System.Windows.Forms.CheckBox(); - this.udmfactivates = new System.Windows.Forms.CheckedListBox(); - this.lineColor = new CodeImp.DoomBuilder.Controls.ColorControl(); - this.action = new CodeImp.DoomBuilder.Controls.ActionSelectorControl(); - this.gbLineColor.SuspendLayout(); - this.tcLineSettings.SuspendLayout(); - this.tabFlags.SuspendLayout(); - this.tabAction.SuspendLayout(); - this.tabActivation.SuspendLayout(); - this.SuspendLayout(); - // - // gbLineColor - // - this.gbLineColor.Controls.Add(this.labelErrors); - this.gbLineColor.Controls.Add(this.lineColor); - this.gbLineColor.Location = new System.Drawing.Point(3, 3); - this.gbLineColor.Name = "gbLineColor"; - this.gbLineColor.Size = new System.Drawing.Size(329, 42); - this.gbLineColor.TabIndex = 13; - this.gbLineColor.TabStop = false; - // - // labelErrors - // - this.labelErrors.Font = new System.Drawing.Font("Microsoft Sans Serif", 6.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); - this.labelErrors.ForeColor = System.Drawing.Color.Maroon; - this.labelErrors.Location = new System.Drawing.Point(145, 10); - this.labelErrors.Name = "labelErrors"; - this.labelErrors.Size = new System.Drawing.Size(178, 30); - this.labelErrors.TabIndex = 1; - this.labelErrors.Text = "Teh Error occured!"; - this.labelErrors.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // tcLineSettings - // - this.tcLineSettings.Controls.Add(this.tabFlags); - this.tcLineSettings.Controls.Add(this.tabAction); - this.tcLineSettings.Controls.Add(this.tabActivation); - this.tcLineSettings.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204))); - this.tcLineSettings.Location = new System.Drawing.Point(3, 50); - this.tcLineSettings.Name = "tcLineSettings"; - this.tcLineSettings.Padding = new System.Drawing.Point(24, 3); - this.tcLineSettings.SelectedIndex = 0; - this.tcLineSettings.Size = new System.Drawing.Size(329, 264); - this.tcLineSettings.TabIndex = 12; - // - // tabFlags - // - this.tabFlags.Controls.Add(this.flags); - this.tabFlags.Controls.Add(this.cbUseFlags); - this.tabFlags.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); - this.tabFlags.Location = new System.Drawing.Point(4, 22); - this.tabFlags.Name = "tabFlags"; - this.tabFlags.Padding = new System.Windows.Forms.Padding(3); - this.tabFlags.Size = new System.Drawing.Size(321, 238); - this.tabFlags.TabIndex = 0; - this.tabFlags.Text = "Flags"; - this.tabFlags.UseVisualStyleBackColor = true; - // - // flags - // - this.flags.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.flags.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.flags.CheckOnClick = true; - this.flags.FormattingEnabled = true; - this.flags.Location = new System.Drawing.Point(6, 30); - this.flags.Name = "flags"; - this.flags.Size = new System.Drawing.Size(309, 197); - this.flags.TabIndex = 5; - this.flags.ItemCheck += new System.Windows.Forms.ItemCheckEventHandler(this.flags_ItemCheck); - this.flags.SelectedValueChanged += new System.EventHandler(this.flags_SelectedValueChanged); - // - // cbUseFlags - // - this.cbUseFlags.AutoSize = true; - this.cbUseFlags.Location = new System.Drawing.Point(6, 6); - this.cbUseFlags.Name = "cbUseFlags"; - this.cbUseFlags.Size = new System.Drawing.Size(70, 17); - this.cbUseFlags.TabIndex = 4; - this.cbUseFlags.Text = "Use flags"; - this.cbUseFlags.UseVisualStyleBackColor = true; - this.cbUseFlags.CheckedChanged += new System.EventHandler(this.cbUseFlags_CheckedChanged); - // - // tabAction - // - this.tabAction.Controls.Add(this.action); - this.tabAction.Controls.Add(this.cbUseAction); - this.tabAction.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); - this.tabAction.Location = new System.Drawing.Point(4, 22); - this.tabAction.Name = "tabAction"; - this.tabAction.Padding = new System.Windows.Forms.Padding(3); - this.tabAction.Size = new System.Drawing.Size(321, 238); - this.tabAction.TabIndex = 1; - this.tabAction.Text = "Action"; - this.tabAction.UseVisualStyleBackColor = true; - // - // cbUseAction - // - this.cbUseAction.AutoSize = true; - this.cbUseAction.Location = new System.Drawing.Point(6, 6); - this.cbUseAction.Name = "cbUseAction"; - this.cbUseAction.Size = new System.Drawing.Size(78, 17); - this.cbUseAction.TabIndex = 4; - this.cbUseAction.Text = "Use Action"; - this.cbUseAction.UseVisualStyleBackColor = true; - this.cbUseAction.CheckedChanged += new System.EventHandler(this.cbUseAction_CheckedChanged); - // - // tabActivation - // - this.tabActivation.Controls.Add(this.activation); - this.tabActivation.Controls.Add(this.cbUseActivation); - this.tabActivation.Controls.Add(this.udmfactivates); - this.tabActivation.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); - this.tabActivation.Location = new System.Drawing.Point(4, 22); - this.tabActivation.Name = "tabActivation"; - this.tabActivation.Size = new System.Drawing.Size(321, 238); - this.tabActivation.TabIndex = 2; - this.tabActivation.Text = "Activation type"; - this.tabActivation.UseVisualStyleBackColor = true; - // - // activation - // - this.activation.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.activation.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.activation.FormattingEnabled = true; - this.activation.Location = new System.Drawing.Point(3, 30); - this.activation.Name = "activation"; - this.activation.Size = new System.Drawing.Size(315, 21); - this.activation.TabIndex = 0; - this.activation.SelectedIndexChanged += new System.EventHandler(this.activation_SelectedIndexChanged); - // - // cbUseActivation - // - this.cbUseActivation.AutoSize = true; - this.cbUseActivation.Location = new System.Drawing.Point(6, 6); - this.cbUseActivation.Name = "cbUseActivation"; - this.cbUseActivation.Size = new System.Drawing.Size(94, 17); - this.cbUseActivation.TabIndex = 4; - this.cbUseActivation.Text = "Use activation"; - this.cbUseActivation.UseVisualStyleBackColor = true; - this.cbUseActivation.CheckedChanged += new System.EventHandler(this.cbUseActivation_CheckedChanged); - // - // udmfactivates - // - this.udmfactivates.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.udmfactivates.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.udmfactivates.CheckOnClick = true; - this.udmfactivates.FormattingEnabled = true; - this.udmfactivates.Location = new System.Drawing.Point(3, 30); - this.udmfactivates.Name = "udmfactivates"; - this.udmfactivates.Size = new System.Drawing.Size(315, 197); - this.udmfactivates.TabIndex = 6; - this.udmfactivates.ItemCheck += new System.Windows.Forms.ItemCheckEventHandler(this.flags_ItemCheck); - this.udmfactivates.SelectedValueChanged += new System.EventHandler(this.udmfactivates_SelectedValueChanged); - // - // lineColor - // - this.lineColor.BackColor = System.Drawing.Color.Transparent; - this.lineColor.Label = "Linedef color:"; - this.lineColor.Location = new System.Drawing.Point(6, 13); - this.lineColor.MaximumSize = new System.Drawing.Size(10000, 23); - this.lineColor.MinimumSize = new System.Drawing.Size(100, 23); - this.lineColor.Name = "lineColor"; - this.lineColor.Size = new System.Drawing.Size(132, 23); - this.lineColor.TabIndex = 0; - this.lineColor.ColorChanged += new System.EventHandler(this.lineColor_ColorChanged); - // - // action - // - this.action.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.action.BackColor = System.Drawing.Color.Transparent; - this.action.Cursor = System.Windows.Forms.Cursors.Default; - this.action.Empty = false; - this.action.GeneralizedCategories = null; - this.action.GeneralizedOptions = null; - this.action.Location = new System.Drawing.Point(6, 30); - this.action.Name = "action"; - this.action.Size = new System.Drawing.Size(309, 21); - this.action.TabIndex = 6; - this.action.Value = 0; - this.action.ValueChanges += new System.EventHandler(this.action_ValueChanges); - // - // CustomLinedefColorProperties - // - this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; - this.Controls.Add(this.gbLineColor); - this.Controls.Add(this.tcLineSettings); - this.Name = "CustomLinedefColorProperties"; - this.Size = new System.Drawing.Size(337, 319); - this.Resize += new System.EventHandler(this.CustomLinedefColorProperties_Resize); - this.gbLineColor.ResumeLayout(false); - this.tcLineSettings.ResumeLayout(false); - this.tabFlags.ResumeLayout(false); - this.tabFlags.PerformLayout(); - this.tabAction.ResumeLayout(false); - this.tabAction.PerformLayout(); - this.tabActivation.ResumeLayout(false); - this.tabActivation.PerformLayout(); - this.ResumeLayout(false); - - } - - #endregion - - private System.Windows.Forms.GroupBox gbLineColor; - private System.Windows.Forms.Label labelErrors; - private CodeImp.DoomBuilder.Controls.ColorControl lineColor; - private System.Windows.Forms.TabControl tcLineSettings; - private System.Windows.Forms.TabPage tabFlags; - private System.Windows.Forms.CheckedListBox flags; - private System.Windows.Forms.CheckBox cbUseFlags; - private System.Windows.Forms.TabPage tabAction; - private System.Windows.Forms.CheckBox cbUseAction; - private System.Windows.Forms.TabPage tabActivation; - private System.Windows.Forms.ComboBox activation; - private System.Windows.Forms.CheckBox cbUseActivation; - private System.Windows.Forms.CheckedListBox udmfactivates; - private CodeImp.DoomBuilder.Controls.ActionSelectorControl action; - } -} diff --git a/Source/Core/GZBuilder/Controls/CustomLinedefColorsControl.cs b/Source/Core/GZBuilder/Controls/CustomLinedefColorsControl.cs deleted file mode 100644 index cf3b3329f886de2841f12cab91d028ac59b757c2..0000000000000000000000000000000000000000 --- a/Source/Core/GZBuilder/Controls/CustomLinedefColorsControl.cs +++ /dev/null @@ -1,267 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Drawing; -using System.Windows.Forms; -using CodeImp.DoomBuilder.GZBuilder.Data; -using CodeImp.DoomBuilder.Config; - -namespace CodeImp.DoomBuilder.GZBuilder.Controls -{ - public partial class CustomLinedefColorsControl : UserControl - { - public event EventHandler PresetsChanged; - - private const string DEFAULT_PRESET_NAME = "Enter preset name"; - private const string NO_PRESET_NAME = "ENTER PRESET NAME!"; - - public CustomLinedefColorsControl() - { - InitializeComponent(); - - colorProperties.PresetChanged += colorProperties_PresetChanged; - //disable controls - gbPresets.Enabled = false; - } - - public void Setup(GameConfiguration config, ConfigurationInfo configInfo) - { - colorProperties.Setup(config); - lbColorPresets.Items.Clear(); - - if(configInfo.LinedefColorPresets.Length > 0) - { - //validate - for(int i = 0; i < configInfo.LinedefColorPresets.Length; i++) - { - ValidatePreset(configInfo.LinedefColorPresets[i]); - CheckDuplicates(configInfo.LinedefColorPresets[i]); - } - - lbColorPresets.Items.AddRange(configInfo.LinedefColorPresets); - lbColorPresets.SelectedIndex = 0; - } - - UpdatePresetListControls(); - gbPresets.Enabled = true; - } - - public LinedefColorPreset[] GetPresets() - { - List<LinedefColorPreset> presets = new List<LinedefColorPreset>(); - - foreach(LinedefColorPreset preset in lbColorPresets.Items) - if(preset.Valid) presets.Add(preset); - - return presets.ToArray(); - } - - private void ValidatePreset(LinedefColorPreset preset) - { - bool hasAction = preset.Action != 0; - bool hasFlags = preset.Flags.Count > 0 || preset.RestrictedFlags.Count > 0; - bool hasActivation = preset.Activation != 0; - - //validate - if(!hasAction && !hasFlags && !hasActivation) - { - if(colorProperties.UDMF) - preset.SetInvalid("Invalid preset: no flags, action or activation type selected!"); - else - preset.SetInvalid("Invalid preset: no flags or action selected!"); - return; - } - - preset.SetValid(); - } - - private bool ValidatePresetName() - { - if(string.IsNullOrEmpty(tbNewPresetName.Text) || tbNewPresetName.Text == DEFAULT_PRESET_NAME || tbNewPresetName.Text == NO_PRESET_NAME) - { - tbNewPresetName.ForeColor = Color.DarkRed; - tbNewPresetName.Text = string.IsNullOrEmpty(tbNewPresetName.Text) ? DEFAULT_PRESET_NAME : NO_PRESET_NAME; - return false; - } - - foreach(LinedefColorPreset preset in lbColorPresets.Items) - { - if(preset.Name.ToLowerInvariant() == tbNewPresetName.Text.ToLowerInvariant()) - { - General.ShowWarningMessage("Preset with this name already exists!", MessageBoxButtons.OK); - return false; - } - } - - tbNewPresetName.ForeColor = Color.Black; - return true; - } - - private void CheckDuplicates(LinedefColorPreset preset) - { - foreach(LinedefColorPreset p in lbColorPresets.Items) - { - if(preset.Name == p.Name) continue; - if(p.Action != preset.Action) continue; - if(p.Activation != preset.Activation) continue; - if(p.Flags.Count != preset.Flags.Count) continue; - if(p.RestrictedFlags.Count != preset.RestrictedFlags.Count) continue; - - bool gotMismatch = false; - foreach(string flag in p.Flags) - { - if(!preset.Flags.Contains(flag)) - { - gotMismatch = true; - break; - } - } - - foreach(string flag in p.RestrictedFlags) - { - if(!preset.RestrictedFlags.Contains(flag)) - { - gotMismatch = true; - break; - } - } - - if(gotMismatch) continue; - - //we have a match - preset.WarningDescription = "Preset matches '" + p.Name + "'"; - return; - } - } - - private void UpdatePresetListControls() - { - int c = lbColorPresets.Items.Count; - - bRemovePreset.Enabled = c > 0; - colorProperties.Enabled = c > 0; - - if(c < 2) - { - bMoveDown.Enabled = false; - bMoveUp.Enabled = false; - } - else - { - bMoveDown.Enabled = lbColorPresets.SelectedIndex < c - 1; - bMoveUp.Enabled = lbColorPresets.SelectedIndex > 0; - } - } - -//EVENTS - private void bMoveDown_Click(object sender, EventArgs e) - { - if(lbColorPresets.SelectedIndex == -1) return; - - //I like to move it, move it! - LinedefColorPreset preset = (LinedefColorPreset)lbColorPresets.SelectedItem; - lbColorPresets.Items[lbColorPresets.SelectedIndex] = lbColorPresets.Items[lbColorPresets.SelectedIndex + 1]; - lbColorPresets.Items[lbColorPresets.SelectedIndex + 1] = preset; - - lbColorPresets.SelectedIndex++; - - if(PresetsChanged != null) PresetsChanged(this, EventArgs.Empty); - } - - private void bMoveUp_Click(object sender, EventArgs e) - { - if(lbColorPresets.SelectedIndex == -1) return; - - LinedefColorPreset preset = (LinedefColorPreset)lbColorPresets.SelectedItem; - lbColorPresets.Items[lbColorPresets.SelectedIndex] = lbColorPresets.Items[lbColorPresets.SelectedIndex - 1]; - lbColorPresets.Items[lbColorPresets.SelectedIndex - 1] = preset; - - lbColorPresets.SelectedIndex--; - - if(PresetsChanged != null) PresetsChanged(this, EventArgs.Empty); - } - - private void bAddPreset_Click(object sender, EventArgs e) - { - if(!ValidatePresetName()) return; - - //add new item - lbColorPresets.Items.Insert(0, new LinedefColorPreset(tbNewPresetName.Text, colorProperties.DefaultColor)); - tbNewPresetName.Text = ""; - - //(re)select added preset - if(lbColorPresets.SelectedIndex != 0) - lbColorPresets.SelectedIndex = 0; - else - lbColorPresets_SelectedIndexChanged(this, EventArgs.Empty); - - UpdatePresetListControls(); - - if(PresetsChanged != null) PresetsChanged(this, EventArgs.Empty); - } - - private void bRemovePreset_Click(object sender, EventArgs e) - { - if(lbColorPresets.Items.Count == 0 || lbColorPresets.SelectedIndex == -1) return; //sanity check - - //remove item - int index = lbColorPresets.SelectedIndex; - lbColorPresets.Items.RemoveAt(index); - lbColorPresets.SelectedIndex = (index >= lbColorPresets.Items.Count ? lbColorPresets.Items.Count - 1 : index); - - UpdatePresetListControls(); - - if(PresetsChanged != null) PresetsChanged(this, EventArgs.Empty); - } - - private void lbColorPresets_SelectedIndexChanged(object sender, EventArgs e) - { - if(lbColorPresets.SelectedIndex == -1) - { - colorProperties.Enabled = false; - return; - } - - colorProperties.SetPreset((LinedefColorPreset)lbColorPresets.SelectedItem); - UpdatePresetListControls(); - } - - private void colorProperties_PresetChanged(object sender, EventArgs e) - { - LinedefColorPreset preset = (LinedefColorPreset)lbColorPresets.SelectedItem; - preset.SetValid(); //clear error/warning messages - ValidatePreset(preset); //validate it - CheckDuplicates(preset); - colorProperties.UpdateMessages(); //update error/warning messages - lbColorPresets.Invalidate(); //redraw icons - - if(PresetsChanged != null) PresetsChanged(this, EventArgs.Empty); - } - - private void tbNewPresetName_Click(object sender, EventArgs e) - { - if(tbNewPresetName.Text == DEFAULT_PRESET_NAME || tbNewPresetName.Text == NO_PRESET_NAME) - { - tbNewPresetName.Text = ""; - tbNewPresetName.ForeColor = Color.Black; - } - } - - private void tbNewPresetName_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e) - { - if(e.KeyCode == Keys.Enter) - { - bAddPreset_Click(this, EventArgs.Empty); - e.IsInputKey = true; - } - } - - //mxd. Because anchor-based alignment fails when using high-Dpi settings... - private void CustomLinedefColorsControl_Resize(object sender, EventArgs e) - { - gbPresets.Height = this.Height - gbPresets.Top - gbPresets.Margin.Bottom; - lbColorPresets.Height = gbPresets.Height - lbColorPresets.Top - lbColorPresets.Margin.Bottom; - colorProperties.Height = gbPresets.Height; - colorProperties.Width = this.Width - colorProperties.Left - colorProperties.Margin.Right; - } - } -} diff --git a/Source/Core/GZBuilder/Controls/CustomLinedefColorsControl.designer.cs b/Source/Core/GZBuilder/Controls/CustomLinedefColorsControl.designer.cs deleted file mode 100644 index 2c1a651dae2a9bddbfa6889600c6d64ad63cfd4a..0000000000000000000000000000000000000000 --- a/Source/Core/GZBuilder/Controls/CustomLinedefColorsControl.designer.cs +++ /dev/null @@ -1,161 +0,0 @@ -namespace CodeImp.DoomBuilder.GZBuilder.Controls -{ - partial class CustomLinedefColorsControl - { - /// <summary> - /// Required designer variable. - /// </summary> - private System.ComponentModel.IContainer components = null; - - /// <summary> - /// Clean up any resources being used. - /// </summary> - /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> - protected override void Dispose(bool disposing) - { - if(disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Component Designer generated code - - /// <summary> - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// </summary> - private void InitializeComponent() - { - this.gbPresets = new System.Windows.Forms.GroupBox(); - this.bMoveUp = new System.Windows.Forms.Button(); - this.bMoveDown = new System.Windows.Forms.Button(); - this.bRemovePreset = new System.Windows.Forms.Button(); - this.tbNewPresetName = new System.Windows.Forms.TextBox(); - this.bAddPreset = new System.Windows.Forms.Button(); - this.colorProperties = new CodeImp.DoomBuilder.GZBuilder.Controls.CustomLinedefColorProperties(); - this.lbColorPresets = new CodeImp.DoomBuilder.GZBuilder.Controls.IconListBox(); - this.gbPresets.SuspendLayout(); - this.SuspendLayout(); - // - // gbPresets - // - this.gbPresets.Controls.Add(this.bMoveUp); - this.gbPresets.Controls.Add(this.bMoveDown); - this.gbPresets.Controls.Add(this.bRemovePreset); - this.gbPresets.Controls.Add(this.lbColorPresets); - this.gbPresets.Controls.Add(this.tbNewPresetName); - this.gbPresets.Controls.Add(this.bAddPreset); - this.gbPresets.Location = new System.Drawing.Point(3, 3); - this.gbPresets.Name = "gbPresets"; - this.gbPresets.Size = new System.Drawing.Size(145, 268); - this.gbPresets.TabIndex = 2; - this.gbPresets.TabStop = false; - this.gbPresets.Text = "Presets:"; - // - // bMoveUp - // - this.bMoveUp.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.bMoveUp.Image = global::CodeImp.DoomBuilder.Properties.Resources.ArrowUp; - this.bMoveUp.Location = new System.Drawing.Point(102, 44); - this.bMoveUp.Name = "bMoveUp"; - this.bMoveUp.Size = new System.Drawing.Size(18, 23); - this.bMoveUp.TabIndex = 7; - this.bMoveUp.UseVisualStyleBackColor = true; - this.bMoveUp.Click += new System.EventHandler(this.bMoveUp_Click); - // - // bMoveDown - // - this.bMoveDown.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.bMoveDown.Image = global::CodeImp.DoomBuilder.Properties.Resources.ArrowDown; - this.bMoveDown.Location = new System.Drawing.Point(121, 44); - this.bMoveDown.Name = "bMoveDown"; - this.bMoveDown.Size = new System.Drawing.Size(18, 23); - this.bMoveDown.TabIndex = 6; - this.bMoveDown.UseVisualStyleBackColor = true; - this.bMoveDown.Click += new System.EventHandler(this.bMoveDown_Click); - // - // bRemovePreset - // - this.bRemovePreset.Image = global::CodeImp.DoomBuilder.Properties.Resources.SearchClear; - this.bRemovePreset.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; - this.bRemovePreset.Location = new System.Drawing.Point(54, 44); - this.bRemovePreset.Name = "bRemovePreset"; - this.bRemovePreset.Size = new System.Drawing.Size(47, 23); - this.bRemovePreset.TabIndex = 5; - this.bRemovePreset.Text = "Del."; - this.bRemovePreset.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - this.bRemovePreset.UseVisualStyleBackColor = true; - this.bRemovePreset.Click += new System.EventHandler(this.bRemovePreset_Click); - // - // tbNewPresetName - // - this.tbNewPresetName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.tbNewPresetName.ForeColor = System.Drawing.Color.DarkRed; - this.tbNewPresetName.Location = new System.Drawing.Point(6, 21); - this.tbNewPresetName.Name = "tbNewPresetName"; - this.tbNewPresetName.Size = new System.Drawing.Size(133, 20); - this.tbNewPresetName.TabIndex = 3; - this.tbNewPresetName.Text = "Enter preset name"; - this.tbNewPresetName.PreviewKeyDown += new System.Windows.Forms.PreviewKeyDownEventHandler(this.tbNewPresetName_PreviewKeyDown); - this.tbNewPresetName.Click += new System.EventHandler(this.tbNewPresetName_Click); - // - // bAddPreset - // - this.bAddPreset.Image = global::CodeImp.DoomBuilder.Properties.Resources.Add; - this.bAddPreset.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; - this.bAddPreset.Location = new System.Drawing.Point(6, 44); - this.bAddPreset.Name = "bAddPreset"; - this.bAddPreset.Size = new System.Drawing.Size(47, 23); - this.bAddPreset.TabIndex = 1; - this.bAddPreset.Text = "Add"; - this.bAddPreset.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - this.bAddPreset.UseVisualStyleBackColor = true; - this.bAddPreset.Click += new System.EventHandler(this.bAddPreset_Click); - // - // colorProperties - // - this.colorProperties.Enabled = false; - this.colorProperties.Location = new System.Drawing.Point(154, 3); - this.colorProperties.Name = "colorProperties"; - this.colorProperties.Size = new System.Drawing.Size(268, 268); - this.colorProperties.TabIndex = 3; - // - // lbColorPresets - // - this.lbColorPresets.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawVariable; - this.lbColorPresets.Location = new System.Drawing.Point(6, 73); - this.lbColorPresets.Name = "lbColorPresets"; - this.lbColorPresets.Size = new System.Drawing.Size(133, 186); - this.lbColorPresets.TabIndex = 4; - this.lbColorPresets.SelectedIndexChanged += new System.EventHandler(this.lbColorPresets_SelectedIndexChanged); - // - // CustomLinedefColorsControl - // - this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; - this.Controls.Add(this.colorProperties); - this.Controls.Add(this.gbPresets); - this.Name = "CustomLinedefColorsControl"; - this.Size = new System.Drawing.Size(427, 276); - this.Resize += new System.EventHandler(this.CustomLinedefColorsControl_Resize); - this.gbPresets.ResumeLayout(false); - this.gbPresets.PerformLayout(); - this.ResumeLayout(false); - - } - - #endregion - - private System.Windows.Forms.GroupBox gbPresets; - private System.Windows.Forms.Button bRemovePreset; - private IconListBox lbColorPresets; - private System.Windows.Forms.TextBox tbNewPresetName; - private System.Windows.Forms.Button bAddPreset; - private System.Windows.Forms.Button bMoveDown; - private System.Windows.Forms.Button bMoveUp; - private CustomLinedefColorProperties colorProperties; - } -} diff --git a/Source/Core/GZBuilder/Controls/CustomLinedefColorsControl.resx b/Source/Core/GZBuilder/Controls/CustomLinedefColorsControl.resx deleted file mode 100644 index ff31a6db56e23b5a334f34387830ba5b4bd33eb8..0000000000000000000000000000000000000000 --- a/Source/Core/GZBuilder/Controls/CustomLinedefColorsControl.resx +++ /dev/null @@ -1,120 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<root> - <!-- - Microsoft ResX Schema - - Version 2.0 - - The primary goals of this format is to allow a simple XML format - that is mostly human readable. The generation and parsing of the - various data types are done through the TypeConverter classes - associated with the data types. - - Example: - - ... ado.net/XML headers & schema ... - <resheader name="resmimetype">text/microsoft-resx</resheader> - <resheader name="version">2.0</resheader> - <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> - <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> - <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> - <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> - <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> - <value>[base64 mime encoded serialized .NET Framework object]</value> - </data> - <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> - <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> - <comment>This is a comment</comment> - </data> - - There are any number of "resheader" rows that contain simple - name/value pairs. - - Each data row contains a name, and value. The row also contains a - type or mimetype. Type corresponds to a .NET class that support - text/value conversion through the TypeConverter architecture. - Classes that don't support this are serialized and stored with the - mimetype set. - - The mimetype is used for serialized objects, and tells the - ResXResourceReader how to depersist the object. This is currently not - extensible. For a given mimetype the value must be set accordingly: - - Note - application/x-microsoft.net.object.binary.base64 is the format - that the ResXResourceWriter will generate, however the reader can - read any of the formats listed below. - - mimetype: application/x-microsoft.net.object.binary.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.soap.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Soap.SoapFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.bytearray.base64 - value : The object must be serialized into a byte array - : using a System.ComponentModel.TypeConverter - : and then encoded with base64 encoding. - --> - <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> - <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> - <xsd:element name="root" msdata:IsDataSet="true"> - <xsd:complexType> - <xsd:choice maxOccurs="unbounded"> - <xsd:element name="metadata"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" /> - </xsd:sequence> - <xsd:attribute name="name" use="required" type="xsd:string" /> - <xsd:attribute name="type" type="xsd:string" /> - <xsd:attribute name="mimetype" type="xsd:string" /> - <xsd:attribute ref="xml:space" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="assembly"> - <xsd:complexType> - <xsd:attribute name="alias" type="xsd:string" /> - <xsd:attribute name="name" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="data"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> - <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> - <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> - <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> - <xsd:attribute ref="xml:space" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="resheader"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" /> - </xsd:complexType> - </xsd:element> - </xsd:choice> - </xsd:complexType> - </xsd:element> - </xsd:schema> - <resheader name="resmimetype"> - <value>text/microsoft-resx</value> - </resheader> - <resheader name="version"> - <value>2.0</value> - </resheader> - <resheader name="reader"> - <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> - <resheader name="writer"> - <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> -</root> \ No newline at end of file diff --git a/Source/Core/GZBuilder/Controls/IconListBox.cs b/Source/Core/GZBuilder/Controls/IconListBox.cs deleted file mode 100644 index 2abd152710259a510114ae2133f46e590e78bf23..0000000000000000000000000000000000000000 --- a/Source/Core/GZBuilder/Controls/IconListBox.cs +++ /dev/null @@ -1,43 +0,0 @@ -using System; -using System.Windows.Forms; -using System.Drawing; -using CodeImp.DoomBuilder.GZBuilder.Data; - -namespace CodeImp.DoomBuilder.GZBuilder.Controls -{ - internal class IconListBox : ListBox - { - public IconListBox() - { - this.DrawMode = DrawMode.OwnerDrawVariable; - } - - protected override void OnMeasureItem(MeasureItemEventArgs e) - { - e.ItemHeight = (int)Math.Ceiling(this.Font.Height * (e.Graphics.DpiY / 96.0f)); - } - - protected override void OnDrawItem(DrawItemEventArgs e) - { - if(Items.Count == 0) return; //sanity check - - e.DrawBackground(); - e.DrawFocusRectangle(); - - LinedefColorPreset preset = (LinedefColorPreset)Items[e.Index]; - - //draw color rectangle - using(SolidBrush bg = new SolidBrush(preset.Color.ToColor())) - { - e.Graphics.FillRectangle(bg, 2, e.Bounds.Top + 2, e.Bounds.Height, e.Bounds.Height - 5); - } - using (Pen outline = new Pen(Color.Black)) - { - e.Graphics.DrawRectangle(outline, 2, e.Bounds.Top + 2, e.Bounds.Height, e.Bounds.Height - 5); - } - - //draw text - e.Graphics.DrawString(preset.ToString(), e.Font, new SolidBrush(e.ForeColor), e.Bounds.Left + e.Bounds.Height + 4, e.Bounds.Top); - } - } -} diff --git a/Source/Core/GZBuilder/Data/LinedefColorPreset.cs b/Source/Core/GZBuilder/Data/LinedefColorPreset.cs index 84ba0b03ae9982293a11b9c96d720864822a7206..e077fb40f794f07be686493d989aad1d0f7d48a0 100644 --- a/Source/Core/GZBuilder/Data/LinedefColorPreset.cs +++ b/Source/Core/GZBuilder/Data/LinedefColorPreset.cs @@ -1,116 +1,101 @@ -using System.Collections.Generic; -using CodeImp.DoomBuilder.Rendering; +#region ================== Namespaces + +using System.Collections.Generic; using CodeImp.DoomBuilder.Map; +using CodeImp.DoomBuilder.Rendering; + +#endregion namespace CodeImp.DoomBuilder.GZBuilder.Data { public class LinedefColorPreset { - public bool Valid { get { return valid; } } - private bool valid; - - public string ErrorDescription { get { return errorDescription; } } - private string errorDescription; - public string WarningDescription; + #region ================== Properties public string Name; public PixelColor Color; + public bool Enabled; public int Action; public int Activation; //Hexen activation type - public List<string> Flags; - public List<string> RestrictedFlags; - private const string NOT_VALID = "invalid"; - private const string DUPLICATE = "duplicate"; + public readonly List<string> Flags; + public readonly List<string> RestrictedFlags; - public LinedefColorPreset(string name, PixelColor lineColor) + #endregion + + #region ================== Constructors + + public LinedefColorPreset(string name, PixelColor linecolor) { Name = name; - Color = lineColor; + Color = linecolor; Flags = new List<string>(); RestrictedFlags = new List<string>(); + Enabled = true; } - public LinedefColorPreset(string name, PixelColor lineColor, int action, int activation, List<string> flags, List<string> restrictedFlags) + public LinedefColorPreset(string name, PixelColor linecolor, int action, int activation, List<string> flags, List<string> restrictedFlags, bool enabled) { Name = name; - Color = lineColor; + Color = linecolor; Action = action; Activation = activation; Flags = flags; RestrictedFlags = restrictedFlags; + Enabled = enabled; } - public LinedefColorPreset(LinedefColorPreset copyFrom) + public LinedefColorPreset(LinedefColorPreset other) { - Name = copyFrom.Name; - Color = copyFrom.Color; - Action = copyFrom.Action; - Activation = copyFrom.Activation; + Name = other.Name; + Color = other.Color; + Action = other.Action; + Activation = other.Activation; + Enabled = other.Enabled; + Flags = new List<string>(other.Flags); + RestrictedFlags = new List<string>(other.RestrictedFlags); + } - Flags = new List<string>(); - Flags.AddRange(copyFrom.Flags); + #endregion - RestrictedFlags = new List<string>(); - RestrictedFlags.AddRange(copyFrom.RestrictedFlags); - } + #region ================== Methods - public bool Matches(Linedef l) + public bool Matches(Linedef l) { - //check action; -1 means Any Action + if(!Enabled) return false; + + // Check action; -1 means Any Action if(Action != 0) { if((Action == -1 && l.Action == 0) || (Action != -1 && l.Action != Action)) return false; } - //check activation; -1 means Any Activation + // Check activation; -1 means Any Activation if(Activation != 0) { if(!General.Map.UDMF && (l.Activate != Activation || (Activation == -1 && l.Activate == 0))) return false; } - //check flags - if(Flags.Count > 0) - { - foreach(string s in Flags) - { - if(!l.IsFlagSet(s)) return false; - } - } + // Check flags + if(Flags.Count > 0) foreach(string s in Flags) if(!l.IsFlagSet(s)) return false; - //check flags, which should be disabled - if(RestrictedFlags.Count > 0) - { - foreach(string s in RestrictedFlags) - { - if(l.IsFlagSet(s)) return false; - } - } + // Check flags, which should be disabled + if(RestrictedFlags.Count > 0) foreach(string s in RestrictedFlags) if(l.IsFlagSet(s)) return false; return true; } - public void SetValid() + public bool IsValid() { - valid = true; - errorDescription = ""; - WarningDescription = ""; - } - - public void SetInvalid(string reason) - { - valid = false; - errorDescription = reason; + return Action != 0 || Flags.Count > 0 || RestrictedFlags.Count > 0 || Activation != 0; } public override string ToString() { - List<string> rest = new List<string>(); - if(!valid) rest.Add(NOT_VALID); - if(!string.IsNullOrEmpty(WarningDescription)) rest.Add(DUPLICATE); - if(rest.Count > 0) return Name + " (" + string.Join(", ", rest.ToArray()) + ")"; return Name; } + + #endregion } } diff --git a/Source/Core/General/General.cs b/Source/Core/General/General.cs index 906d7879e922ea01eaa65dd3dae78b131c82b3ca..36d2eadffd5993829b408c2b56a20395e45346e6 100644 --- a/Source/Core/General/General.cs +++ b/Source/Core/General/General.cs @@ -1125,6 +1125,7 @@ namespace CodeImp.DoomBuilder mainwindow.SetupInterface(); mainwindow.RedrawDisplay(); mainwindow.UpdateThingsFilters(); + mainwindow.UpdateLinedefColorPresets(); //mxd mainwindow.UpdateInterface(); mainwindow.AddHintsDocker(); //mxd mainwindow.UpdateGZDoomPanel(); //mxd @@ -1200,6 +1201,7 @@ namespace CodeImp.DoomBuilder mainwindow.HideInfo(); mainwindow.UpdateThingsFilters(); //mxd + mainwindow.UpdateLinedefColorPresets(); mainwindow.RemoveHintsDocker(); mainwindow.UpdateGZDoomPanel(); mainwindow.UpdateInterface(); @@ -1333,6 +1335,7 @@ namespace CodeImp.DoomBuilder mainwindow.SetupInterface(); mainwindow.RedrawDisplay(); mainwindow.UpdateThingsFilters(); + mainwindow.UpdateLinedefColorPresets(); //mxd mainwindow.UpdateInterface(); mainwindow.HideInfo(); mainwindow.AddHintsDocker(); //mxd @@ -1408,6 +1411,7 @@ namespace CodeImp.DoomBuilder // All done mainwindow.SetupInterface(); mainwindow.UpdateThingsFilters(); + mainwindow.UpdateLinedefColorPresets(); //mxd mainwindow.UpdateInterface(); mainwindow.HideInfo(); mainwindow.AddHintsDocker(); //mxd diff --git a/Source/Core/General/MapManager.cs b/Source/Core/General/MapManager.cs index 230b6a01032e1cb2a3234c20211bd5d0d65aa5f0..b2a447e87cc4f83a5cce0a2f6a82bb5ed14f9559 100644 --- a/Source/Core/General/MapManager.cs +++ b/Source/Core/General/MapManager.cs @@ -95,7 +95,7 @@ namespace CodeImp.DoomBuilder #region ================== Properties public string FilePathName { get { return filepathname; } } - public string FileTitle { get { return filetitle; } } + public string FileTitle { get { return filetitle; } internal set { filetitle = value; } } //mxd. Added setter public string TempPath { get { return temppath; } } public MapOptions Options { get { return options; } } public MapSet Map { get { return map; } } @@ -246,7 +246,7 @@ namespace CodeImp.DoomBuilder #endif // Apply settings - this.filetitle = "unnamed.wad"; + this.filetitle = options.CurrentName + ".wad"; this.filepathname = ""; this.changed = false; this.options = options; @@ -1996,6 +1996,7 @@ namespace CodeImp.DoomBuilder // Update interface General.MainWindow.SetupInterface(); General.MainWindow.UpdateThingsFilters(); + General.MainWindow.UpdateLinedefColorPresets(); //mxd General.MainWindow.UpdateInterface(); // Reload resources @@ -2007,7 +2008,7 @@ namespace CodeImp.DoomBuilder grid.TranslateBackgroundName(config.UseLongTextureNames); //mxd. Sector textures may've been changed - if (nameschanged) data.UpdateUsedTextures(); + if(nameschanged) data.UpdateUsedTextures(); // Done General.MainWindow.DisplayReady(); @@ -2021,12 +2022,16 @@ namespace CodeImp.DoomBuilder // This shows the things filters setup [BeginAction("thingsfilterssetup")] internal void ShowThingsFiltersSetup() + { + new ThingsFiltersForm().ShowDialog(General.MainWindow); + } + + //mxd. This shows the linedef color presets window + [BeginAction("linedefcolorssetup")] + internal void ShowLinedefColorsSetup() { // Show things filter dialog - ThingsFiltersForm f = new ThingsFiltersForm(); - f.ShowDialog(General.MainWindow); - f.Dispose(); - General.MainWindow.UpdateThingsFilters(); + new LinedefColorPresetsForm().ShowDialog(General.MainWindow); } // This returns true is the given type matches diff --git a/Source/Core/Properties/Resources.Designer.cs b/Source/Core/Properties/Resources.Designer.cs index 9017dd2ad2a2498f5b732c9ba115424ff7f64e27..830558d46b1d1f16c5243ff6bd8a261073af8283 100644 --- a/Source/Core/Properties/Resources.Designer.cs +++ b/Source/Core/Properties/Resources.Designer.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. -// Runtime Version:2.0.50727.5485 +// Runtime Version:2.0.50727.5420 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -403,6 +403,13 @@ namespace CodeImp.DoomBuilder.Properties { } } + internal static System.Drawing.Bitmap LinedefColorPresets { + get { + object obj = ResourceManager.GetObject("LinedefColorPresets", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + internal static System.Drawing.Bitmap Link { get { object obj = ResourceManager.GetObject("Link", resourceCulture); diff --git a/Source/Core/Properties/Resources.resx b/Source/Core/Properties/Resources.resx index 5cedaa778cd7f14cb8715620349c1901d7ae1113..7c8cf1fad2cc515670c885a0acb71724a98c7df5 100644 --- a/Source/Core/Properties/Resources.resx +++ b/Source/Core/Properties/Resources.resx @@ -118,9 +118,6 @@ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> - <data name="Zoom" type="System.Resources.ResXFileRef, System.Windows.Forms"> - <value>..\Resources\Zoom.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> - </data> <data name="Clear" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Resources\Clear.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> @@ -130,8 +127,8 @@ <data name="ArrowUp" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Resources\ArrowUp.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> - <data name="CommentQuestion" type="System.Resources.ResXFileRef, System.Windows.Forms"> - <value>..\Resources\CommentQuestion.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + <data name="ClearTextures" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Resources\ClearTextures.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> <data name="Keyboard" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Resources\Keyboard.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> @@ -160,8 +157,8 @@ <data name="Monster2" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Resources\Monster2.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> - <data name="ScriptError" type="System.Resources.ResXFileRef, System.Windows.Forms"> - <value>..\Resources\ScriptError.xpm;System.Byte[], mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + <data name="CommentQuestion" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Resources\CommentQuestion.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> <data name="ViewTextureCeiling" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Resources\ViewTextureCeiling.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> @@ -187,6 +184,9 @@ <data name="Splash3_small" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Resources\Splash3_small.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> + <data name="TagStatistics" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Resources\TagStatistics.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + </data> <data name="Screenshot" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Resources\Screenshot.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> @@ -196,14 +196,8 @@ <data name="ScriptHelp" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Resources\ScriptHelp.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> - <data name="Light_animate" type="System.Resources.ResXFileRef, System.Windows.Forms"> - <value>..\Resources\Light_animate.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> - </data> - <data name="CommentSmile" type="System.Resources.ResXFileRef, System.Windows.Forms"> - <value>..\Resources\CommentSmile.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> - </data> - <data name="KnownTextureSet" type="System.Resources.ResXFileRef, System.Windows.Forms"> - <value>..\Resources\KnownTextureSet.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + <data name="Search" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Resources\Search.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> <data name="Splash3_trans" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Resources\Splash3_trans.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> @@ -217,11 +211,11 @@ <data name="Expand" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Resources\Expand.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> - <data name="Redo" type="System.Resources.ResXFileRef, System.Windows.Forms"> - <value>..\Resources\Redo.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + <data name="Unpin" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Resources\Unpin.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> - <data name="Grid2" type="System.Resources.ResXFileRef, System.Windows.Forms"> - <value>..\Resources\Grid2.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + <data name="ViewBrightness" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Resources\ViewBrightness.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> <data name="Model" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Resources\Model.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> @@ -229,11 +223,8 @@ <data name="mergegeometry" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Resources\mergegeometry.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> - <data name="ScriptSnippet" type="System.Resources.ResXFileRef, System.Windows.Forms"> - <value>..\Resources\ScriptSnippet.xpm;System.Byte[], mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </data> - <data name="CommentProblem" type="System.Resources.ResXFileRef, System.Windows.Forms"> - <value>..\Resources\CommentProblem.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + <data name="Comment" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Resources\Comment.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> <data name="List_Images" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Resources\List_Images.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> @@ -295,9 +286,6 @@ <data name="treeview" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Resources\treeview.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> - <data name="Status1" type="System.Resources.ResXFileRef, System.Windows.Forms"> - <value>..\Resources\Status1.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> - </data> <data name="ArrowDown" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Resources\ArrowDown.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> @@ -310,14 +298,17 @@ <data name="NewMap" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Resources\NewMap2.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> + <data name="Properties" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Resources\Properties.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + </data> <data name="SearchClear" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Resources\SearchClear.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> <data name="Prefab2" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Resources\Prefab2.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> - <data name="Brightness" type="System.Resources.ResXFileRef, System.Windows.Forms"> - <value>..\Resources\Brightness.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + <data name="Grid2" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Resources\Grid2.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> <data name="WordWrap" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Resources\WordWrap.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> @@ -334,12 +325,15 @@ <data name="ErrorLarge" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Resources\ErrorLarge.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> - <data name="Lightbulb" type="System.Resources.ResXFileRef, System.Windows.Forms"> - <value>..\Resources\Lightbulb.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + <data name="ScriptError" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Resources\ScriptError.xpm;System.Byte[], mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </data> <data name="MCrash" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Resources\MCrash.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> + <data name="PuzzlePiece" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Resources\PuzzlePiece.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + </data> <data name="DockerExpand" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Resources\DockerExpand.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> @@ -355,8 +349,8 @@ <data name="ScriptCompile" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Resources\ScriptCompile.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> - <data name="PuzzlePiece" type="System.Resources.ResXFileRef, System.Windows.Forms"> - <value>..\Resources\PuzzlePiece.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + <data name="Zoom" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Resources\Zoom.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> <data name="SearchPrev" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Resources\SearchPrev.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> @@ -382,11 +376,17 @@ <data name="Status0" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Resources\Status0.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> + <data name="ScreenshotActiveWindow" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Resources\ScreenshotActiveWindow.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + </data> <data name="Script2" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Resources\Script2.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> - <data name="ClearTextures" type="System.Resources.ResXFileRef, System.Windows.Forms"> - <value>..\Resources\ClearTextures.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + <data name="Redo" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Resources\Redo.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + </data> + <data name="Status2" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Resources\Status2.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> <data name="Prefab" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Resources\Prefab.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> @@ -394,6 +394,9 @@ <data name="ImageStack" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Resources\ImageStack.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> + <data name="CommentSmile" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Resources\CommentSmile.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + </data> <data name="SearchMatch" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Resources\SearchMatch.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> @@ -403,9 +406,6 @@ <data name="Folder" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Resources\Folder.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> - <data name="GZDB2" type="System.Resources.ResXFileRef, System.Windows.Forms"> - <value>..\Resources\GZDB2.ico;System.Drawing.Icon, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> - </data> <data name="VisualVertices" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Resources\VisualVertices.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> @@ -415,32 +415,38 @@ <data name="SearchNext" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Resources\SearchNext.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> - <data name="Status2" type="System.Resources.ResXFileRef, System.Windows.Forms"> - <value>..\Resources\Status2.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> - </data> - <data name="Add" type="System.Resources.ResXFileRef, System.Windows.Forms"> - <value>..\Resources\Add.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + <data name="Light_animate" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Resources\Light_animate.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> <data name="Link" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Resources\Link.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> - <data name="TagStatistics" type="System.Resources.ResXFileRef, System.Windows.Forms"> - <value>..\Resources\TagStatistics.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + <data name="InfoPanelExpand" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Resources\InfoPanelExpand.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> - <data name="Properties" type="System.Resources.ResXFileRef, System.Windows.Forms"> - <value>..\Resources\Properties.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + <data name="Light" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Resources\Light.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> - <data name="Test" type="System.Resources.ResXFileRef, System.Windows.Forms"> - <value>..\Resources\Test.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + <data name="Brightness" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Resources\Brightness.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + </data> + <data name="ScriptSnippet" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Resources\ScriptSnippet.xpm;System.Byte[], mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </data> + <data name="Add" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Resources\Add.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> <data name="Undo" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Resources\Undo.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> - <data name="InfoPanelExpand" type="System.Resources.ResXFileRef, System.Windows.Forms"> - <value>..\Resources\InfoPanelExpand.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + <data name="CommentProblem" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Resources\CommentProblem.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> - <data name="Unpin" type="System.Resources.ResXFileRef, System.Windows.Forms"> - <value>..\Resources\Unpin.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + <data name="SlimDX_small" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Resources\SlimDX_small.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + </data> + <data name="KnownTextureSet" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Resources\KnownTextureSet.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> <data name="Angle" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Resources\Angle.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> @@ -460,9 +466,6 @@ <data name="ScriptKeyword" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Resources\ScriptKeyword.xpm;System.Byte[], mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </data> - <data name="MissingThing" type="System.Resources.ResXFileRef, System.Windows.Forms"> - <value>..\Resources\MissingThing.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> - </data> <data name="Monster3" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Resources\Monster3.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> @@ -472,11 +475,11 @@ <data name="Copy" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Resources\Copy.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> - <data name="ViewBrightness" type="System.Resources.ResXFileRef, System.Windows.Forms"> - <value>..\Resources\ViewBrightness.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + <data name="Test" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Resources\Test.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> - <data name="Light" type="System.Resources.ResXFileRef, System.Windows.Forms"> - <value>..\Resources\Light.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + <data name="Lightbulb" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Resources\Lightbulb.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> <data name="Help" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Resources\Help.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> @@ -484,20 +487,20 @@ <data name="OpenScript" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Resources\OpenScript.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> - <data name="SlimDX_small" type="System.Resources.ResXFileRef, System.Windows.Forms"> - <value>..\Resources\SlimDX_small.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + <data name="MissingThing" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Resources\MissingThing.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> <data name="Status11" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Resources\Status11.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> - <data name="ScreenshotActiveWindow" type="System.Resources.ResXFileRef, System.Windows.Forms"> - <value>..\Resources\ScreenshotActiveWindow.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + <data name="Status1" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Resources\Status1.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> <data name="WarningLarge" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Resources\WarningLarge.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> - <data name="Search" type="System.Resources.ResXFileRef, System.Windows.Forms"> - <value>..\Resources\Search.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + <data name="GZDB2" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Resources\GZDB2.ico;System.Drawing.Icon, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> <data name="Text" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Resources\Text.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> @@ -505,7 +508,7 @@ <data name="Check" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Resources\Check.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> - <data name="Comment" type="System.Resources.ResXFileRef, System.Windows.Forms"> - <value>..\Resources\Comment.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + <data name="LinedefColorPresets" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Resources\LinedefColorPresets.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> </root> \ No newline at end of file diff --git a/Source/Core/Resources/Actions.cfg b/Source/Core/Resources/Actions.cfg index 5e16901c1f3dcf48a3d885b318ce951a21617434..a182b285da48de1a2f90ead5f1be830e013f902c 100644 --- a/Source/Core/Resources/Actions.cfg +++ b/Source/Core/Resources/Actions.cfg @@ -566,7 +566,17 @@ thingsfilterssetup { title = "Configure Things Filters"; category = "tools"; - description = "Shows the Things Filters setup dialog which allows you to add, remove and change the things filters."; + description = "Shows the Things Filters setup dialog, which allows you to add, remove and change the things filters."; + allowkeys = true; + allowmouse = false; + allowscroll = false; +} + +linedefcolorssetup +{ + title = "Configure Linedefs Colors"; + category = "tools"; + description = "Shows the Linedef Color Presets setup dialog, which allows you to add, remove and change linedef color presets."; allowkeys = true; allowmouse = false; allowscroll = false; diff --git a/Source/Core/Resources/LinedefColorPresets.png b/Source/Core/Resources/LinedefColorPresets.png new file mode 100644 index 0000000000000000000000000000000000000000..850732222a106d4137333c3dfdc8e9c645bc574d Binary files /dev/null and b/Source/Core/Resources/LinedefColorPresets.png differ diff --git a/Source/Core/Windows/ChangeMapForm.Designer.cs b/Source/Core/Windows/ChangeMapForm.Designer.cs index 3b125d3d154506eb87f3b6cb773f63ac31b6e305..aa823431b84500f42a7166e116ad53e941fbe010 100644 --- a/Source/Core/Windows/ChangeMapForm.Designer.cs +++ b/Source/Core/Windows/ChangeMapForm.Designer.cs @@ -63,7 +63,7 @@ this.mapslist.MultiSelect = false; this.mapslist.Name = "mapslist"; this.mapslist.ShowGroups = false; - this.mapslist.Size = new System.Drawing.Size(396, 116); + this.mapslist.Size = new System.Drawing.Size(396, 125); this.mapslist.Sorting = System.Windows.Forms.SortOrder.Ascending; this.mapslist.TabIndex = 1; this.mapslist.UseCompatibleStateImageBehavior = false; @@ -74,7 +74,7 @@ // this.cancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.cancel.Location = new System.Drawing.Point(296, 152); + this.cancel.Location = new System.Drawing.Point(296, 161); this.cancel.Name = "cancel"; this.cancel.Size = new System.Drawing.Size(112, 25); this.cancel.TabIndex = 2; @@ -85,7 +85,7 @@ // apply // this.apply.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.apply.Location = new System.Drawing.Point(178, 152); + this.apply.Location = new System.Drawing.Point(178, 161); this.apply.Name = "apply"; this.apply.Size = new System.Drawing.Size(112, 25); this.apply.TabIndex = 3; @@ -99,7 +99,7 @@ this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; this.CancelButton = this.cancel; - this.ClientSize = new System.Drawing.Size(420, 183); + this.ClientSize = new System.Drawing.Size(420, 192); this.Controls.Add(this.cancel); this.Controls.Add(this.apply); this.Controls.Add(this.mapslist); @@ -108,6 +108,7 @@ this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "ChangeMapForm"; + this.Opacity = 1; this.ShowIcon = false; this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; diff --git a/Source/Core/Windows/ChangeMapForm.cs b/Source/Core/Windows/ChangeMapForm.cs index 5d149c5d42caeb7cdb1c35c1b578a1ff0a7bec5f..26a53b4a965c6999c12567b01e069c6088712512 100644 --- a/Source/Core/Windows/ChangeMapForm.cs +++ b/Source/Core/Windows/ChangeMapForm.cs @@ -142,13 +142,18 @@ namespace CodeImp.DoomBuilder.Windows { // Select it again item.Selected = true; + item.EnsureVisible(); break; } } mapslist.EndUpdate(); - apply.Focus(); //"creative" way - mapslist.Focus(); //to set keyboard focus to the maplist + + // Do some focus managing + if(mapslist.SelectedItems.Count > 0) + { + mapslist.FocusedItem = mapslist.SelectedItems[0]; + } // Done Cursor.Current = Cursors.Default; diff --git a/Source/Core/Windows/ConfigForm.Designer.cs b/Source/Core/Windows/ConfigForm.Designer.cs index 4f6ee940000bc862148a0465f6a5602b8b006269..3838cd2417d3fa90ef3335b90e101abc024361dd 100644 --- a/Source/Core/Windows/ConfigForm.Designer.cs +++ b/Source/Core/Windows/ConfigForm.Designer.cs @@ -78,8 +78,6 @@ namespace CodeImp.DoomBuilder.Windows this.listmodes = new System.Windows.Forms.ListView(); this.colmodename = new System.Windows.Forms.ColumnHeader(); this.colmodeplugin = new System.Windows.Forms.ColumnHeader(); - this.tabcustomcolors = new System.Windows.Forms.TabPage(); - this.colorsControl = new CodeImp.DoomBuilder.GZBuilder.Controls.CustomLinedefColorsControl(); this.listconfigs = new System.Windows.Forms.ListView(); this.columnname = new System.Windows.Forms.ColumnHeader(); this.copypastemenu = new System.Windows.Forms.ContextMenuStrip(this.components); @@ -109,7 +107,6 @@ namespace CodeImp.DoomBuilder.Windows this.tabtesting.SuspendLayout(); this.tabtextures.SuspendLayout(); this.tabmodes.SuspendLayout(); - this.tabcustomcolors.SuspendLayout(); this.copypastemenu.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.hint)).BeginInit(); this.SuspendLayout(); @@ -265,13 +262,12 @@ namespace CodeImp.DoomBuilder.Windows this.tabs.Controls.Add(this.tabtesting); this.tabs.Controls.Add(this.tabtextures); this.tabs.Controls.Add(this.tabmodes); - this.tabs.Controls.Add(this.tabcustomcolors); this.tabs.Enabled = false; this.tabs.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.tabs.ItemSize = new System.Drawing.Size(64, 20); + this.tabs.ItemSize = new System.Drawing.Size(108, 18); this.tabs.Location = new System.Drawing.Point(277, 12); this.tabs.Name = "tabs"; - this.tabs.Padding = new System.Drawing.Point(12, 3); + this.tabs.Padding = new System.Drawing.Point(24, 3); this.tabs.SelectedIndex = 0; this.tabs.Size = new System.Drawing.Size(506, 358); this.tabs.TabIndex = 1; @@ -282,10 +278,10 @@ namespace CodeImp.DoomBuilder.Windows this.tabresources.Controls.Add(this.configdata); this.tabresources.Controls.Add(label5); this.tabresources.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.tabresources.Location = new System.Drawing.Point(4, 24); + this.tabresources.Location = new System.Drawing.Point(4, 22); this.tabresources.Name = "tabresources"; this.tabresources.Padding = new System.Windows.Forms.Padding(6); - this.tabresources.Size = new System.Drawing.Size(498, 330); + this.tabresources.Size = new System.Drawing.Size(498, 332); this.tabresources.TabIndex = 0; this.tabresources.Text = "Resources"; this.tabresources.UseVisualStyleBackColor = true; @@ -308,10 +304,10 @@ namespace CodeImp.DoomBuilder.Windows this.tabnodebuilder.Controls.Add(this.nodebuildersave); this.tabnodebuilder.Controls.Add(label3); this.tabnodebuilder.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.tabnodebuilder.Location = new System.Drawing.Point(4, 24); + this.tabnodebuilder.Location = new System.Drawing.Point(4, 22); this.tabnodebuilder.Name = "tabnodebuilder"; this.tabnodebuilder.Padding = new System.Windows.Forms.Padding(6); - this.tabnodebuilder.Size = new System.Drawing.Size(498, 330); + this.tabnodebuilder.Size = new System.Drawing.Size(498, 332); this.tabnodebuilder.TabIndex = 1; this.tabnodebuilder.Text = "Nodebuilder"; this.tabnodebuilder.UseVisualStyleBackColor = true; @@ -362,10 +358,10 @@ namespace CodeImp.DoomBuilder.Windows this.tabtesting.Controls.Add(label1); this.tabtesting.Controls.Add(label9); this.tabtesting.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.tabtesting.Location = new System.Drawing.Point(4, 24); + this.tabtesting.Location = new System.Drawing.Point(4, 22); this.tabtesting.Name = "tabtesting"; this.tabtesting.Padding = new System.Windows.Forms.Padding(6); - this.tabtesting.Size = new System.Drawing.Size(498, 330); + this.tabtesting.Size = new System.Drawing.Size(498, 332); this.tabtesting.TabIndex = 2; this.tabtesting.Text = "Testing"; this.tabtesting.UseVisualStyleBackColor = true; @@ -524,9 +520,9 @@ namespace CodeImp.DoomBuilder.Windows this.tabtextures.Controls.Add(this.addtextureset); this.tabtextures.Controls.Add(label4); this.tabtextures.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.tabtextures.Location = new System.Drawing.Point(4, 24); + this.tabtextures.Location = new System.Drawing.Point(4, 22); this.tabtextures.Name = "tabtextures"; - this.tabtextures.Size = new System.Drawing.Size(498, 330); + this.tabtextures.Size = new System.Drawing.Size(498, 332); this.tabtextures.TabIndex = 3; this.tabtextures.Text = "Textures"; this.tabtextures.UseVisualStyleBackColor = true; @@ -633,9 +629,9 @@ namespace CodeImp.DoomBuilder.Windows this.tabmodes.Controls.Add(this.listmodes); this.tabmodes.Controls.Add(label10); this.tabmodes.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.tabmodes.Location = new System.Drawing.Point(4, 24); + this.tabmodes.Location = new System.Drawing.Point(4, 22); this.tabmodes.Name = "tabmodes"; - this.tabmodes.Size = new System.Drawing.Size(498, 330); + this.tabmodes.Size = new System.Drawing.Size(498, 332); this.tabmodes.TabIndex = 4; this.tabmodes.Text = "Modes"; this.tabmodes.UseVisualStyleBackColor = true; @@ -691,26 +687,6 @@ namespace CodeImp.DoomBuilder.Windows this.colmodeplugin.Text = "Plugin"; this.colmodeplugin.Width = 221; // - // tabcustomcolors - // - this.tabcustomcolors.Controls.Add(this.colorsControl); - this.tabcustomcolors.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.tabcustomcolors.Location = new System.Drawing.Point(4, 24); - this.tabcustomcolors.Name = "tabcustomcolors"; - this.tabcustomcolors.Padding = new System.Windows.Forms.Padding(3); - this.tabcustomcolors.Size = new System.Drawing.Size(498, 330); - this.tabcustomcolors.TabIndex = 5; - this.tabcustomcolors.Text = "Linedef Colors"; - this.tabcustomcolors.UseVisualStyleBackColor = true; - // - // colorsControl - // - this.colorsControl.Location = new System.Drawing.Point(6, 6); - this.colorsControl.Name = "colorsControl"; - this.colorsControl.Size = new System.Drawing.Size(486, 318); - this.colorsControl.TabIndex = 0; - this.colorsControl.PresetsChanged += new System.EventHandler(this.colorsControl_PresetsChanged); - // // listconfigs // this.listconfigs.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) @@ -865,7 +841,6 @@ namespace CodeImp.DoomBuilder.Windows this.tabtextures.ResumeLayout(false); this.tabmodes.ResumeLayout(false); this.tabmodes.PerformLayout(); - this.tabcustomcolors.ResumeLayout(false); this.copypastemenu.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.hint)).EndInit(); this.ResumeLayout(false); @@ -916,8 +891,6 @@ namespace CodeImp.DoomBuilder.Windows private System.Windows.Forms.Button btnNewEngine; private System.Windows.Forms.ComboBox cbEngineSelector; private System.Windows.Forms.Label label13; - private System.Windows.Forms.TabPage tabcustomcolors; - private CodeImp.DoomBuilder.GZBuilder.Controls.CustomLinedefColorsControl colorsControl; private System.Windows.Forms.ContextMenuStrip copypastemenu; private System.Windows.Forms.ToolStripMenuItem copyall; private System.Windows.Forms.ToolStripSeparator toolStripSeparator1; diff --git a/Source/Core/Windows/ConfigForm.cs b/Source/Core/Windows/ConfigForm.cs index 4e1ac1a61a29bbcb6a5e94c929611ab7f5174b35..9602a5cea6896a941e82c59922cdb80ef4a9b77f 100644 --- a/Source/Core/Windows/ConfigForm.cs +++ b/Source/Core/Windows/ConfigForm.cs @@ -221,9 +221,6 @@ namespace CodeImp.DoomBuilder.Windows // Fill start modes RefillStartModes(); - //mxd. Initialise custom linedef colors panel - colorsControl.Setup(gameconfig, configinfo); - // Done preventchanges = false; } @@ -396,13 +393,6 @@ namespace CodeImp.DoomBuilder.Windows General.Configs[i].Enabled = ci.Enabled; if(ci.Changed) General.Configs[i].Apply(ci); } - - //mxd. Update linedef color presets, mark the map as changed. - if(General.Map != null && General.Map.Map != null) - { - General.Map.Map.UpdateCustomLinedefColors(); - General.Map.IsChanged = true; - } // Close this.DialogResult = DialogResult.OK; @@ -782,14 +772,6 @@ namespace CodeImp.DoomBuilder.Windows ApplyTestEngineNameChange(); } - //mxd - private void colorsControl_PresetsChanged(object sender, EventArgs e) - { - if(configinfo == null) return; - configinfo.LinedefColorPresets = colorsControl.GetPresets(); - configinfo.Changed = true; //mxd - } - //mxd private void ConfigForm_Shown(object sender, EventArgs e) { diff --git a/Source/Core/Windows/ConfigForm.resx b/Source/Core/Windows/ConfigForm.resx index 58e731b5373ce13426b19e44ef38b40c989fa681..6b8188a17e177d21486d0c535a176f0ff59f08df 100644 --- a/Source/Core/Windows/ConfigForm.resx +++ b/Source/Core/Windows/ConfigForm.resx @@ -209,6 +209,39 @@ <metadata name="listtextures.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <value>True</value> </metadata> + <metadata name="restoretexturesets.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <value>True</value> + </metadata> + <metadata name="edittextureset.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <value>True</value> + </metadata> + <metadata name="pastetexturesets.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <value>True</value> + </metadata> + <metadata name="copytexturesets.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <value>True</value> + </metadata> + <metadata name="removetextureset.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <value>True</value> + </metadata> + <metadata name="addtextureset.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <value>True</value> + </metadata> + <metadata name="tabmodes.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <value>True</value> + </metadata> + <metadata name="listmodes.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <value>True</value> + </metadata> + <metadata name="nodebuildertest.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <value>True</value> + </metadata> + <metadata name="nodebuildersave.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <value>True</value> + </metadata> + <metadata name="listtextures.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <value>True</value> + </metadata> <metadata name="smallimages.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <value>159, 17</value> </metadata> @@ -217,7 +250,7 @@ AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj0yLjAuMC4w LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAA4 - CAAAAk1TRnQBSQFMAwEBAAG8AQEBvAEBARMBAAEQAQAE/wEJAQAI/wFCAU0BNgEEBgABNgEEAgABKAMA + CAAAAk1TRnQBSQFMAwEBAAHUAQEB1AEBARMBAAEQAQAE/wEJAQAI/wFCAU0BNgEEBgABNgEEAgABKAMA AUwDAAEQAwABAQEAAQgFAAHAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5 AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA @@ -273,9 +306,6 @@ <metadata name="addtextureset.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <value>True</value> </metadata> - <metadata name="tabmodes.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>True</value> - </metadata> <metadata name="listmodes.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <value>True</value> </metadata> @@ -285,4 +315,7 @@ <metadata name="testprogramdialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <value>17, 17</value> </metadata> + <metadata name="tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>416, 17</value> + </metadata> </root> \ No newline at end of file diff --git a/Source/Core/Windows/LinedefColorPresetsForm.Designer.cs b/Source/Core/Windows/LinedefColorPresetsForm.Designer.cs new file mode 100644 index 0000000000000000000000000000000000000000..a1c865db3213f1624d69af8f64ea0a0fc7791a32 --- /dev/null +++ b/Source/Core/Windows/LinedefColorPresetsForm.Designer.cs @@ -0,0 +1,406 @@ +namespace CodeImp.DoomBuilder.Windows +{ + partial class LinedefColorPresetsForm + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) { + if(disposing && (components != null)) { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() { + this.cancel = new System.Windows.Forms.Button(); + this.apply = new System.Windows.Forms.Button(); + this.moveup = new System.Windows.Forms.Button(); + this.movedown = new System.Windows.Forms.Button(); + this.deletepreset = new System.Windows.Forms.Button(); + this.addpreset = new System.Windows.Forms.Button(); + this.curpresetgroup = new System.Windows.Forms.GroupBox(); + this.errordescription = new System.Windows.Forms.Label(); + this.erroricon = new System.Windows.Forms.PictureBox(); + this.presetsettings = new System.Windows.Forms.TabControl(); + this.tabFlags = new System.Windows.Forms.TabPage(); + this.useflags = new System.Windows.Forms.CheckBox(); + this.tabAction = new System.Windows.Forms.TabPage(); + this.useaction = new System.Windows.Forms.CheckBox(); + this.tabActivation = new System.Windows.Forms.TabPage(); + this.activation = new System.Windows.Forms.ComboBox(); + this.useactivation = new System.Windows.Forms.CheckBox(); + this.presetname = new System.Windows.Forms.TextBox(); + this.label1 = new System.Windows.Forms.Label(); + this.flags = new CodeImp.DoomBuilder.Controls.CheckboxArrayControl(); + this.action = new CodeImp.DoomBuilder.Controls.ActionSelectorControl(); + this.udmfactivates = new CodeImp.DoomBuilder.Controls.CheckboxArrayControl(); + this.presetcolor = new CodeImp.DoomBuilder.Controls.ColorControl(); + this.colorpresets = new CodeImp.DoomBuilder.Controls.CheckedColoredListBox(); + this.curpresetgroup.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.erroricon)).BeginInit(); + this.presetsettings.SuspendLayout(); + this.tabFlags.SuspendLayout(); + this.tabAction.SuspendLayout(); + this.tabActivation.SuspendLayout(); + this.SuspendLayout(); + // + // cancel + // + this.cancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.cancel.Location = new System.Drawing.Point(573, 428); + this.cancel.Name = "cancel"; + this.cancel.Size = new System.Drawing.Size(112, 25); + this.cancel.TabIndex = 7; + this.cancel.Text = "Cancel"; + this.cancel.UseVisualStyleBackColor = true; + this.cancel.Click += new System.EventHandler(this.cancel_Click); + // + // apply + // + this.apply.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.apply.Location = new System.Drawing.Point(455, 428); + this.apply.Name = "apply"; + this.apply.Size = new System.Drawing.Size(112, 25); + this.apply.TabIndex = 6; + this.apply.Text = "OK"; + this.apply.UseVisualStyleBackColor = true; + this.apply.Click += new System.EventHandler(this.apply_Click); + // + // moveup + // + this.moveup.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.moveup.Image = global::CodeImp.DoomBuilder.Properties.Resources.ArrowUp; + this.moveup.Location = new System.Drawing.Point(162, 424); + this.moveup.Name = "moveup"; + this.moveup.Size = new System.Drawing.Size(25, 25); + this.moveup.TabIndex = 12; + this.moveup.UseVisualStyleBackColor = true; + this.moveup.Click += new System.EventHandler(this.moveup_Click); + // + // movedown + // + this.movedown.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.movedown.Image = global::CodeImp.DoomBuilder.Properties.Resources.ArrowDown; + this.movedown.Location = new System.Drawing.Point(189, 424); + this.movedown.Name = "movedown"; + this.movedown.Size = new System.Drawing.Size(25, 25); + this.movedown.TabIndex = 11; + this.movedown.UseVisualStyleBackColor = true; + this.movedown.Click += new System.EventHandler(this.movedown_Click); + // + // deletepreset + // + this.deletepreset.Image = global::CodeImp.DoomBuilder.Properties.Resources.SearchClear; + this.deletepreset.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.deletepreset.Location = new System.Drawing.Point(87, 424); + this.deletepreset.Name = "deletepreset"; + this.deletepreset.Size = new System.Drawing.Size(70, 25); + this.deletepreset.TabIndex = 10; + this.deletepreset.Text = "Delele"; + this.deletepreset.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + this.deletepreset.UseVisualStyleBackColor = true; + this.deletepreset.Click += new System.EventHandler(this.deletepreset_Click); + // + // addpreset + // + this.addpreset.Image = global::CodeImp.DoomBuilder.Properties.Resources.Add; + this.addpreset.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.addpreset.Location = new System.Drawing.Point(12, 424); + this.addpreset.Name = "addpreset"; + this.addpreset.Size = new System.Drawing.Size(70, 25); + this.addpreset.TabIndex = 8; + this.addpreset.Text = "Add"; + this.addpreset.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + this.addpreset.UseVisualStyleBackColor = true; + this.addpreset.Click += new System.EventHandler(this.addpreset_Click); + // + // curpresetgroup + // + this.curpresetgroup.Controls.Add(this.errordescription); + this.curpresetgroup.Controls.Add(this.erroricon); + this.curpresetgroup.Controls.Add(this.presetsettings); + this.curpresetgroup.Controls.Add(this.presetname); + this.curpresetgroup.Controls.Add(this.presetcolor); + this.curpresetgroup.Controls.Add(this.label1); + this.curpresetgroup.Location = new System.Drawing.Point(220, 6); + this.curpresetgroup.Name = "curpresetgroup"; + this.curpresetgroup.Size = new System.Drawing.Size(465, 417); + this.curpresetgroup.TabIndex = 13; + this.curpresetgroup.TabStop = false; + this.curpresetgroup.Text = " Selected Preset "; + // + // errordescription + // + this.errordescription.AutoSize = true; + this.errordescription.ForeColor = System.Drawing.Color.DarkRed; + this.errordescription.Location = new System.Drawing.Point(31, 396); + this.errordescription.Name = "errordescription"; + this.errordescription.Size = new System.Drawing.Size(96, 13); + this.errordescription.TabIndex = 20; + this.errordescription.Text = "Teh Error occured!"; + this.errordescription.Visible = false; + // + // erroricon + // + this.erroricon.BackColor = System.Drawing.SystemColors.Window; + this.erroricon.Image = global::CodeImp.DoomBuilder.Properties.Resources.Warning; + this.erroricon.Location = new System.Drawing.Point(11, 394); + this.erroricon.Name = "erroricon"; + this.erroricon.Size = new System.Drawing.Size(16, 16); + this.erroricon.TabIndex = 19; + this.erroricon.TabStop = false; + this.erroricon.Visible = false; + // + // presetsettings + // + this.presetsettings.Controls.Add(this.tabFlags); + this.presetsettings.Controls.Add(this.tabAction); + this.presetsettings.Controls.Add(this.tabActivation); + this.presetsettings.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204))); + this.presetsettings.Location = new System.Drawing.Point(6, 54); + this.presetsettings.Name = "presetsettings"; + this.presetsettings.Padding = new System.Drawing.Point(24, 3); + this.presetsettings.SelectedIndex = 0; + this.presetsettings.Size = new System.Drawing.Size(453, 334); + this.presetsettings.TabIndex = 18; + // + // tabFlags + // + this.tabFlags.Controls.Add(this.flags); + this.tabFlags.Controls.Add(this.useflags); + this.tabFlags.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); + this.tabFlags.Location = new System.Drawing.Point(4, 22); + this.tabFlags.Name = "tabFlags"; + this.tabFlags.Padding = new System.Windows.Forms.Padding(3); + this.tabFlags.Size = new System.Drawing.Size(445, 308); + this.tabFlags.TabIndex = 0; + this.tabFlags.Text = "Flags"; + this.tabFlags.UseVisualStyleBackColor = true; + // + // useflags + // + this.useflags.AutoSize = true; + this.useflags.Location = new System.Drawing.Point(6, 6); + this.useflags.Name = "useflags"; + this.useflags.Size = new System.Drawing.Size(70, 17); + this.useflags.TabIndex = 4; + this.useflags.Text = "Use flags"; + this.useflags.UseVisualStyleBackColor = true; + this.useflags.CheckedChanged += new System.EventHandler(this.useflags_CheckedChanged); + // + // tabAction + // + this.tabAction.Controls.Add(this.action); + this.tabAction.Controls.Add(this.useaction); + this.tabAction.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); + this.tabAction.Location = new System.Drawing.Point(4, 22); + this.tabAction.Name = "tabAction"; + this.tabAction.Padding = new System.Windows.Forms.Padding(3); + this.tabAction.Size = new System.Drawing.Size(445, 308); + this.tabAction.TabIndex = 1; + this.tabAction.Text = "Action"; + this.tabAction.UseVisualStyleBackColor = true; + // + // useaction + // + this.useaction.AutoSize = true; + this.useaction.Location = new System.Drawing.Point(6, 6); + this.useaction.Name = "useaction"; + this.useaction.Size = new System.Drawing.Size(78, 17); + this.useaction.TabIndex = 4; + this.useaction.Text = "Use Action"; + this.useaction.UseVisualStyleBackColor = true; + this.useaction.CheckedChanged += new System.EventHandler(this.useaction_CheckedChanged); + // + // tabActivation + // + this.tabActivation.Controls.Add(this.activation); + this.tabActivation.Controls.Add(this.useactivation); + this.tabActivation.Controls.Add(this.udmfactivates); + this.tabActivation.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); + this.tabActivation.Location = new System.Drawing.Point(4, 22); + this.tabActivation.Name = "tabActivation"; + this.tabActivation.Size = new System.Drawing.Size(445, 308); + this.tabActivation.TabIndex = 2; + this.tabActivation.Text = "Activation type"; + this.tabActivation.UseVisualStyleBackColor = true; + // + // activation + // + this.activation.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.activation.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.activation.FormattingEnabled = true; + this.activation.Location = new System.Drawing.Point(3, 30); + this.activation.Name = "activation"; + this.activation.Size = new System.Drawing.Size(439, 21); + this.activation.TabIndex = 0; + this.activation.SelectedIndexChanged += new System.EventHandler(this.activation_SelectedIndexChanged); + // + // useactivation + // + this.useactivation.AutoSize = true; + this.useactivation.Location = new System.Drawing.Point(6, 6); + this.useactivation.Name = "useactivation"; + this.useactivation.Size = new System.Drawing.Size(94, 17); + this.useactivation.TabIndex = 4; + this.useactivation.Text = "Use activation"; + this.useactivation.UseVisualStyleBackColor = true; + this.useactivation.CheckedChanged += new System.EventHandler(this.useactivation_CheckedChanged); + // + // presetname + // + this.presetname.Location = new System.Drawing.Point(92, 24); + this.presetname.MaxLength = 50; + this.presetname.Name = "presetname"; + this.presetname.Size = new System.Drawing.Size(208, 20); + this.presetname.TabIndex = 17; + this.presetname.Enter += new System.EventHandler(this.presetname_Enter); + this.presetname.Validating += new System.ComponentModel.CancelEventHandler(this.presetname_Validating); + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(48, 27); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(38, 13); + this.label1.TabIndex = 16; + this.label1.Text = "Name:"; + // + // flags + // + this.flags.AutoScroll = true; + this.flags.Columns = 2; + this.flags.Location = new System.Drawing.Point(6, 29); + this.flags.Name = "flags"; + this.flags.Size = new System.Drawing.Size(433, 273); + this.flags.TabIndex = 5; + this.flags.VerticalSpacing = 1; + // + // action + // + this.action.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.action.BackColor = System.Drawing.Color.Transparent; + this.action.Cursor = System.Windows.Forms.Cursors.Default; + this.action.Empty = false; + this.action.GeneralizedCategories = null; + this.action.GeneralizedOptions = null; + this.action.Location = new System.Drawing.Point(6, 30); + this.action.Name = "action"; + this.action.Size = new System.Drawing.Size(433, 21); + this.action.TabIndex = 6; + this.action.Value = 0; + this.action.ValueChanges += new System.EventHandler(this.action_ValueChanges); + // + // udmfactivates + // + this.udmfactivates.AutoScroll = true; + this.udmfactivates.Columns = 2; + this.udmfactivates.Location = new System.Drawing.Point(6, 29); + this.udmfactivates.Name = "udmfactivates"; + this.udmfactivates.Size = new System.Drawing.Size(435, 276); + this.udmfactivates.TabIndex = 5; + this.udmfactivates.VerticalSpacing = 1; + // + // presetcolor + // + this.presetcolor.BackColor = System.Drawing.Color.Transparent; + this.presetcolor.Label = "Linedef color:"; + this.presetcolor.Location = new System.Drawing.Point(319, 23); + this.presetcolor.MaximumSize = new System.Drawing.Size(10000, 23); + this.presetcolor.MinimumSize = new System.Drawing.Size(100, 23); + this.presetcolor.Name = "presetcolor"; + this.presetcolor.Size = new System.Drawing.Size(132, 23); + this.presetcolor.TabIndex = 0; + this.presetcolor.ColorChanged += new System.EventHandler(this.presetcolor_ColorChanged); + // + // colorpresets + // + this.colorpresets.Location = new System.Drawing.Point(12, 12); + this.colorpresets.Name = "colorpresets"; + this.colorpresets.Size = new System.Drawing.Size(202, 409); + this.colorpresets.TabIndex = 9; + this.colorpresets.WarningIcon = global::CodeImp.DoomBuilder.Properties.Resources.Warning; + this.colorpresets.SelectedIndexChanged += new System.EventHandler(this.colorpresets_SelectedIndexChanged); + this.colorpresets.ItemCheck += new System.Windows.Forms.ItemCheckEventHandler(this.colorpresets_ItemCheck); + // + // LinedefColorPresetsForm + // + this.AcceptButton = this.apply; + this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; + this.CancelButton = this.cancel; + this.ClientSize = new System.Drawing.Size(696, 459); + this.Controls.Add(this.curpresetgroup); + this.Controls.Add(this.moveup); + this.Controls.Add(this.movedown); + this.Controls.Add(this.deletepreset); + this.Controls.Add(this.addpreset); + this.Controls.Add(this.colorpresets); + this.Controls.Add(this.cancel); + this.Controls.Add(this.apply); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "LinedefColorPresetsForm"; + this.ShowIcon = false; + this.ShowInTaskbar = false; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + this.Text = "Linedef Color Presets"; + this.curpresetgroup.ResumeLayout(false); + this.curpresetgroup.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.erroricon)).EndInit(); + this.presetsettings.ResumeLayout(false); + this.tabFlags.ResumeLayout(false); + this.tabFlags.PerformLayout(); + this.tabAction.ResumeLayout(false); + this.tabAction.PerformLayout(); + this.tabActivation.ResumeLayout(false); + this.tabActivation.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Button cancel; + private System.Windows.Forms.Button apply; + private System.Windows.Forms.Button moveup; + private System.Windows.Forms.Button movedown; + private System.Windows.Forms.Button deletepreset; + private CodeImp.DoomBuilder.Controls.CheckedColoredListBox colorpresets; + private System.Windows.Forms.Button addpreset; + private System.Windows.Forms.GroupBox curpresetgroup; + private CodeImp.DoomBuilder.Controls.ColorControl presetcolor; + private System.Windows.Forms.TextBox presetname; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.TabControl presetsettings; + private System.Windows.Forms.TabPage tabFlags; + private System.Windows.Forms.CheckBox useflags; + private System.Windows.Forms.TabPage tabAction; + private CodeImp.DoomBuilder.Controls.ActionSelectorControl action; + private System.Windows.Forms.CheckBox useaction; + private System.Windows.Forms.TabPage tabActivation; + private System.Windows.Forms.ComboBox activation; + private System.Windows.Forms.CheckBox useactivation; + private System.Windows.Forms.PictureBox erroricon; + private System.Windows.Forms.Label errordescription; + private CodeImp.DoomBuilder.Controls.CheckboxArrayControl flags; + private CodeImp.DoomBuilder.Controls.CheckboxArrayControl udmfactivates; + } +} \ No newline at end of file diff --git a/Source/Core/Windows/LinedefColorPresetsForm.cs b/Source/Core/Windows/LinedefColorPresetsForm.cs new file mode 100644 index 0000000000000000000000000000000000000000..3d29c0a5e52bc0c30688d75172977e5eec2904b2 --- /dev/null +++ b/Source/Core/Windows/LinedefColorPresetsForm.cs @@ -0,0 +1,528 @@ +#region ================== Namespaces + +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Windows.Forms; +using CodeImp.DoomBuilder.Config; +using CodeImp.DoomBuilder.Controls; +using CodeImp.DoomBuilder.GZBuilder.Data; +using CodeImp.DoomBuilder.Rendering; + +#endregion + +namespace CodeImp.DoomBuilder.Windows +{ + public partial class LinedefColorPresetsForm : Form + { + #region ================== Structs + + private class PresetItem : IColoredListBoxItem + { + private Color color; + + public bool ShowWarning { get; set; } + public Color Color { get { return color; } set { color = value; Preset.Color = PixelColor.FromColor(value); } } + public readonly LinedefColorPreset Preset; + public const string DEFAULT_NAME = "Unnamed preset"; + + // Constructor for a new preset + public PresetItem() + { + Preset = new LinedefColorPreset(DEFAULT_NAME, General.Colors.BrightColors[General.Random(0, General.Colors.BrightColors.Length - 1)]); + color = Preset.Color.ToColor(); + } + + // Constructor for existing preset + public PresetItem(LinedefColorPreset preset) + { + Preset = new LinedefColorPreset(preset); + color = Preset.Color.ToColor(); + } + + public override string ToString() + { + return Preset.Name; + } + } + + #endregion + + #region ================== Variables + + private bool preventchanges; + + #endregion + + #region ================== Constructor / Setup + + public LinedefColorPresetsForm() + { + preventchanges = true; + + InitializeComponent(); + + // Fill filters list + foreach(LinedefColorPreset preset in General.Map.ConfigSettings.LinedefColorPresets) + { + PresetItem pi = new PresetItem(preset); + ValidatePreset(pi); + int index = colorpresets.Items.Add(pi); + if(preset.Enabled) colorpresets.SetItemChecked(index, true); + } + + // Setup preset controls + // Add flags + foreach (KeyValuePair<string, string> lf in General.Map.Config.LinedefFlags) + { + CheckBox box = flags.Add(lf.Value, lf.Key); + box.ThreeState = true; + box.CheckStateChanged += flags_OnCheckStateChanged; + } + + // Fill actions list + action.GeneralizedCategories = General.Map.Config.GenActionCategories; + + LinedefActionInfo anyAction = new LinedefActionInfo(-1, "Any action", true, false); + List<LinedefActionInfo> infos = General.Map.Config.SortedLinedefActions; + infos.Insert(0, anyAction); + + action.AddInfo(infos.ToArray()); + action.Value = -1; + + //activations + udmfactivates.Visible = General.Map.UDMF; + activation.Visible = !General.Map.UDMF; + + //get activates + List<LinedefActivateInfo> activations = General.Map.Config.LinedefActivates; + + if(activations.Count > 0) + { + activations.Insert(0, new LinedefActivateInfo("-1", "Any activation")); + + if(General.Map.UDMF) + { + foreach (LinedefActivateInfo ai in General.Map.Config.LinedefActivates) + { + CheckBox box = udmfactivates.Add(ai.Title, ai.Key); + box.ThreeState = true; + box.CheckStateChanged += flags_OnCheckStateChanged; + } + } + else + { + activation.Items.AddRange(activations.ToArray()); + } + } + else + { + presetsettings.TabPages.Remove(tabActivation); + } + + UpdatePresetsListControls(); + preventchanges = false; + + // Select first preset or disable controls + if(colorpresets.Items.Count > 0) + colorpresets.SelectedIndex = 0; + else + curpresetgroup.Enabled = false; + } + + private void ValidatePreset(PresetItem item) + { + bool warningstate = item.ShowWarning; + string warning = string.Empty; + + // Validate + if(!item.Preset.IsValid()) + { + item.ShowWarning = true; + if(General.Map.UDMF) + warning = "Invalid preset: no flags, action or activation type selected!"; + else + warning = "Invalid preset: no flags or action selected!"; + } + else + { + item.ShowWarning = false; + + // Check for duplicates + foreach(var otheritem in colorpresets.Items) + { + PresetItem other = (PresetItem)otheritem; + if(other == item) continue; + if(other.Preset.Action != item.Preset.Action) continue; + if(other.Preset.Activation != item.Preset.Activation) continue; + if(other.Preset.Flags.Count != item.Preset.Flags.Count) continue; + if(other.Preset.RestrictedFlags.Count != item.Preset.RestrictedFlags.Count) continue; + + bool gotMismatch = false; + foreach(string flag in other.Preset.Flags) + { + if(!item.Preset.Flags.Contains(flag)) + { + gotMismatch = true; + break; + } + } + + foreach(string flag in other.Preset.RestrictedFlags) + { + if(!item.Preset.RestrictedFlags.Contains(flag)) + { + gotMismatch = true; + break; + } + } + + if(gotMismatch) continue; + + //we have a match + warning = "Preset matches '" + other.Preset.Name + "'!"; + item.ShowWarning = true; + break; + } + } + + if(!preventchanges) + { + // Redraw presets list? + if(warningstate != item.ShowWarning) colorpresets.Invalidate(); + + // Update error description + errordescription.Visible = item.ShowWarning; + erroricon.Visible = item.ShowWarning; + errordescription.Text = warning; + } + } + + private void UpdatePresetsListControls() + { + int c = colorpresets.Items.Count; + curpresetgroup.Enabled = (c > 0); + + if(c < 2) + { + movedown.Enabled = false; + moveup.Enabled = false; + } + else + { + movedown.Enabled = (colorpresets.SelectedIndex < c - 1); + moveup.Enabled = (colorpresets.SelectedIndex > 0); + } + } + + private static void ApplyFlagsToPreset(CheckboxArrayControl source, LinedefColorPreset preset) + { + if(source.Enabled) + { + foreach(CheckBox box in source.Checkboxes) + ApplyFlagToPreset(box.Tag.ToString(), preset, box.CheckState); + } + else + { + foreach (CheckBox box in source.Checkboxes) + { + string flag = box.Tag.ToString(); + if(preset.Flags.Contains(flag)) preset.Flags.Remove(flag); + if(preset.RestrictedFlags.Contains(flag)) preset.RestrictedFlags.Remove(flag); + } + } + } + + private static void ApplyFlagToPreset(string flag, LinedefColorPreset preset, CheckState state) + { + switch(state) + { + case CheckState.Checked: + if(!preset.Flags.Contains(flag)) preset.Flags.Add(flag); + if(preset.RestrictedFlags.Contains(flag)) preset.RestrictedFlags.Remove(flag); + break; + + case CheckState.Unchecked: + if(preset.Flags.Contains(flag)) preset.Flags.Remove(flag); + if(!preset.RestrictedFlags.Contains(flag)) preset.RestrictedFlags.Add(flag); + break; + + default: + if(preset.Flags.Contains(flag)) preset.Flags.Remove(flag); + if(preset.RestrictedFlags.Contains(flag)) preset.RestrictedFlags.Remove(flag); + break; + } + } + + private static void ApplyFlagsToControl(LinedefColorPreset preset, CheckboxArrayControl target, CheckBox useflags) + { + if(preset.Flags.Count == 0 && preset.RestrictedFlags.Count == 0) + { + useflags.Checked = false; + target.Enabled = false; + + foreach(CheckBox box in target.Checkboxes) + box.CheckState = CheckState.Indeterminate; + } + else + { + useflags.Checked = true; + target.Enabled = true; + + foreach(CheckBox box in target.Checkboxes) + { + string flag = box.Tag.ToString(); + if(preset.Flags.Contains(flag)) + box.CheckState = CheckState.Checked; + else if(preset.RestrictedFlags.Contains(flag)) + box.CheckState = CheckState.Unchecked; + else + box.CheckState = CheckState.Indeterminate; + } + } + } + + #endregion + + #region ================== Apply / Cancel + + private void apply_Click(object sender, EventArgs e) + { + // Replace all presets + LinedefColorPreset[] newpresets = new LinedefColorPreset[colorpresets.Items.Count]; + for(int i = 0; i < colorpresets.Items.Count; i++) + newpresets[i] = ((PresetItem)colorpresets.Items[i]).Preset; + General.Map.ConfigSettings.LinedefColorPresets = newpresets; + + // Update stuff + General.Map.Map.UpdateCustomLinedefColors(); + General.MainWindow.UpdateLinedefColorPresets(); + General.Map.ConfigSettings.Changed = true; + + // Close + this.DialogResult = DialogResult.OK; + this.Close(); + } + + private void cancel_Click(object sender, EventArgs e) + { + // Close + this.DialogResult = DialogResult.Cancel; + this.Close(); + } + + private void colorpresets_ItemCheck(object sender, ItemCheckEventArgs e) + { + if(preventchanges || colorpresets.SelectedItem == null) return; + ((PresetItem)colorpresets.SelectedItem).Preset.Enabled = (e.NewValue == CheckState.Checked); + } + + #endregion + + #region ================== Presets list events + + private void colorpresets_SelectedIndexChanged(object sender, EventArgs e) + { + if(preventchanges) return; + + // Disable controls + if(colorpresets.SelectedIndex == -1) + { + curpresetgroup.Enabled = false; + return; + } + + preventchanges = true; + curpresetgroup.Enabled = true; + + PresetItem item = (PresetItem) colorpresets.SelectedItem; + + // Update name + presetname.Text = item.ToString(); + + // Update color + presetcolor.Color = item.Preset.Color; + + // Update flags + ApplyFlagsToControl(item.Preset, flags, useflags); + + // Update action + action.Value = item.Preset.Action; + useaction.Checked = (item.Preset.Action != 0); + action.Enabled = (item.Preset.Action != 0); + + // Update activation + if(General.Map.UDMF) + { + ApplyFlagsToControl(item.Preset, udmfactivates, useactivation); + } + else if(presetsettings.TabPages.Contains(tabActivation)) + { + if(item.Preset.Activation == 0) + { + activation.SelectedIndex = 1; + useactivation.Checked = false; + activation.Enabled = false; + } + else + { + for(int i = 0; i < activation.Items.Count; i++) + { + if(((LinedefActivateInfo)activation.Items[i]).Index == item.Preset.Activation) + { + activation.SelectedIndex = i; + useactivation.Checked = true; + activation.Enabled = true; + break; + } + } + } + } + + preventchanges = false; + + // Update warning description + ValidatePreset(item); + + // Update controls + UpdatePresetsListControls(); + } + + private void addpreset_Click(object sender, EventArgs e) + { + // Add new item + PresetItem item = new PresetItem(); + int index = Math.Max(0, colorpresets.SelectedIndex); + colorpresets.Items.Insert(index, item); + colorpresets.SetItemChecked(index, true); + + // Select it + colorpresets.SelectedItem = item; + + // Update controls + UpdatePresetsListControls(); + } + + private void deletepreset_Click(object sender, EventArgs e) + { + if(colorpresets.SelectedItem == null) return; //sanity check + + // Remove item + int index = colorpresets.SelectedIndex; + colorpresets.Items.RemoveAt(index); + + // Select previous item, if possible + if(colorpresets.Items.Count > 0) + colorpresets.SelectedIndex = (index >= colorpresets.Items.Count ? colorpresets.Items.Count - 1 : index); + + // Update controls + UpdatePresetsListControls(); + } + + private void moveup_Click(object sender, EventArgs e) + { + if(colorpresets.SelectedItem == null) return; + + PresetItem item = (PresetItem)colorpresets.SelectedItem; + colorpresets.Items[colorpresets.SelectedIndex] = colorpresets.Items[colorpresets.SelectedIndex - 1]; + colorpresets.Items[colorpresets.SelectedIndex - 1] = item; + + colorpresets.SelectedIndex--; + } + + private void movedown_Click(object sender, EventArgs e) + { + if(colorpresets.SelectedItem == null) return; + + PresetItem item = (PresetItem)colorpresets.SelectedItem; + colorpresets.Items[colorpresets.SelectedIndex] = colorpresets.Items[colorpresets.SelectedIndex + 1]; + colorpresets.Items[colorpresets.SelectedIndex + 1] = item; + + colorpresets.SelectedIndex++; + } + + #endregion + + #region ================== Current preset events + + private void presetname_Validating(object sender, CancelEventArgs e) + { + if(preventchanges || colorpresets.SelectedItem == null) return; + if(string.IsNullOrEmpty(presetname.Text)) presetname.Text = PresetItem.DEFAULT_NAME; + ((PresetItem)colorpresets.SelectedItem).Preset.Name = presetname.Text; + colorpresets.Invalidate(); + } + + private void presetname_Enter(object sender, EventArgs e) + { + if(presetname.Text == PresetItem.DEFAULT_NAME) presetname.Text = string.Empty; + } + + private void presetcolor_ColorChanged(object sender, EventArgs e) + { + if(preventchanges || colorpresets.SelectedItem == null) return; + ((PresetItem)colorpresets.SelectedItem).Color = presetcolor.Color.ToColor(); + colorpresets.Invalidate(); + } + + private void flags_OnCheckStateChanged(object sender, EventArgs eventArgs) + { + if(preventchanges || colorpresets.SelectedItem == null) return; + CheckBox cb = (CheckBox)sender; + PresetItem item = (PresetItem)colorpresets.SelectedItem; + ApplyFlagToPreset(cb.Tag.ToString(), item.Preset, cb.CheckState); + ValidatePreset(item); + } + + private void useflags_CheckedChanged(object sender, EventArgs e) + { + if(preventchanges || colorpresets.SelectedItem == null) return; + flags.Enabled = useflags.Checked; + PresetItem item = (PresetItem)colorpresets.SelectedItem; + ApplyFlagsToPreset(flags, item.Preset); + ValidatePreset(item); + } + + private void useaction_CheckedChanged(object sender, EventArgs e) + { + if(preventchanges) return; + action.Enabled = useaction.Checked; + action_ValueChanges(action, EventArgs.Empty); + } + + private void action_ValueChanges(object sender, EventArgs e) + { + if(preventchanges || colorpresets.SelectedItem == null) return; + PresetItem item = (PresetItem)colorpresets.SelectedItem; + item.Preset.Action = (action.Enabled ? action.Value : 0); + ValidatePreset(item); + } + + private void useactivation_CheckedChanged(object sender, EventArgs e) + { + if(preventchanges || colorpresets.SelectedItem == null) return; + activation.Enabled = useactivation.Checked; + udmfactivates.Enabled = useactivation.Checked; + PresetItem item = (PresetItem)colorpresets.SelectedItem; + + if(General.Map.UDMF) + ApplyFlagsToPreset(udmfactivates, item.Preset); + else + item.Preset.Activation = (activation.Enabled ? ((LinedefActivateInfo)activation.SelectedItem).Index : 0); + + ValidatePreset(item); + } + + private void activation_SelectedIndexChanged(object sender, EventArgs e) + { + if(preventchanges || colorpresets.SelectedItem == null || activation.SelectedItem == null) return; + PresetItem item = (PresetItem)colorpresets.SelectedItem; + item.Preset.Activation = ((LinedefActivateInfo)activation.SelectedItem).Index; + ValidatePreset(item); + } + + #endregion + + } +} \ No newline at end of file diff --git a/Source/Core/GZBuilder/Controls/CustomLinedefColorProperties.resx b/Source/Core/Windows/LinedefColorPresetsForm.resx similarity index 100% rename from Source/Core/GZBuilder/Controls/CustomLinedefColorProperties.resx rename to Source/Core/Windows/LinedefColorPresetsForm.resx diff --git a/Source/Core/Windows/MainForm.Designer.cs b/Source/Core/Windows/MainForm.Designer.cs index 9a64e7f74d53ac4fd6bbfeabcb25bd6a74ac50ec..53ee6c3d87f220082cd4f0b44e6c64429a7f5db7 100644 --- a/Source/Core/Windows/MainForm.Designer.cs +++ b/Source/Core/Windows/MainForm.Designer.cs @@ -89,6 +89,7 @@ namespace CodeImp.DoomBuilder.Windows this.itemviewthingtypes = new System.Windows.Forms.ToolStripMenuItem(); this.menuview = new System.Windows.Forms.ToolStripMenuItem(); this.itemthingsfilter = new System.Windows.Forms.ToolStripMenuItem(); + this.itemlinedefcolors = new System.Windows.Forms.ToolStripMenuItem(); this.seperatorviewthings = new System.Windows.Forms.ToolStripSeparator(); this.itemviewnormal = new System.Windows.Forms.ToolStripMenuItem(); this.itemviewbrightness = new System.Windows.Forms.ToolStripMenuItem(); @@ -109,6 +110,7 @@ namespace CodeImp.DoomBuilder.Windows this.menugotocoords = new System.Windows.Forms.ToolStripMenuItem(); this.itemfittoscreen = new System.Windows.Forms.ToolStripMenuItem(); this.itemtoggleinfo = new System.Windows.Forms.ToolStripMenuItem(); + this.itemtogglecomments = new System.Windows.Forms.ToolStripMenuItem(); this.seperatorviewzoom = new System.Windows.Forms.ToolStripSeparator(); this.itemscripteditor = new System.Windows.Forms.ToolStripMenuItem(); this.menumode = new System.Windows.Forms.ToolStripMenuItem(); @@ -163,7 +165,8 @@ namespace CodeImp.DoomBuilder.Windows this.buttoninsertprefabfile = new System.Windows.Forms.ToolStripButton(); this.buttoninsertpreviousprefab = new System.Windows.Forms.ToolStripButton(); this.buttonthingsfilter = new System.Windows.Forms.ToolStripButton(); - this.thingfilters = new System.Windows.Forms.ToolStripComboBox(); + this.separatorlinecolors = new System.Windows.Forms.ToolStripSeparator(); + this.buttonlinededfcolors = new System.Windows.Forms.ToolStripButton(); this.separatorfilters = new System.Windows.Forms.ToolStripSeparator(); this.buttonfullbrightness = new System.Windows.Forms.ToolStripButton(); this.separatorfullbrightness = new System.Windows.Forms.ToolStripSeparator(); @@ -172,10 +175,10 @@ namespace CodeImp.DoomBuilder.Windows this.buttonviewfloors = new System.Windows.Forms.ToolStripButton(); this.buttonviewceilings = new System.Windows.Forms.ToolStripButton(); this.seperatorviews = new System.Windows.Forms.ToolStripSeparator(); + this.buttontogglecomments = new System.Windows.Forms.ToolStripButton(); this.buttonsnaptogrid = new System.Windows.Forms.ToolStripButton(); this.buttonautomerge = new System.Windows.Forms.ToolStripButton(); this.buttonautoclearsidetextures = new System.Windows.Forms.ToolStripButton(); - this.buttontogglecomments = new System.Windows.Forms.ToolStripButton(); this.seperatorgeometry = new System.Windows.Forms.ToolStripSeparator(); this.buttontogglefx = new System.Windows.Forms.ToolStripButton(); this.dynamiclightmode = new System.Windows.Forms.ToolStripSplitButton(); @@ -245,7 +248,8 @@ namespace CodeImp.DoomBuilder.Windows this.dockerscollapser = new System.Windows.Forms.Timer(this.components); this.flowLayoutPanel = new System.Windows.Forms.FlowLayoutPanel(); this.modecontrolsloolbar = new System.Windows.Forms.ToolStrip(); - this.itemtogglecomments = new System.Windows.Forms.ToolStripMenuItem(); + this.linedefcolorpresets = new System.Windows.Forms.ToolStripDropDownButton(); + this.thingfilters = new System.Windows.Forms.ToolStripDropDownButton(); toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); toolStripSeparator9 = new System.Windows.Forms.ToolStripSeparator(); toolStripSeparator12 = new System.Windows.Forms.ToolStripSeparator(); @@ -687,7 +691,7 @@ namespace CodeImp.DoomBuilder.Windows this.itemmapoptions.Name = "itemmapoptions"; this.itemmapoptions.Size = new System.Drawing.Size(219, 22); this.itemmapoptions.Tag = "builder_mapoptions"; - this.itemmapoptions.Text = "Map &Options...."; + this.itemmapoptions.Text = "Map &Options..."; this.itemmapoptions.Click += new System.EventHandler(this.InvokeTaggedAction); // // itemviewusedtags @@ -712,6 +716,7 @@ namespace CodeImp.DoomBuilder.Windows // this.menuview.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.itemthingsfilter, + this.itemlinedefcolors, this.seperatorviewthings, this.itemviewnormal, this.itemviewbrightness, @@ -735,22 +740,31 @@ namespace CodeImp.DoomBuilder.Windows // this.itemthingsfilter.Image = global::CodeImp.DoomBuilder.Properties.Resources.Filter; this.itemthingsfilter.Name = "itemthingsfilter"; - this.itemthingsfilter.Size = new System.Drawing.Size(209, 22); + this.itemthingsfilter.Size = new System.Drawing.Size(215, 22); this.itemthingsfilter.Tag = "builder_thingsfilterssetup"; this.itemthingsfilter.Text = "Configure &Things Filters..."; this.itemthingsfilter.Click += new System.EventHandler(this.InvokeTaggedAction); // + // itemlinedefcolors + // + this.itemlinedefcolors.Image = global::CodeImp.DoomBuilder.Properties.Resources.LinedefColorPresets; + this.itemlinedefcolors.Name = "itemlinedefcolors"; + this.itemlinedefcolors.Size = new System.Drawing.Size(215, 22); + this.itemlinedefcolors.Tag = "builder_linedefcolorssetup"; + this.itemlinedefcolors.Text = "Configure &Linedef Colors..."; + this.itemlinedefcolors.Click += new System.EventHandler(this.InvokeTaggedAction); + // // seperatorviewthings // this.seperatorviewthings.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3); this.seperatorviewthings.Name = "seperatorviewthings"; - this.seperatorviewthings.Size = new System.Drawing.Size(206, 6); + this.seperatorviewthings.Size = new System.Drawing.Size(212, 6); // // itemviewnormal // this.itemviewnormal.Image = global::CodeImp.DoomBuilder.Properties.Resources.ViewNormal; this.itemviewnormal.Name = "itemviewnormal"; - this.itemviewnormal.Size = new System.Drawing.Size(209, 22); + this.itemviewnormal.Size = new System.Drawing.Size(215, 22); this.itemviewnormal.Tag = "builder_viewmodenormal"; this.itemviewnormal.Text = "&Wireframe"; this.itemviewnormal.Click += new System.EventHandler(this.InvokeTaggedAction); @@ -759,7 +773,7 @@ namespace CodeImp.DoomBuilder.Windows // this.itemviewbrightness.Image = global::CodeImp.DoomBuilder.Properties.Resources.ViewBrightness; this.itemviewbrightness.Name = "itemviewbrightness"; - this.itemviewbrightness.Size = new System.Drawing.Size(209, 22); + this.itemviewbrightness.Size = new System.Drawing.Size(215, 22); this.itemviewbrightness.Tag = "builder_viewmodebrightness"; this.itemviewbrightness.Text = "&Brightness Levels"; this.itemviewbrightness.Click += new System.EventHandler(this.InvokeTaggedAction); @@ -768,7 +782,7 @@ namespace CodeImp.DoomBuilder.Windows // this.itemviewfloors.Image = global::CodeImp.DoomBuilder.Properties.Resources.ViewTextureFloor; this.itemviewfloors.Name = "itemviewfloors"; - this.itemviewfloors.Size = new System.Drawing.Size(209, 22); + this.itemviewfloors.Size = new System.Drawing.Size(215, 22); this.itemviewfloors.Tag = "builder_viewmodefloors"; this.itemviewfloors.Text = "&Floor Textures"; this.itemviewfloors.Click += new System.EventHandler(this.InvokeTaggedAction); @@ -777,7 +791,7 @@ namespace CodeImp.DoomBuilder.Windows // this.itemviewceilings.Image = global::CodeImp.DoomBuilder.Properties.Resources.ViewTextureCeiling; this.itemviewceilings.Name = "itemviewceilings"; - this.itemviewceilings.Size = new System.Drawing.Size(209, 22); + this.itemviewceilings.Size = new System.Drawing.Size(215, 22); this.itemviewceilings.Tag = "builder_viewmodeceilings"; this.itemviewceilings.Text = "&Ceiling Textures"; this.itemviewceilings.Click += new System.EventHandler(this.InvokeTaggedAction); @@ -785,14 +799,14 @@ namespace CodeImp.DoomBuilder.Windows // seperatorviewviews // this.seperatorviewviews.Name = "seperatorviewviews"; - this.seperatorviewviews.Size = new System.Drawing.Size(206, 6); + this.seperatorviewviews.Size = new System.Drawing.Size(212, 6); // // menufullbrightness // this.menufullbrightness.CheckOnClick = true; this.menufullbrightness.Image = global::CodeImp.DoomBuilder.Properties.Resources.Brightness; this.menufullbrightness.Name = "menufullbrightness"; - this.menufullbrightness.Size = new System.Drawing.Size(209, 22); + this.menufullbrightness.Size = new System.Drawing.Size(215, 22); this.menufullbrightness.Tag = "builder_togglebrightness"; this.menufullbrightness.Text = "Full Brightness"; this.menufullbrightness.Click += new System.EventHandler(this.InvokeTaggedAction); @@ -800,7 +814,7 @@ namespace CodeImp.DoomBuilder.Windows // toolStripSeparator4 // this.toolStripSeparator4.Name = "toolStripSeparator4"; - this.toolStripSeparator4.Size = new System.Drawing.Size(206, 6); + this.toolStripSeparator4.Size = new System.Drawing.Size(212, 6); // // menuzoom // @@ -815,7 +829,7 @@ namespace CodeImp.DoomBuilder.Windows this.item2zoom5}); this.menuzoom.Image = global::CodeImp.DoomBuilder.Properties.Resources.Zoom; this.menuzoom.Name = "menuzoom"; - this.menuzoom.Size = new System.Drawing.Size(209, 22); + this.menuzoom.Size = new System.Drawing.Size(215, 22); this.menuzoom.Text = "&Zoom"; // // item2zoom800 @@ -885,7 +899,7 @@ namespace CodeImp.DoomBuilder.Windows // menugotocoords // this.menugotocoords.Name = "menugotocoords"; - this.menugotocoords.Size = new System.Drawing.Size(209, 22); + this.menugotocoords.Size = new System.Drawing.Size(215, 22); this.menugotocoords.Tag = "builder_centeroncoordinates"; this.menugotocoords.Text = "Go To Coordinates..."; this.menugotocoords.Click += new System.EventHandler(this.InvokeTaggedAction); @@ -893,7 +907,7 @@ namespace CodeImp.DoomBuilder.Windows // itemfittoscreen // this.itemfittoscreen.Name = "itemfittoscreen"; - this.itemfittoscreen.Size = new System.Drawing.Size(209, 22); + this.itemfittoscreen.Size = new System.Drawing.Size(215, 22); this.itemfittoscreen.Tag = "builder_centerinscreen"; this.itemfittoscreen.Text = "Fit to Screen"; this.itemfittoscreen.Click += new System.EventHandler(this.InvokeTaggedAction); @@ -901,22 +915,31 @@ namespace CodeImp.DoomBuilder.Windows // itemtoggleinfo // this.itemtoggleinfo.Name = "itemtoggleinfo"; - this.itemtoggleinfo.Size = new System.Drawing.Size(209, 22); + this.itemtoggleinfo.Size = new System.Drawing.Size(215, 22); this.itemtoggleinfo.Tag = "builder_toggleinfopanel"; this.itemtoggleinfo.Text = "&Expanded Info Panel"; this.itemtoggleinfo.Click += new System.EventHandler(this.InvokeTaggedAction); // + // itemtogglecomments + // + this.itemtogglecomments.CheckOnClick = true; + this.itemtogglecomments.Name = "itemtogglecomments"; + this.itemtogglecomments.Size = new System.Drawing.Size(215, 22); + this.itemtogglecomments.Tag = "builder_togglecomments"; + this.itemtogglecomments.Text = "Show Comments"; + this.itemtogglecomments.Click += new System.EventHandler(this.InvokeTaggedAction); + // // seperatorviewzoom // this.seperatorviewzoom.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3); this.seperatorviewzoom.Name = "seperatorviewzoom"; - this.seperatorviewzoom.Size = new System.Drawing.Size(206, 6); + this.seperatorviewzoom.Size = new System.Drawing.Size(212, 6); // // itemscripteditor // this.itemscripteditor.Image = global::CodeImp.DoomBuilder.Properties.Resources.Script2; this.itemscripteditor.Name = "itemscripteditor"; - this.itemscripteditor.Size = new System.Drawing.Size(209, 22); + this.itemscripteditor.Size = new System.Drawing.Size(215, 22); this.itemscripteditor.Tag = "builder_openscripteditor"; this.itemscripteditor.Text = "&Script Editor..."; this.itemscripteditor.Click += new System.EventHandler(this.InvokeTaggedAction); @@ -1176,6 +1199,9 @@ namespace CodeImp.DoomBuilder.Windows this.seperatorprefabs, this.buttonthingsfilter, this.thingfilters, + this.separatorlinecolors, + this.buttonlinededfcolors, + this.linedefcolorpresets, this.separatorfilters, this.buttonfullbrightness, this.separatorfullbrightness, @@ -1261,7 +1287,7 @@ namespace CodeImp.DoomBuilder.Windows // this.toggleFilter.Name = "toggleFilter"; this.toggleFilter.Size = new System.Drawing.Size(173, 22); - this.toggleFilter.Text = "Things Filter"; + this.toggleFilter.Text = "Things Filter / Linedef Colors"; this.toggleFilter.Click += new System.EventHandler(this.toggleFilter_Click); // // toggleViewModes @@ -1425,21 +1451,22 @@ namespace CodeImp.DoomBuilder.Windows this.buttonthingsfilter.Text = "Configure Things Filters"; this.buttonthingsfilter.Click += new System.EventHandler(this.InvokeTaggedAction); // - // thingfilters + // separatorlinecolors // - this.thingfilters.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.thingfilters.Items.AddRange(new object[] { - "(none)", - "(custom)", - "Easy skill items only", - "Medium skill items only", - "Hard skill items only"}); - this.thingfilters.Margin = new System.Windows.Forms.Padding(1, 0, 6, 0); - this.thingfilters.Name = "thingfilters"; - this.thingfilters.Size = new System.Drawing.Size(100, 25); - this.thingfilters.ToolTipText = "Things Filter"; - this.thingfilters.SelectedIndexChanged += new System.EventHandler(this.thingfilters_SelectedIndexChanged); - this.thingfilters.DropDownClosed += new System.EventHandler(this.LoseFocus); + this.separatorlinecolors.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0); + this.separatorlinecolors.Name = "separatorlinecolors"; + this.separatorlinecolors.Size = new System.Drawing.Size(6, 25); + // + // buttonlinededfcolors + // + this.buttonlinededfcolors.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.buttonlinededfcolors.Image = global::CodeImp.DoomBuilder.Properties.Resources.LinedefColorPresets; + this.buttonlinededfcolors.ImageTransparentColor = System.Drawing.Color.Magenta; + this.buttonlinededfcolors.Name = "buttonlinededfcolors"; + this.buttonlinededfcolors.Size = new System.Drawing.Size(23, 22); + this.buttonlinededfcolors.Tag = "builder_linedefcolorssetup"; + this.buttonlinededfcolors.Text = "Configure Linedef Colors"; + this.buttonlinededfcolors.Click += new System.EventHandler(this.InvokeTaggedAction); // // separatorfilters // @@ -1519,6 +1546,19 @@ namespace CodeImp.DoomBuilder.Windows this.seperatorviews.Name = "seperatorviews"; this.seperatorviews.Size = new System.Drawing.Size(6, 25); // + // buttontogglecomments + // + this.buttontogglecomments.Checked = true; + this.buttontogglecomments.CheckState = System.Windows.Forms.CheckState.Checked; + this.buttontogglecomments.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.buttontogglecomments.Image = global::CodeImp.DoomBuilder.Properties.Resources.Comment; + this.buttontogglecomments.ImageTransparentColor = System.Drawing.Color.Magenta; + this.buttontogglecomments.Name = "buttontogglecomments"; + this.buttontogglecomments.Size = new System.Drawing.Size(23, 22); + this.buttontogglecomments.Tag = "builder_togglecomments"; + this.buttontogglecomments.Text = "Show Comments"; + this.buttontogglecomments.Click += new System.EventHandler(this.InvokeTaggedAction); + // // buttonsnaptogrid // this.buttonsnaptogrid.Checked = true; @@ -1558,19 +1598,6 @@ namespace CodeImp.DoomBuilder.Windows this.buttonautoclearsidetextures.Text = "Auto Clear Sidedef Textures"; this.buttonautoclearsidetextures.Click += new System.EventHandler(this.InvokeTaggedAction); // - // buttontogglecomments - // - this.buttontogglecomments.Checked = true; - this.buttontogglecomments.CheckState = System.Windows.Forms.CheckState.Checked; - this.buttontogglecomments.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this.buttontogglecomments.Image = global::CodeImp.DoomBuilder.Properties.Resources.Comment; - this.buttontogglecomments.ImageTransparentColor = System.Drawing.Color.Magenta; - this.buttontogglecomments.Name = "buttontogglecomments"; - this.buttontogglecomments.Size = new System.Drawing.Size(23, 22); - this.buttontogglecomments.Tag = "builder_togglecomments"; - this.buttontogglecomments.Text = "Show Comments"; - this.buttontogglecomments.Click += new System.EventHandler(this.InvokeTaggedAction); - // // seperatorgeometry // this.seperatorgeometry.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0); @@ -2287,14 +2314,34 @@ namespace CodeImp.DoomBuilder.Windows this.modecontrolsloolbar.Text = "toolStrip1"; this.modecontrolsloolbar.Visible = false; // - // itemtogglecomments + // linedefcolorpresets + // + this.linedefcolorpresets.AutoSize = false; + this.linedefcolorpresets.AutoToolTip = false; + this.linedefcolorpresets.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; + this.linedefcolorpresets.ImageTransparentColor = System.Drawing.Color.Magenta; + this.linedefcolorpresets.Margin = new System.Windows.Forms.Padding(1, 1, 0, 2); + this.linedefcolorpresets.Name = "linedefcolorpresets"; + this.linedefcolorpresets.Size = new System.Drawing.Size(120, 22); + this.linedefcolorpresets.Text = "No presets"; + this.linedefcolorpresets.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.linedefcolorpresets.Click += new System.EventHandler(this.linedefcolorpresets_MouseLeave); + this.linedefcolorpresets.DropDownItemClicked += new System.Windows.Forms.ToolStripItemClickedEventHandler(this.linedefcolorpresets_DropDownItemClicked); + this.linedefcolorpresets.DropDownClosed += new System.EventHandler(this.LoseFocus); // - this.itemtogglecomments.Name = "itemtogglecomments"; - this.itemtogglecomments.Size = new System.Drawing.Size(209, 22); - this.itemtogglecomments.Tag = "builder_togglecomments"; - this.itemtogglecomments.Text = "Show Comments"; - this.itemtogglecomments.CheckOnClick = true; - this.itemtogglecomments.Click += new System.EventHandler(this.InvokeTaggedAction); + // thingfilters + // + this.thingfilters.AutoSize = false; + this.thingfilters.AutoToolTip = false; + this.thingfilters.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; + this.thingfilters.Image = ((System.Drawing.Image)(resources.GetObject("thingfilters.Image"))); + this.thingfilters.ImageTransparentColor = System.Drawing.Color.Magenta; + this.thingfilters.Margin = new System.Windows.Forms.Padding(1, 1, 0, 2); + this.thingfilters.Name = "thingfilters"; + this.thingfilters.Size = new System.Drawing.Size(120, 22); + this.thingfilters.Text = "(show all)"; + this.thingfilters.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.thingfilters.DropDownClosed += new System.EventHandler(this.LoseFocus); // // MainForm // @@ -2386,7 +2433,6 @@ namespace CodeImp.DoomBuilder.Windows private CodeImp.DoomBuilder.Controls.SectorInfoPanel sectorinfo; private CodeImp.DoomBuilder.Controls.ThingInfoPanel thinginfo; private System.Windows.Forms.ToolStripButton buttonthingsfilter; - private System.Windows.Forms.ToolStripComboBox thingfilters; private System.Windows.Forms.ToolStripSeparator seperatorviews; private System.Windows.Forms.ToolStripStatusLabel gridlabel; private System.Windows.Forms.ToolStripDropDownButton buttongrid; @@ -2549,5 +2595,10 @@ namespace CodeImp.DoomBuilder.Windows private ToolStripMenuItem itemzoom800; private ToolStripButton buttontogglecomments; private ToolStripMenuItem itemtogglecomments; + private ToolStripMenuItem itemlinedefcolors; + private ToolStripSeparator separatorlinecolors; + private ToolStripButton buttonlinededfcolors; + private ToolStripDropDownButton linedefcolorpresets; + private ToolStripDropDownButton thingfilters; } } \ No newline at end of file diff --git a/Source/Core/Windows/MainForm.cs b/Source/Core/Windows/MainForm.cs index f3bf542f94f2c41b315b9f12bcf537d42b7c9c7e..67afdda3bb307fdedd55873c528708703a669470 100644 --- a/Source/Core/Windows/MainForm.cs +++ b/Source/Core/Windows/MainForm.cs @@ -33,6 +33,7 @@ using CodeImp.DoomBuilder.Config; using CodeImp.DoomBuilder.Controls; using CodeImp.DoomBuilder.Data; using CodeImp.DoomBuilder.Editing; +using CodeImp.DoomBuilder.GZBuilder.Data; using CodeImp.DoomBuilder.Geometry; using CodeImp.DoomBuilder.GZBuilder.Windows; using CodeImp.DoomBuilder.IO; @@ -264,6 +265,7 @@ namespace CodeImp.DoomBuilder.Windows display.OnKeyReleased += display_OnKeyReleased; toolbarContextMenu.KeyDown += toolbarContextMenu_KeyDown; toolbarContextMenu.KeyUp += toolbarContextMenu_KeyUp; + linedefcolorpresets.DropDown.MouseLeave += linedefcolorpresets_MouseLeave; // Apply shortcut keys ApplyShortcutKeys(); @@ -1615,72 +1617,110 @@ namespace CodeImp.DoomBuilder.Windows this.ActiveControl = null; } - // Things filter selected - private void thingfilters_SelectedIndexChanged(object sender, EventArgs e) + //mxd. Things filter selected + private void thingfilters_DropDownItemClicked(object sender, EventArgs e) { // Only possible when a map is open if((General.Map != null) && !updatingfilters) { updatingfilters = true; - + ToolStripMenuItem clickeditem = sender as ToolStripMenuItem; + + // Keep already selected items selected + if(!clickeditem.Checked) + { + clickeditem.Checked = true; + updatingfilters = false; + return; + } + // Change filter - General.Map.ChangeThingFilter(thingfilters.SelectedItem as ThingsFilter); + ThingsFilter f = clickeditem.Tag as ThingsFilter; + General.Map.ChangeThingFilter(f); + + // Deselect other items... + foreach(var item in thingfilters.DropDown.Items) + { + if(item != clickeditem) ((ToolStripMenuItem)item).Checked = false; + } + + // Update button text + thingfilters.Text = f.Name; updatingfilters = false; } // Lose focus - if(!thingfilters.DroppedDown) LoseFocus(sender, e); + LoseFocus(sender, e); } - // This updates the things filter on the toolbar + //mxd. This updates the things filter on the toolbar internal void UpdateThingsFilters() { // Only possible to list filters when a map is open if(General.Map != null) { ThingsFilter oldfilter = null; - if(thingfilters.SelectedIndex > -1) - oldfilter = thingfilters.SelectedItem as ThingsFilter; + + // Anything selected? + foreach(var item in thingfilters.DropDown.Items) + { + if(((ToolStripMenuItem)item).Checked) + { + oldfilter = ((ToolStripMenuItem)item).Tag as ThingsFilter; + break; + } + } updatingfilters = true; // Clear the list - thingfilters.Items.Clear(); + thingfilters.DropDown.Items.Clear(); // Add null filter if(General.Map.ThingsFilter is NullThingsFilter) - thingfilters.Items.Add(General.Map.ThingsFilter); + thingfilters.DropDown.Items.Add(CreateThingsFilterMenuItem(General.Map.ThingsFilter)); else - thingfilters.Items.Add(new NullThingsFilter()); + thingfilters.DropDown.Items.Add(CreateThingsFilterMenuItem(new NullThingsFilter())); - // Add all filters + // Add all filters, select current one foreach(ThingsFilter f in General.Map.ConfigSettings.ThingsFilters) - thingfilters.Items.Add(f); - - // Select current filter - foreach(ThingsFilter f in thingfilters.Items) - if(f == General.Map.ThingsFilter) thingfilters.SelectedItem = f; + thingfilters.DropDown.Items.Add(CreateThingsFilterMenuItem(f)); updatingfilters = false; // No filter selected? - if(thingfilters.SelectedIndex == -1) + ToolStripMenuItem selecteditem = null; + foreach(var i in thingfilters.DropDown.Items) + { + ToolStripMenuItem item = i as ToolStripMenuItem; + if(item.Checked) + { + selecteditem = item; + break; + } + } + + if(selecteditem == null) { - // Select the first and update - thingfilters.SelectedIndex = 0; + ToolStripMenuItem first = thingfilters.DropDown.Items[0] as ToolStripMenuItem; + first.Checked = true; } // Another filter got selected? - else if(oldfilter != (thingfilters.SelectedItem as ThingsFilter)) + else if(selecteditem.Tag != oldfilter) { - // Update! - thingfilters_SelectedIndexChanged(this, EventArgs.Empty); + selecteditem.Checked = true; } + + // Update button text + if(selecteditem != null) + thingfilters.Text = ((ThingsFilter)selecteditem.Tag).Name; } else { // Clear the list - thingfilters.Items.Clear(); + thingfilters.DropDown.Items.Clear(); + thingfilters.Text = "(show all)"; } } @@ -1693,26 +1733,161 @@ namespace CodeImp.DoomBuilder.Windows // Select current filter bool selecteditemfound = false; - foreach(ThingsFilter f in thingfilters.Items) + foreach(var i in thingfilters.DropDown.Items) { + ToolStripMenuItem item = i as ToolStripMenuItem; + ThingsFilter f = item.Tag as ThingsFilter; + if(f == General.Map.ThingsFilter) { - thingfilters.SelectedItem = f; + item.Checked = true; + thingfilters.Text = f.Name; selecteditemfound = true; } + else + { + item.Checked = false; + } } // Not in the list? if(!selecteditemfound) { // Select nothing - thingfilters.SelectedIndex = -1; + thingfilters.Text = "(show all)"; //mxd } updatingfilters = false; } } - + + //mxd + private ToolStripMenuItem CreateThingsFilterMenuItem(ThingsFilter f) + { + // Make decorated name + string name = f.Name; + if(f.Invert) name = "!" + name; + switch(f.DisplayMode) + { + case ThingsFilterDisplayMode.CLASSIC_MODES_ONLY: name += " [2D]"; break; + case ThingsFilterDisplayMode.VISUAL_MODES_ONLY: name += " [3D]"; break; + } + + // Create and select the item + ToolStripMenuItem item = new ToolStripMenuItem(name) { CheckOnClick = true, Tag = f }; + item.CheckedChanged += thingfilters_DropDownItemClicked; + item.Checked = (f == General.Map.ThingsFilter); + + // Update icon + if(!(f is NullThingsFilter) && !f.IsValid()) + { + item.Image = Resources.Warning; + item.ImageScaling = ToolStripItemImageScaling.None; + } + + return item; + } + + //mxd. Linedef color preset (de)selected + private void linedefcolorpresets_ItemClicked(object sender, EventArgs e) + { + ToolStripMenuItem item = sender as ToolStripMenuItem; + ((LinedefColorPreset)item.Tag).Enabled = item.Checked; + + List<string> enablednames = new List<string>(); + foreach (LinedefColorPreset p in General.Map.ConfigSettings.LinedefColorPresets) + { + if(p.Enabled) enablednames.Add(p.Name); + } + + // Update button text + UpdateColorPresetsButtonText(linedefcolorpresets, enablednames); + + General.Map.Map.UpdateCustomLinedefColors(); + General.Map.ConfigSettings.Changed = true; + + // Update display + if(General.Editing.Mode is ClassicMode) General.Interface.RedrawDisplay(); + } + + //mxd. Handle Shift key... + private void linedefcolorpresets_DropDownItemClicked(object sender, ToolStripItemClickedEventArgs e) + { + linedefcolorpresets.DropDown.AutoClose = (ModifierKeys != Keys.Shift); + } + + //mxd. Handles the mouse leaving linedefcolorpresets.DropDown and clicking on linedefcolorpresets button + private void linedefcolorpresets_MouseLeave(object sender, EventArgs e) + { + linedefcolorpresets.DropDown.AutoClose = true; + } + + //mxd. This updates linedef color presets selector on the toolbar + internal void UpdateLinedefColorPresets() + { + // Refill the list + List<string> enablednames = new List<string>(); + linedefcolorpresets.DropDown.Items.Clear(); + + if(General.Map != null) + { + foreach(LinedefColorPreset p in General.Map.ConfigSettings.LinedefColorPresets) + { + // Create menu item + ToolStripMenuItem item = new ToolStripMenuItem(p.Name) + { + CheckOnClick = true, + Tag = p, + ImageScaling = ToolStripItemImageScaling.None, + Checked = p.Enabled, + ToolTipText = "Hold Shift to toggle several items at once" + }; + + // Create icon + if(p.IsValid()) + { + Bitmap icon = new Bitmap(16, 16); + using(Graphics g = Graphics.FromImage(icon)) + { + g.FillRectangle(new SolidBrush(p.Color.ToColor()), 2, 3, 12, 10); + g.DrawRectangle(Pens.Black, 2, 3, 11, 9); + } + + item.Image = icon; + } + // Or use the warning icon + else + { + item.Image = Resources.Warning; + } + + item.CheckedChanged += linedefcolorpresets_ItemClicked; + linedefcolorpresets.DropDown.Items.Add(item); + if(p.Enabled) enablednames.Add(p.Name); + } + } + + // Update button text + UpdateColorPresetsButtonText(linedefcolorpresets, enablednames); + } + + //mxd + private static void UpdateColorPresetsButtonText(ToolStripItem button, List<string> names) + { + if(names.Count == 0) + { + button.Text = "No active presets"; + } + else + { + string text = string.Join(", ", names.ToArray()); + if(TextRenderer.MeasureText(text, button.Font).Width > button.Width) + button.Text = names.Count + (names.Count.ToString(CultureInfo.InvariantCulture).EndsWith("1") ? " preset" : " presets") + " active"; + else + button.Text = text; + } + } + // This adds a button to the toolbar public void AddButton(ToolStripItem button) { AddButton(button, ToolbarSection.Custom, General.Plugins.FindPluginByAssembly(Assembly.GetCallingAssembly())); } public void AddButton(ToolStripItem button, ToolbarSection section) { AddButton(button, section, General.Plugins.FindPluginByAssembly(Assembly.GetCallingAssembly())); } @@ -1888,6 +2063,9 @@ namespace CodeImp.DoomBuilder.Windows buttoninsertpreviousprefab.Visible = General.Settings.ToolbarPrefabs && maploaded; buttonthingsfilter.Visible = General.Settings.ToolbarFilter && maploaded; thingfilters.Visible = General.Settings.ToolbarFilter && maploaded; + separatorlinecolors.Visible = General.Settings.ToolbarFilter && maploaded; //mxd + buttonlinededfcolors.Visible = General.Settings.ToolbarFilter && maploaded; //mxd + linedefcolorpresets.Visible = General.Settings.ToolbarFilter && maploaded; //mxd separatorfilters.Visible = General.Settings.ToolbarViewModes && maploaded; //mxd buttonfullbrightness.Visible = General.Settings.ToolbarViewModes && maploaded; //mxd separatorfullbrightness.Visible = General.Settings.ToolbarViewModes && maploaded; //mxd @@ -2718,6 +2896,7 @@ namespace CodeImp.DoomBuilder.Windows { // Menu items itemthingsfilter.Enabled = (General.Map != null); + itemlinedefcolors.Enabled = (General.Map != null); //mxd itemscripteditor.Enabled = (General.Map != null); itemfittoscreen.Enabled = (General.Map != null); menuzoom.Enabled = (General.Map != null); diff --git a/Source/Core/Windows/MainForm.resx b/Source/Core/Windows/MainForm.resx index ae8e2369cb9b386f434428a8c8932aea826007b1..b7ad4d9252ea6005904507ed71c268cbaa6612da 100644 --- a/Source/Core/Windows/MainForm.resx +++ b/Source/Core/Windows/MainForm.resx @@ -144,6 +144,22 @@ <metadata name="toolbarContextMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <value>159, 56</value> </metadata> + <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> + <data name="thingfilters.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG + YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9 + 0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw + bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc + VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9 + c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32 + Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo + mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+ + kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D + TgDQASA1MVpwzwAAAABJRU5ErkJggg== +</value> + </data> <metadata name="statusbar.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <value>332, 17</value> </metadata> @@ -204,7 +220,6 @@ <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <value>116</value> </metadata> - <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <value> AAABAAQAEBAAAAEAGABoAwAARgAAACAgAAABABgAqAwAAK4DAAAwMAAAAQAYAKgcAABWEAAAQEAAAAEA diff --git a/Source/Core/Windows/MapOptionsForm.cs b/Source/Core/Windows/MapOptionsForm.cs index d9ef8b3df3e36ca8c9369fc0bc6b0ce7c1399631..c8c6d2739649b1bdc0f18b15152c201d98c7ec93 100644 --- a/Source/Core/Windows/MapOptionsForm.cs +++ b/Source/Core/Windows/MapOptionsForm.cs @@ -229,6 +229,12 @@ namespace CodeImp.DoomBuilder.Windows } } + //mxd. If the map was never saved and it's name was changed, update filename + if((levelname.Text != options.CurrentName) && (General.Map != null) && (string.IsNullOrEmpty(General.Map.FilePathName))) + { + General.Map.FileTitle = levelname.Text + ".wad"; + } + // When the user changed the configuration to one that has a different read/write interface, // we have to warn the user that the map may not be compatible. diff --git a/Source/Core/Windows/PreferencesForm.Designer.cs b/Source/Core/Windows/PreferencesForm.Designer.cs index ec615c176d492243df154ba3cbe8533bfc5587ab..a700f56cbbe1e0f4f1af383ec03ee9f0e42e0259 100644 --- a/Source/Core/Windows/PreferencesForm.Designer.cs +++ b/Source/Core/Windows/PreferencesForm.Designer.cs @@ -39,6 +39,7 @@ namespace CodeImp.DoomBuilder.Windows System.Windows.Forms.Label label20; System.Windows.Forms.Label label21; System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PreferencesForm)); + this.checkforupdates = new System.Windows.Forms.CheckBox(); this.cbStoreEditTab = new System.Windows.Forms.CheckBox(); this.locatetexturegroup = new System.Windows.Forms.CheckBox(); this.recentFiles = new Dotnetrix.Controls.TrackBar(); @@ -175,7 +176,6 @@ namespace CodeImp.DoomBuilder.Windows this.pasteoptions = new CodeImp.DoomBuilder.Controls.PasteOptionsControl(); this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); this.browseScreenshotsFolderDialog = new System.Windows.Forms.FolderBrowserDialog(); - this.checkforupdates = new System.Windows.Forms.CheckBox(); label7 = new System.Windows.Forms.Label(); label6 = new System.Windows.Forms.Label(); label5 = new System.Windows.Forms.Label(); @@ -274,10 +274,20 @@ namespace CodeImp.DoomBuilder.Windows groupBox1.TabStop = false; groupBox1.Text = " Options "; // + // checkforupdates + // + this.checkforupdates.AutoSize = true; + this.checkforupdates.Location = new System.Drawing.Point(32, 392); + this.checkforupdates.Name = "checkforupdates"; + this.checkforupdates.Size = new System.Drawing.Size(160, 17); + this.checkforupdates.TabIndex = 51; + this.checkforupdates.Text = "Check for updates at startup"; + this.checkforupdates.UseVisualStyleBackColor = true; + // // cbStoreEditTab // this.cbStoreEditTab.AutoSize = true; - this.cbStoreEditTab.Location = new System.Drawing.Point(32, 365); + this.cbStoreEditTab.Location = new System.Drawing.Point(32, 371); this.cbStoreEditTab.Name = "cbStoreEditTab"; this.cbStoreEditTab.Size = new System.Drawing.Size(203, 17); this.cbStoreEditTab.TabIndex = 50; @@ -287,7 +297,7 @@ namespace CodeImp.DoomBuilder.Windows // locatetexturegroup // this.locatetexturegroup.AutoSize = true; - this.locatetexturegroup.Location = new System.Drawing.Point(32, 323); + this.locatetexturegroup.Location = new System.Drawing.Point(32, 329); this.locatetexturegroup.Name = "locatetexturegroup"; this.locatetexturegroup.Size = new System.Drawing.Size(267, 17); this.locatetexturegroup.TabIndex = 49; @@ -362,7 +372,7 @@ namespace CodeImp.DoomBuilder.Windows // cbSynchCameras // this.cbSynchCameras.AutoSize = true; - this.cbSynchCameras.Location = new System.Drawing.Point(32, 344); + this.cbSynchCameras.Location = new System.Drawing.Point(32, 350); this.cbSynchCameras.Name = "cbSynchCameras"; this.cbSynchCameras.Size = new System.Drawing.Size(260, 17); this.cbSynchCameras.TabIndex = 42; @@ -372,7 +382,7 @@ namespace CodeImp.DoomBuilder.Windows // showtexturesizes // this.showtexturesizes.AutoSize = true; - this.showtexturesizes.Location = new System.Drawing.Point(32, 302); + this.showtexturesizes.Location = new System.Drawing.Point(32, 308); this.showtexturesizes.Name = "showtexturesizes"; this.showtexturesizes.Size = new System.Drawing.Size(208, 17); this.showtexturesizes.TabIndex = 41; @@ -382,7 +392,7 @@ namespace CodeImp.DoomBuilder.Windows // scriptontop // this.scriptontop.AutoSize = true; - this.scriptontop.Location = new System.Drawing.Point(32, 281); + this.scriptontop.Location = new System.Drawing.Point(32, 287); this.scriptontop.Name = "scriptontop"; this.scriptontop.Size = new System.Drawing.Size(227, 17); this.scriptontop.TabIndex = 40; @@ -882,7 +892,7 @@ namespace CodeImp.DoomBuilder.Windows // toolbar_gzdoom // this.toolbar_gzdoom.AutoSize = true; - this.toolbar_gzdoom.Location = new System.Drawing.Point(188, 102); + this.toolbar_gzdoom.Location = new System.Drawing.Point(160, 102); this.toolbar_gzdoom.Name = "toolbar_gzdoom"; this.toolbar_gzdoom.Size = new System.Drawing.Size(75, 17); this.toolbar_gzdoom.TabIndex = 50; @@ -892,7 +902,7 @@ namespace CodeImp.DoomBuilder.Windows // toolbar_file // this.toolbar_file.AutoSize = true; - this.toolbar_file.Location = new System.Drawing.Point(32, 22); + this.toolbar_file.Location = new System.Drawing.Point(14, 22); this.toolbar_file.Name = "toolbar_file"; this.toolbar_file.Size = new System.Drawing.Size(121, 17); this.toolbar_file.TabIndex = 49; @@ -902,7 +912,7 @@ namespace CodeImp.DoomBuilder.Windows // toolbar_testing // this.toolbar_testing.AutoSize = true; - this.toolbar_testing.Location = new System.Drawing.Point(188, 82); + this.toolbar_testing.Location = new System.Drawing.Point(160, 82); this.toolbar_testing.Name = "toolbar_testing"; this.toolbar_testing.Size = new System.Drawing.Size(61, 17); this.toolbar_testing.TabIndex = 48; @@ -912,7 +922,7 @@ namespace CodeImp.DoomBuilder.Windows // toolbar_geometry // this.toolbar_geometry.AutoSize = true; - this.toolbar_geometry.Location = new System.Drawing.Point(188, 62); + this.toolbar_geometry.Location = new System.Drawing.Point(160, 62); this.toolbar_geometry.Name = "toolbar_geometry"; this.toolbar_geometry.Size = new System.Drawing.Size(92, 17); this.toolbar_geometry.TabIndex = 47; @@ -922,7 +932,7 @@ namespace CodeImp.DoomBuilder.Windows // toolbar_viewmodes // this.toolbar_viewmodes.AutoSize = true; - this.toolbar_viewmodes.Location = new System.Drawing.Point(188, 42); + this.toolbar_viewmodes.Location = new System.Drawing.Point(160, 42); this.toolbar_viewmodes.Name = "toolbar_viewmodes"; this.toolbar_viewmodes.Size = new System.Drawing.Size(84, 17); this.toolbar_viewmodes.TabIndex = 46; @@ -932,17 +942,17 @@ namespace CodeImp.DoomBuilder.Windows // toolbar_filter // this.toolbar_filter.AutoSize = true; - this.toolbar_filter.Location = new System.Drawing.Point(188, 22); + this.toolbar_filter.Location = new System.Drawing.Point(160, 22); this.toolbar_filter.Name = "toolbar_filter"; - this.toolbar_filter.Size = new System.Drawing.Size(83, 17); + this.toolbar_filter.Size = new System.Drawing.Size(161, 17); this.toolbar_filter.TabIndex = 45; - this.toolbar_filter.Text = "Things Filter"; + this.toolbar_filter.Text = "Things Filter / Linedef Colors"; this.toolbar_filter.UseVisualStyleBackColor = true; // // toolbar_prefabs // this.toolbar_prefabs.AutoSize = true; - this.toolbar_prefabs.Location = new System.Drawing.Point(32, 102); + this.toolbar_prefabs.Location = new System.Drawing.Point(14, 102); this.toolbar_prefabs.Name = "toolbar_prefabs"; this.toolbar_prefabs.Size = new System.Drawing.Size(62, 17); this.toolbar_prefabs.TabIndex = 44; @@ -952,7 +962,7 @@ namespace CodeImp.DoomBuilder.Windows // toolbar_copy // this.toolbar_copy.AutoSize = true; - this.toolbar_copy.Location = new System.Drawing.Point(32, 82); + this.toolbar_copy.Location = new System.Drawing.Point(14, 82); this.toolbar_copy.Name = "toolbar_copy"; this.toolbar_copy.Size = new System.Drawing.Size(115, 17); this.toolbar_copy.TabIndex = 43; @@ -962,7 +972,7 @@ namespace CodeImp.DoomBuilder.Windows // toolbar_undo // this.toolbar_undo.AutoSize = true; - this.toolbar_undo.Location = new System.Drawing.Point(32, 62); + this.toolbar_undo.Location = new System.Drawing.Point(14, 62); this.toolbar_undo.Name = "toolbar_undo"; this.toolbar_undo.Size = new System.Drawing.Size(89, 17); this.toolbar_undo.TabIndex = 42; @@ -972,7 +982,7 @@ namespace CodeImp.DoomBuilder.Windows // toolbar_script // this.toolbar_script.AutoSize = true; - this.toolbar_script.Location = new System.Drawing.Point(32, 42); + this.toolbar_script.Location = new System.Drawing.Point(14, 42); this.toolbar_script.Name = "toolbar_script"; this.toolbar_script.Size = new System.Drawing.Size(83, 17); this.toolbar_script.TabIndex = 41; @@ -1152,7 +1162,7 @@ namespace CodeImp.DoomBuilder.Windows // invertyaxis // this.invertyaxis.AutoSize = true; - this.invertyaxis.Location = new System.Drawing.Point(36, 282); + this.invertyaxis.Location = new System.Drawing.Point(32, 282); this.invertyaxis.Name = "invertyaxis"; this.invertyaxis.Size = new System.Drawing.Size(118, 17); this.invertyaxis.TabIndex = 4; @@ -1887,16 +1897,6 @@ namespace CodeImp.DoomBuilder.Windows // this.browseScreenshotsFolderDialog.Description = "Select a Folder to Save Screenshots Into"; // - // checkforupdates - // - this.checkforupdates.AutoSize = true; - this.checkforupdates.Location = new System.Drawing.Point(32, 386); - this.checkforupdates.Name = "checkforupdates"; - this.checkforupdates.Size = new System.Drawing.Size(160, 17); - this.checkforupdates.TabIndex = 51; - this.checkforupdates.Text = "Check for updates at startup"; - this.checkforupdates.UseVisualStyleBackColor = true; - // // PreferencesForm // this.AcceptButton = this.apply; diff --git a/Source/Core/Windows/ThingsFiltersForm.Designer.cs b/Source/Core/Windows/ThingsFiltersForm.Designer.cs index 0a22b03e23776143a4ebd845ddacb509139a7528..2c58d213322e46f5c9519c62404cf7f546ca46be 100644 --- a/Source/Core/Windows/ThingsFiltersForm.Designer.cs +++ b/Source/Core/Windows/ThingsFiltersForm.Designer.cs @@ -28,8 +28,11 @@ namespace CodeImp.DoomBuilder.Windows /// </summary> private void InitializeComponent() { + this.components = new System.ComponentModel.Container(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ThingsFiltersForm)); this.listfilters = new System.Windows.Forms.ListView(); this.columnname = new System.Windows.Forms.ColumnHeader(); + this.imagelist = new System.Windows.Forms.ImageList(this.components); this.addfilter = new System.Windows.Forms.Button(); this.deletefilter = new System.Windows.Forms.Button(); this.filtergroup = new System.Windows.Forms.GroupBox(); @@ -99,6 +102,7 @@ namespace CodeImp.DoomBuilder.Windows this.listfilters.Name = "listfilters"; this.listfilters.ShowGroups = false; this.listfilters.Size = new System.Drawing.Size(202, 410); + this.listfilters.SmallImageList = this.imagelist; this.listfilters.Sorting = System.Windows.Forms.SortOrder.Ascending; this.listfilters.TabIndex = 0; this.listfilters.UseCompatibleStateImageBehavior = false; @@ -110,6 +114,12 @@ namespace CodeImp.DoomBuilder.Windows this.columnname.Text = "Configuration"; this.columnname.Width = 177; // + // imagelist + // + this.imagelist.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imagelist.ImageStream"))); + this.imagelist.TransparentColor = System.Drawing.Color.Transparent; + this.imagelist.Images.SetKeyName(0, "Warning.png"); + // // addfilter // this.addfilter.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); @@ -377,7 +387,7 @@ namespace CodeImp.DoomBuilder.Windows this.filterfields.Columns = 2; this.filterfields.Location = new System.Drawing.Point(20, 39); this.filterfields.Name = "filterfields"; - this.filterfields.Size = new System.Drawing.Size(402, 258); + this.filterfields.Size = new System.Drawing.Size(402, 233); this.filterfields.TabIndex = 5; this.filterfields.VerticalSpacing = 1; // @@ -402,7 +412,7 @@ namespace CodeImp.DoomBuilder.Windows this.tabaction.Location = new System.Drawing.Point(4, 22); this.tabaction.Name = "tabaction"; this.tabaction.Padding = new System.Windows.Forms.Padding(3); - this.tabaction.Size = new System.Drawing.Size(445, 285); + this.tabaction.Size = new System.Drawing.Size(445, 303); this.tabaction.TabIndex = 2; this.tabaction.Text = "Action"; this.tabaction.UseVisualStyleBackColor = true; @@ -601,7 +611,7 @@ namespace CodeImp.DoomBuilder.Windows this.tabcustom.Location = new System.Drawing.Point(4, 22); this.tabcustom.Name = "tabcustom"; this.tabcustom.Padding = new System.Windows.Forms.Padding(3); - this.tabcustom.Size = new System.Drawing.Size(445, 285); + this.tabcustom.Size = new System.Drawing.Size(445, 303); this.tabcustom.TabIndex = 3; this.tabcustom.Text = "Custom"; this.tabcustom.UseVisualStyleBackColor = true; @@ -619,7 +629,7 @@ namespace CodeImp.DoomBuilder.Windows this.fieldslist.Name = "fieldslist"; this.fieldslist.PropertyColumnVisible = true; this.fieldslist.PropertyColumnWidth = 150; - this.fieldslist.Size = new System.Drawing.Size(426, 276); + this.fieldslist.Size = new System.Drawing.Size(426, 251); this.fieldslist.TabIndex = 2; this.fieldslist.TypeColumnVisible = true; this.fieldslist.TypeColumnWidth = 100; @@ -633,6 +643,7 @@ namespace CodeImp.DoomBuilder.Windows this.filtername.Name = "filtername"; this.filtername.Size = new System.Drawing.Size(232, 20); this.filtername.TabIndex = 0; + this.filtername.Enter += new System.EventHandler(this.filtername_Enter); this.filtername.Validating += new System.ComponentModel.CancelEventHandler(this.filtername_Validating); // // label1 @@ -756,5 +767,6 @@ namespace CodeImp.DoomBuilder.Windows private System.Windows.Forms.CheckBox invert; private System.Windows.Forms.ComboBox filtermode; private System.Windows.Forms.Label label9; + private System.Windows.Forms.ImageList imagelist; } } \ No newline at end of file diff --git a/Source/Core/Windows/ThingsFiltersForm.cs b/Source/Core/Windows/ThingsFiltersForm.cs index ce6bb3a0d64c1a738c7d4cf2c952d4861a42b507..8c637bc5eb531934364ecee416c9cbc7ae3bfeb4 100644 --- a/Source/Core/Windows/ThingsFiltersForm.cs +++ b/Source/Core/Windows/ThingsFiltersForm.cs @@ -85,7 +85,8 @@ namespace CodeImp.DoomBuilder.Windows filteraction.AddInfo(General.Map.Config.SortedLinedefActions.ToArray()); // Initialize custom fields editor - if (General.Map.FormatInterface.HasCustomFields) { //mxd + if(General.Map.FormatInterface.HasCustomFields) //mxd + { fieldslist.ListNoFixedFields(); fieldslist.Setup("thing"); } @@ -107,6 +108,7 @@ namespace CodeImp.DoomBuilder.Windows // Make item in list ListViewItem item = new ListViewItem(nf.Name); item.Tag = nf; + item.ImageIndex = (nf.IsValid() ? -1 : 0); //mxd listfilters.Items.Add(item); // Select item if this is the current filter @@ -142,6 +144,17 @@ namespace CodeImp.DoomBuilder.Windows } } + //mxd + private void ValidateFilter(ListViewItem item, ThingsFilter f) + { + int imageindex = (f.IsValid() ? -1 : 0); + if(item.ImageIndex != imageindex) + { + item.ImageIndex = imageindex; + listfilters.Invalidate(); + } + } + #endregion #region ================== Management @@ -195,8 +208,8 @@ namespace CodeImp.DoomBuilder.Windows item.Selected = true; // Focus on the name field - filtername.Focus(); - filtername.SelectAll(); + //filtername.Focus(); + //filtername.SelectAll(); } // Delete Selected clicked @@ -345,6 +358,8 @@ namespace CodeImp.DoomBuilder.Windows // Unset category name f.CategoryName = ""; } + + ValidateFilter(listfilters.SelectedItems[0], f); //mxd } } @@ -358,6 +373,7 @@ namespace CodeImp.DoomBuilder.Windows ThingsFilter f = listfilters.SelectedItems[0].Tag as ThingsFilter; // Name changed? + if(string.IsNullOrEmpty(filtername.Text)) filtername.Text = ThingsFilter.DEFAULT_NAME; //mxd if(f.Name != filtername.Text) { // Update name @@ -368,6 +384,12 @@ namespace CodeImp.DoomBuilder.Windows } } + //mxd + private void filtername_Enter(object sender, EventArgs e) + { + if(filtername.Text == ThingsFilter.DEFAULT_NAME) filtername.Text = string.Empty; + } + // Field clicked private void filterfield_Check(object sender, EventArgs e) { @@ -400,6 +422,8 @@ namespace CodeImp.DoomBuilder.Windows f.RequiredFields.Remove(box.Tag.ToString()); break; } + + ValidateFilter(listfilters.SelectedItems[0], f); //mxd } } } @@ -415,6 +439,8 @@ namespace CodeImp.DoomBuilder.Windows f.ThingType = -1; else f.ThingType = filtertype.GetValue(); + + ValidateFilter(listfilters.SelectedItems[0], f); //mxd } } @@ -431,6 +457,8 @@ namespace CodeImp.DoomBuilder.Windows // Get selected filter ThingsFilter f = listfilters.SelectedItems[0].Tag as ThingsFilter; f.ThingAngle = filterangle.GetResult(-1); + + ValidateFilter(listfilters.SelectedItems[0], f); //mxd } } @@ -450,6 +478,8 @@ namespace CodeImp.DoomBuilder.Windows // Get selected filter ThingsFilter f = listfilters.SelectedItems[0].Tag as ThingsFilter; f.ThingZHeight = filterzheight.GetResult(int.MinValue); + + ValidateFilter(listfilters.SelectedItems[0], f); //mxd } } @@ -467,6 +497,8 @@ namespace CodeImp.DoomBuilder.Windows f.ThingAction = -1; else f.ThingAction = filteraction.GetValue(); + + ValidateFilter(listfilters.SelectedItems[0], f); //mxd } // Only when line type is known, otherwise use the thing arguments @@ -509,6 +541,8 @@ namespace CodeImp.DoomBuilder.Windows // Get selected filter ThingsFilter f = listfilters.SelectedItems[0].Tag as ThingsFilter; f.ThingTag = filtertag.GetResult(-1); + + ValidateFilter(listfilters.SelectedItems[0], f); //mxd } } @@ -524,6 +558,8 @@ namespace CodeImp.DoomBuilder.Windows int.TryParse((sender as Control).Tag.ToString(), out index); ArgumentBox filterarg = (sender as ArgumentBox); f.ThingArgs[index] = filterarg.GetResult(-1); + + ValidateFilter(listfilters.SelectedItems[0], f); //mxd } } @@ -535,6 +571,9 @@ namespace CodeImp.DoomBuilder.Windows // Get selected filter ThingsFilter f = listfilters.SelectedItems[0].Tag as ThingsFilter; fieldslist.Apply(f.ThingCustomFields); + + //mxd. Validate filter + ValidateFilter(listfilters.SelectedItems[0], f); //mxd } } diff --git a/Source/Core/Windows/ThingsFiltersForm.resx b/Source/Core/Windows/ThingsFiltersForm.resx index e4d72cb0564728df90dfcb33a6dcd4c3a9c9799b..e1ba548cc01146587a5f6bd710ff15af364460ae 100644 --- a/Source/Core/Windows/ThingsFiltersForm.resx +++ b/Source/Core/Windows/ThingsFiltersForm.resx @@ -117,6 +117,51 @@ <resheader name="writer"> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> + <metadata name="imagelist.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> + <data name="imagelist.ImageStream" mimetype="application/x-microsoft.net.object.binary.base64"> + <value> + AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj0yLjAuMC4w + LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 + ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAAg + CAAAAk1TRnQBSQFMAwEBAAEYAQABGAEAARABAAEQAQAE/wEJAQAI/wFCAU0BNgEEBgABNgEEAgABKAMA + AUADAAEQAwABAQEAAQgGAAEEGAABgAIAAYADAAKAAQABgAMAAYABAAGAAQACgAIAA8ABAAHAAdwBwAEA + AfABygGmAQABMwUAATMBAAEzAQABMwEAAjMCAAMWAQADHAEAAyIBAAMpAQADVQEAA00BAANCAQADOQEA + AYABfAH/AQACUAH/AQABkwEAAdYBAAH/AewBzAEAAcYB1gHvAQAB1gLnAQABkAGpAa0CAAH/ATMDAAFm + AwABmQMAAcwCAAEzAwACMwIAATMBZgIAATMBmQIAATMBzAIAATMB/wIAAWYDAAFmATMCAAJmAgABZgGZ + AgABZgHMAgABZgH/AgABmQMAAZkBMwIAAZkBZgIAApkCAAGZAcwCAAGZAf8CAAHMAwABzAEzAgABzAFm + AgABzAGZAgACzAIAAcwB/wIAAf8BZgIAAf8BmQIAAf8BzAEAATMB/wIAAf8BAAEzAQABMwEAAWYBAAEz + AQABmQEAATMBAAHMAQABMwEAAf8BAAH/ATMCAAMzAQACMwFmAQACMwGZAQACMwHMAQACMwH/AQABMwFm + AgABMwFmATMBAAEzAmYBAAEzAWYBmQEAATMBZgHMAQABMwFmAf8BAAEzAZkCAAEzAZkBMwEAATMBmQFm + AQABMwKZAQABMwGZAcwBAAEzAZkB/wEAATMBzAIAATMBzAEzAQABMwHMAWYBAAEzAcwBmQEAATMCzAEA + ATMBzAH/AQABMwH/ATMBAAEzAf8BZgEAATMB/wGZAQABMwH/AcwBAAEzAv8BAAFmAwABZgEAATMBAAFm + AQABZgEAAWYBAAGZAQABZgEAAcwBAAFmAQAB/wEAAWYBMwIAAWYCMwEAAWYBMwFmAQABZgEzAZkBAAFm + ATMBzAEAAWYBMwH/AQACZgIAAmYBMwEAA2YBAAJmAZkBAAJmAcwBAAFmAZkCAAFmAZkBMwEAAWYBmQFm + AQABZgKZAQABZgGZAcwBAAFmAZkB/wEAAWYBzAIAAWYBzAEzAQABZgHMAZkBAAFmAswBAAFmAcwB/wEA + AWYB/wIAAWYB/wEzAQABZgH/AZkBAAFmAf8BzAEAAcwBAAH/AQAB/wEAAcwBAAKZAgABmQEzAZkBAAGZ + AQABmQEAAZkBAAHMAQABmQMAAZkCMwEAAZkBAAFmAQABmQEzAcwBAAGZAQAB/wEAAZkBZgIAAZkBZgEz + AQABmQEzAWYBAAGZAWYBmQEAAZkBZgHMAQABmQEzAf8BAAKZATMBAAKZAWYBAAOZAQACmQHMAQACmQH/ + AQABmQHMAgABmQHMATMBAAFmAcwBZgEAAZkBzAGZAQABmQLMAQABmQHMAf8BAAGZAf8CAAGZAf8BMwEA + AZkBzAFmAQABmQH/AZkBAAGZAf8BzAEAAZkC/wEAAcwDAAGZAQABMwEAAcwBAAFmAQABzAEAAZkBAAHM + AQABzAEAAZkBMwIAAcwCMwEAAcwBMwFmAQABzAEzAZkBAAHMATMBzAEAAcwBMwH/AQABzAFmAgABzAFm + ATMBAAGZAmYBAAHMAWYBmQEAAcwBZgHMAQABmQFmAf8BAAHMAZkCAAHMAZkBMwEAAcwBmQFmAQABzAKZ + AQABzAGZAcwBAAHMAZkB/wEAAswCAALMATMBAALMAWYBAALMAZkBAAPMAQACzAH/AQABzAH/AgABzAH/ + ATMBAAGZAf8BZgEAAcwB/wGZAQABzAH/AcwBAAHMAv8BAAHMAQABMwEAAf8BAAFmAQAB/wEAAZkBAAHM + ATMCAAH/AjMBAAH/ATMBZgEAAf8BMwGZAQAB/wEzAcwBAAH/ATMB/wEAAf8BZgIAAf8BZgEzAQABzAJm + AQAB/wFmAZkBAAH/AWYBzAEAAcwBZgH/AQAB/wGZAgAB/wGZATMBAAH/AZkBZgEAAf8CmQEAAf8BmQHM + AQAB/wGZAf8BAAH/AcwCAAH/AcwBMwEAAf8BzAFmAQAB/wHMAZkBAAH/AswBAAH/AcwB/wEAAv8BMwEA + AcwB/wFmAQAC/wGZAQAC/wHMAQACZgH/AQABZgH/AWYBAAFmAv8BAAH/AmYBAAH/AWYB/wEAAv8BZgEA + ASEBAAGlAQADXwEAA3cBAAOGAQADlgEAA8sBAAOyAQAD1wEAA90BAAPjAQAD6gEAA/EBAAP4AQAB8AH7 + Af8BAAGkAqABAAOAAwAB/wIAAf8DAAL/AQAB/wMAAf8BAAH/AQAC/wIAA/9BAAH0DvMB9DAAArwDGgIb + AsMCGwQaAQcwAAHzARoF5QFSAXMEegFZAaAB8DEAAfABoAE4AlkBOAEiAUMFWQHwAf8xAAH/AfABXgE4 + AVkBOAFZAVgEOAGaAfIzAAHyAcMB+wFZAV4BSgETAVgCOAFZAfAB/zMAAf8B8AHlAl4BFQERAVgCOAHD + AfM1AAH0AfYCXgESAUMBWAFeAeUB8DcAAfABoAFeAeoBFAFYAV4B9gH/NwAB/wH0AV4B6gETAVgBoAHx + OQAB8QGgAVgBeQHlARsB/zkAAf8B8AFeAfsBoAHyOwAB8wHDAV4BvAH/PAABvAEbAfR2AAFCAU0BPgcA + AT4DAAEoAwABQAMAARADAAEBAQABAQUAAYAXAAP/AQAC/x4AAYAHAAGAAQEGAAHAAQEGAAHAAQMGAAHg + AQcGAAHwAQcGAAHwAQ8GAAH4AQ8GAAH4AR8GAAH8AR8GAAH+AT8GAAL/BgAL +</value> + </data> <metadata name="tabbasic.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <value>True</value> </metadata> @@ -150,21 +195,6 @@ <metadata name="argumentspanel.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <value>True</value> </metadata> - <metadata name="tabcustom.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>True</value> - </metadata> - <metadata name="fieldslist.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>True</value> - </metadata> - <metadata name="filterfields.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>True</value> - </metadata> - <metadata name="label3.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>True</value> - </metadata> - <metadata name="argumentspanel.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>True</value> - </metadata> <metadata name="arg2.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <value>True</value> </metadata> @@ -195,34 +225,7 @@ <metadata name="arg4label.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <value>True</value> </metadata> - <metadata name="arg2.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>True</value> - </metadata> - <metadata name="arg1.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>True</value> - </metadata> - <metadata name="arg0.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>True</value> - </metadata> - <metadata name="arg3.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>True</value> - </metadata> - <metadata name="arg4.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>True</value> - </metadata> - <metadata name="arg1label.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>True</value> - </metadata> - <metadata name="arg0label.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>True</value> - </metadata> - <metadata name="arg3label.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>True</value> - </metadata> - <metadata name="arg2label.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>True</value> - </metadata> - <metadata name="arg4label.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <metadata name="tabcustom.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <value>True</value> </metadata> <metadata name="fieldslist.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">