diff --git a/Source/Plugins/BuilderModes/ClassicModes/LinedefsMode.cs b/Source/Plugins/BuilderModes/ClassicModes/LinedefsMode.cs index 7a32a19..6289e7d 100644 --- a/Source/Plugins/BuilderModes/ClassicModes/LinedefsMode.cs +++ b/Source/Plugins/BuilderModes/ClassicModes/LinedefsMode.cs @@ -621,7 +621,7 @@ namespace CodeImp.DoomBuilder.BuilderModes if(l != highlighted) { //toggle selected state - if(General.Interface.ShiftState ^ BuilderPlug.Me.AdditiveSelect) + if(General.Interface.ShiftState ^ BuilderPlug.Me.AdditivePaintSelect) l.Selected = true; else if(General.Interface.CtrlState) l.Selected = false; diff --git a/Source/Plugins/BuilderModes/ClassicModes/SectorsMode.cs b/Source/Plugins/BuilderModes/ClassicModes/SectorsMode.cs index e8c1235..d874261 100644 --- a/Source/Plugins/BuilderModes/ClassicModes/SectorsMode.cs +++ b/Source/Plugins/BuilderModes/ClassicModes/SectorsMode.cs @@ -1000,7 +1000,7 @@ namespace CodeImp.DoomBuilder.BuilderModes { //toggle selected state highlighted = s; - if(General.Interface.ShiftState ^ BuilderPlug.Me.AdditiveSelect) + if(General.Interface.ShiftState ^ BuilderPlug.Me.AdditivePaintSelect) SelectSector(highlighted, true, true); else if(General.Interface.CtrlState) SelectSector(highlighted, false, true); @@ -1095,7 +1095,7 @@ namespace CodeImp.DoomBuilder.BuilderModes { if(highlighted != null) { - if(General.Interface.ShiftState ^ BuilderPlug.Me.AdditiveSelect) + if(General.Interface.ShiftState ^ BuilderPlug.Me.AdditivePaintSelect) SelectSector(highlighted, true, true); else if(General.Interface.CtrlState) SelectSector(highlighted, false, true); diff --git a/Source/Plugins/BuilderModes/ClassicModes/ThingsMode.cs b/Source/Plugins/BuilderModes/ClassicModes/ThingsMode.cs index b5b9e14..4afbbf9 100644 --- a/Source/Plugins/BuilderModes/ClassicModes/ThingsMode.cs +++ b/Source/Plugins/BuilderModes/ClassicModes/ThingsMode.cs @@ -512,7 +512,7 @@ namespace CodeImp.DoomBuilder.BuilderModes if(t != highlighted) { //toggle selected state - if(General.Interface.ShiftState ^ BuilderPlug.Me.AdditiveSelect) + if(General.Interface.ShiftState ^ BuilderPlug.Me.AdditivePaintSelect) t.Selected = true; else if(General.Interface.CtrlState) t.Selected = false; diff --git a/Source/Plugins/BuilderModes/ClassicModes/VerticesMode.cs b/Source/Plugins/BuilderModes/ClassicModes/VerticesMode.cs index f2d1328..d794740 100644 --- a/Source/Plugins/BuilderModes/ClassicModes/VerticesMode.cs +++ b/Source/Plugins/BuilderModes/ClassicModes/VerticesMode.cs @@ -437,7 +437,7 @@ namespace CodeImp.DoomBuilder.BuilderModes if(v != highlighted) { //toggle selected state - if(General.Interface.ShiftState ^ BuilderPlug.Me.AdditiveSelect) + if(General.Interface.ShiftState ^ BuilderPlug.Me.AdditivePaintSelect) v.Selected = true; else if(General.Interface.CtrlState) v.Selected = false; diff --git a/Source/Plugins/BuilderModes/General/BuilderPlug.cs b/Source/Plugins/BuilderModes/General/BuilderPlug.cs index d3a2985..fc20ae3 100644 --- a/Source/Plugins/BuilderModes/General/BuilderPlug.cs +++ b/Source/Plugins/BuilderModes/General/BuilderPlug.cs @@ -104,8 +104,9 @@ namespace CodeImp.DoomBuilder.BuilderModes private bool editnewthing; private bool editnewsector; private bool additiveselect; + private bool additivepaintselect; + private bool autoclearselection; private bool dontusenodes; - private bool autoclearselection; private bool visualmodeclearselection; private string copiedtexture; private string copiedflat; @@ -155,8 +156,9 @@ namespace CodeImp.DoomBuilder.BuilderModes public bool EditNewThing { get { return editnewthing; } } public bool EditNewSector { get { return editnewsector; } } public bool AdditiveSelect { get { return additiveselect; } } + public bool AdditivePaintSelect { get { return additivepaintselect; } } + public bool AutoClearSelection { get { return autoclearselection; } } public bool DontUseNodes { get { return dontusenodes; } } - public bool AutoClearSelection { get { return autoclearselection; } } public bool VisualModeClearSelection { get { return visualmodeclearselection; } } public string CopiedTexture { get { return copiedtexture; } set { copiedtexture = value; } } public string CopiedFlat { get { return copiedflat; } set { copiedflat = value; } } @@ -281,8 +283,9 @@ namespace CodeImp.DoomBuilder.BuilderModes editnewthing = General.Settings.ReadPluginSetting("editnewthing", true); editnewsector = General.Settings.ReadPluginSetting("editnewsector", false); additiveselect = General.Settings.ReadPluginSetting("additiveselect", false); + additivepaintselect = General.Settings.ReadPluginSetting("additivepaintselect", additiveselect); // use the same value as additiveselect by default + autoclearselection = General.Settings.ReadPluginSetting("autoclearselection", false); dontusenodes = General.Settings.ReadPluginSetting("dontusenodes", false); - autoclearselection = General.Settings.ReadPluginSetting("autoclearselection", false); visualmodeclearselection = General.Settings.ReadPluginSetting("visualmodeclearselection", false); stitchrange = General.Settings.ReadPluginSetting("stitchrange", 20); highlightrange = General.Settings.ReadPluginSetting("highlightrange", 20); diff --git a/Source/Plugins/BuilderModes/Interface/PreferencesForm.Designer.cs b/Source/Plugins/BuilderModes/Interface/PreferencesForm.Designer.cs index f973700..a1d9b25 100644 --- a/Source/Plugins/BuilderModes/Interface/PreferencesForm.Designer.cs +++ b/Source/Plugins/BuilderModes/Interface/PreferencesForm.Designer.cs @@ -28,576 +28,638 @@ namespace CodeImp.DoomBuilder.BuilderModes /// private void InitializeComponent() { - this.tabs = new System.Windows.Forms.TabControl(); - this.taboptions = new System.Windows.Forms.TabPage(); - this.groupBox4 = new System.Windows.Forms.GroupBox(); - this.label15 = new System.Windows.Forms.Label(); - this.label14 = new System.Windows.Forms.Label(); - this.defaultfloorheight = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox(); - this.label13 = new System.Windows.Forms.Label(); - this.defaultceilheight = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox(); - this.label12 = new System.Windows.Forms.Label(); - this.defaultbrightness = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox(); - this.label11 = new System.Windows.Forms.Label(); - this.groupBox3 = new System.Windows.Forms.GroupBox(); - this.autodrawonedit = new System.Windows.Forms.CheckBox(); - this.syncSelection = new System.Windows.Forms.CheckBox(); - this.dontMoveGeometryOutsideBounds = new System.Windows.Forms.CheckBox(); - this.autoaligntexturesoncreate = new System.Windows.Forms.CheckBox(); - this.autodragonpaste = new System.Windows.Forms.CheckBox(); - this.visualmodeclearselection = new System.Windows.Forms.CheckBox(); - this.autoclearselection = new System.Windows.Forms.CheckBox(); - this.editnewthing = new System.Windows.Forms.CheckBox(); - this.editnewsector = new System.Windows.Forms.CheckBox(); - this.additiveselect = new System.Windows.Forms.CheckBox(); - this.dontusenodes = new System.Windows.Forms.CheckBox(); - this.groupBox2 = new System.Windows.Forms.GroupBox(); - this.splitlinedefsrange = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox(); - this.stitchrange = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox(); - this.highlightthingsrange = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox(); - this.highlightrange = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox(); - this.label8 = new System.Windows.Forms.Label(); - this.label2 = new System.Windows.Forms.Label(); - this.label3 = new System.Windows.Forms.Label(); - this.label9 = new System.Windows.Forms.Label(); - this.label5 = new System.Windows.Forms.Label(); - this.label6 = new System.Windows.Forms.Label(); - this.label4 = new System.Windows.Forms.Label(); - this.label7 = new System.Windows.Forms.Label(); - this.groupBox1 = new System.Windows.Forms.GroupBox(); - this.splitbehavior = new System.Windows.Forms.ComboBox(); - this.label10 = new System.Windows.Forms.Label(); - this.label1 = new System.Windows.Forms.Label(); - this.heightbysidedef = new System.Windows.Forms.ComboBox(); - this.tabs.SuspendLayout(); - this.taboptions.SuspendLayout(); - this.groupBox4.SuspendLayout(); - this.groupBox3.SuspendLayout(); - this.groupBox2.SuspendLayout(); - this.groupBox1.SuspendLayout(); - this.SuspendLayout(); - // - // tabs - // - this.tabs.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + this.tabs = new System.Windows.Forms.TabControl(); + this.taboptions = new System.Windows.Forms.TabPage(); + this.groupBox4 = new System.Windows.Forms.GroupBox(); + this.label15 = new System.Windows.Forms.Label(); + this.label14 = new System.Windows.Forms.Label(); + this.defaultfloorheight = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox(); + this.label13 = new System.Windows.Forms.Label(); + this.defaultceilheight = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox(); + this.label12 = new System.Windows.Forms.Label(); + this.defaultbrightness = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox(); + this.label11 = new System.Windows.Forms.Label(); + this.groupBox3 = new System.Windows.Forms.GroupBox(); + this.additivepaintselect = new System.Windows.Forms.CheckBox(); + this.autodrawonedit = new System.Windows.Forms.CheckBox(); + this.syncSelection = new System.Windows.Forms.CheckBox(); + this.dontMoveGeometryOutsideBounds = new System.Windows.Forms.CheckBox(); + this.autoaligntexturesoncreate = new System.Windows.Forms.CheckBox(); + this.autodragonpaste = new System.Windows.Forms.CheckBox(); + this.visualmodeclearselection = new System.Windows.Forms.CheckBox(); + this.autoclearselection = new System.Windows.Forms.CheckBox(); + this.editnewthing = new System.Windows.Forms.CheckBox(); + this.editnewsector = new System.Windows.Forms.CheckBox(); + this.additiveselect = new System.Windows.Forms.CheckBox(); + this.dontusenodes = new System.Windows.Forms.CheckBox(); + this.groupBox2 = new System.Windows.Forms.GroupBox(); + this.splitlinedefsrange = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox(); + this.stitchrange = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox(); + this.highlightthingsrange = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox(); + this.highlightrange = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox(); + this.label8 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.label3 = new System.Windows.Forms.Label(); + this.label9 = new System.Windows.Forms.Label(); + this.label5 = new System.Windows.Forms.Label(); + this.label6 = new System.Windows.Forms.Label(); + this.label4 = new System.Windows.Forms.Label(); + this.label7 = new System.Windows.Forms.Label(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.splitbehavior = new System.Windows.Forms.ComboBox(); + this.label10 = new System.Windows.Forms.Label(); + this.label1 = new System.Windows.Forms.Label(); + this.heightbysidedef = new System.Windows.Forms.ComboBox(); + this.switchviewmodes = new System.Windows.Forms.CheckBox(); + this.mouseselectionthreshold = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox(); + this.label16 = new System.Windows.Forms.Label(); + this.label17 = new System.Windows.Forms.Label(); + this.tabs.SuspendLayout(); + this.taboptions.SuspendLayout(); + this.groupBox4.SuspendLayout(); + this.groupBox3.SuspendLayout(); + this.groupBox2.SuspendLayout(); + this.groupBox1.SuspendLayout(); + this.SuspendLayout(); + // + // tabs + // + this.tabs.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.tabs.Controls.Add(this.taboptions); - this.tabs.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204))); - this.tabs.Location = new System.Drawing.Point(12, 12); - this.tabs.Name = "tabs"; - this.tabs.Padding = new System.Drawing.Point(24, 3); - this.tabs.SelectedIndex = 0; - this.tabs.Size = new System.Drawing.Size(677, 449); - this.tabs.TabIndex = 0; - // - // taboptions - // - this.taboptions.Controls.Add(this.groupBox4); - this.taboptions.Controls.Add(this.groupBox3); - this.taboptions.Controls.Add(this.groupBox2); - this.taboptions.Controls.Add(this.groupBox1); - this.taboptions.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.taboptions.Location = new System.Drawing.Point(4, 22); - this.taboptions.Name = "taboptions"; - this.taboptions.Padding = new System.Windows.Forms.Padding(3); - this.taboptions.Size = new System.Drawing.Size(669, 423); - this.taboptions.TabIndex = 0; - this.taboptions.Text = "Editing"; - this.taboptions.UseVisualStyleBackColor = true; - // - // groupBox4 - // - this.groupBox4.Controls.Add(this.label15); - this.groupBox4.Controls.Add(this.label14); - this.groupBox4.Controls.Add(this.defaultfloorheight); - this.groupBox4.Controls.Add(this.label13); - this.groupBox4.Controls.Add(this.defaultceilheight); - this.groupBox4.Controls.Add(this.label12); - this.groupBox4.Controls.Add(this.defaultbrightness); - this.groupBox4.Controls.Add(this.label11); - this.groupBox4.Location = new System.Drawing.Point(6, 261); - this.groupBox4.Name = "groupBox4"; - this.groupBox4.Size = new System.Drawing.Size(272, 130); - this.groupBox4.TabIndex = 19; - this.groupBox4.TabStop = false; - this.groupBox4.Text = " Default sector settings"; - // - // label15 - // - this.label15.AutoSize = true; - this.label15.Location = new System.Drawing.Point(221, 28); - this.label15.Name = "label15"; - this.label15.Size = new System.Drawing.Size(27, 13); - this.label15.TabIndex = 26; - this.label15.Text = "m.u."; - // - // label14 - // - this.label14.AutoSize = true; - this.label14.Location = new System.Drawing.Point(221, 58); - this.label14.Name = "label14"; - this.label14.Size = new System.Drawing.Size(27, 13); - this.label14.TabIndex = 20; - this.label14.Text = "m.u."; - // - // defaultfloorheight - // - this.defaultfloorheight.AllowDecimal = false; - this.defaultfloorheight.AllowNegative = true; - this.defaultfloorheight.AllowRelative = false; - this.defaultfloorheight.ButtonStep = 5; - this.defaultfloorheight.ButtonStepBig = 10F; - this.defaultfloorheight.ButtonStepFloat = 1F; - this.defaultfloorheight.ButtonStepSmall = 0.1F; - this.defaultfloorheight.ButtonStepsUseModifierKeys = false; - this.defaultfloorheight.ButtonStepsWrapAround = false; - this.defaultfloorheight.Location = new System.Drawing.Point(156, 23); - this.defaultfloorheight.Name = "defaultfloorheight"; - this.defaultfloorheight.Size = new System.Drawing.Size(59, 24); - this.defaultfloorheight.StepValues = null; - this.defaultfloorheight.TabIndex = 25; - // - // label13 - // - this.label13.Location = new System.Drawing.Point(41, 28); - this.label13.Name = "label13"; - this.label13.Size = new System.Drawing.Size(110, 14); - this.label13.TabIndex = 24; - this.label13.Text = "Default floor height:"; - this.label13.TextAlign = System.Drawing.ContentAlignment.TopRight; - // - // defaultceilheight - // - this.defaultceilheight.AllowDecimal = false; - this.defaultceilheight.AllowNegative = true; - this.defaultceilheight.AllowRelative = false; - this.defaultceilheight.ButtonStep = 5; - this.defaultceilheight.ButtonStepBig = 10F; - this.defaultceilheight.ButtonStepFloat = 1F; - this.defaultceilheight.ButtonStepSmall = 0.1F; - this.defaultceilheight.ButtonStepsUseModifierKeys = false; - this.defaultceilheight.ButtonStepsWrapAround = false; - this.defaultceilheight.Location = new System.Drawing.Point(156, 53); - this.defaultceilheight.Name = "defaultceilheight"; - this.defaultceilheight.Size = new System.Drawing.Size(59, 24); - this.defaultceilheight.StepValues = null; - this.defaultceilheight.TabIndex = 23; - // - // label12 - // - this.label12.Location = new System.Drawing.Point(41, 58); - this.label12.Name = "label12"; - this.label12.Size = new System.Drawing.Size(110, 14); - this.label12.TabIndex = 22; - this.label12.Text = "Default ceiling height:"; - this.label12.TextAlign = System.Drawing.ContentAlignment.TopRight; - // - // defaultbrightness - // - this.defaultbrightness.AllowDecimal = false; - this.defaultbrightness.AllowNegative = false; - this.defaultbrightness.AllowRelative = false; - this.defaultbrightness.ButtonStep = 5; - this.defaultbrightness.ButtonStepBig = 10F; - this.defaultbrightness.ButtonStepFloat = 1F; - this.defaultbrightness.ButtonStepSmall = 0.1F; - this.defaultbrightness.ButtonStepsUseModifierKeys = false; - this.defaultbrightness.ButtonStepsWrapAround = false; - this.defaultbrightness.Location = new System.Drawing.Point(156, 83); - this.defaultbrightness.Name = "defaultbrightness"; - this.defaultbrightness.Size = new System.Drawing.Size(59, 24); - this.defaultbrightness.StepValues = null; - this.defaultbrightness.TabIndex = 21; - // - // label11 - // - this.label11.Location = new System.Drawing.Point(41, 88); - this.label11.Name = "label11"; - this.label11.Size = new System.Drawing.Size(110, 14); - this.label11.TabIndex = 20; - this.label11.Text = "Default brightness:"; - this.label11.TextAlign = System.Drawing.ContentAlignment.TopRight; - // - // groupBox3 - // - this.groupBox3.Controls.Add(this.autodrawonedit); - this.groupBox3.Controls.Add(this.syncSelection); - this.groupBox3.Controls.Add(this.dontMoveGeometryOutsideBounds); - this.groupBox3.Controls.Add(this.autoaligntexturesoncreate); - this.groupBox3.Controls.Add(this.autodragonpaste); - this.groupBox3.Controls.Add(this.visualmodeclearselection); - this.groupBox3.Controls.Add(this.autoclearselection); - this.groupBox3.Controls.Add(this.editnewthing); - this.groupBox3.Controls.Add(this.editnewsector); - this.groupBox3.Controls.Add(this.additiveselect); - this.groupBox3.Controls.Add(this.dontusenodes); - this.groupBox3.Location = new System.Drawing.Point(284, 104); - this.groupBox3.Name = "groupBox3"; - this.groupBox3.Size = new System.Drawing.Size(379, 312); - this.groupBox3.TabIndex = 18; - this.groupBox3.TabStop = false; - this.groupBox3.Text = " Options "; - // - // autodrawonedit - // - this.autodrawonedit.AutoSize = true; - this.autodrawonedit.Location = new System.Drawing.Point(13, 24); - this.autodrawonedit.Name = "autodrawonedit"; - this.autodrawonedit.Size = new System.Drawing.Size(346, 17); - this.autodrawonedit.TabIndex = 11; - this.autodrawonedit.Text = "Start drawing when Edit pressed over empty space in Classic modes"; - this.autodrawonedit.UseVisualStyleBackColor = true; - // - // syncSelection - // - this.syncSelection.AutoSize = true; - this.syncSelection.Location = new System.Drawing.Point(13, 249); - this.syncSelection.Name = "syncSelection"; - this.syncSelection.Size = new System.Drawing.Size(295, 17); - this.syncSelection.TabIndex = 10; - this.syncSelection.Text = "Synchronize selection between Visual and Classic modes"; - this.syncSelection.UseVisualStyleBackColor = true; - // - // dontMoveGeometryOutsideBounds - // - this.dontMoveGeometryOutsideBounds.AutoSize = true; - this.dontMoveGeometryOutsideBounds.Location = new System.Drawing.Point(13, 224); - this.dontMoveGeometryOutsideBounds.Name = "dontMoveGeometryOutsideBounds"; - this.dontMoveGeometryOutsideBounds.Size = new System.Drawing.Size(323, 17); - this.dontMoveGeometryOutsideBounds.TabIndex = 9; - this.dontMoveGeometryOutsideBounds.Text = "Don\'t move selection if any part of it is outside of map boundary"; - this.dontMoveGeometryOutsideBounds.UseVisualStyleBackColor = true; - // - // autoaligntexturesoncreate - // - this.autoaligntexturesoncreate.AutoSize = true; - this.autoaligntexturesoncreate.Location = new System.Drawing.Point(13, 199); - this.autoaligntexturesoncreate.Name = "autoaligntexturesoncreate"; - this.autoaligntexturesoncreate.Size = new System.Drawing.Size(233, 17); - this.autoaligntexturesoncreate.TabIndex = 7; - this.autoaligntexturesoncreate.Text = "Auto-align textures of newly created linedefs"; - this.autoaligntexturesoncreate.UseVisualStyleBackColor = true; - // - // autodragonpaste - // - this.autodragonpaste.AutoSize = true; - this.autodragonpaste.Location = new System.Drawing.Point(13, 174); - this.autodragonpaste.Name = "autodragonpaste"; - this.autodragonpaste.Size = new System.Drawing.Size(202, 17); - this.autodragonpaste.TabIndex = 6; - this.autodragonpaste.Text = "Drag selection automatically on paste"; - this.autodragonpaste.UseVisualStyleBackColor = true; - // - // visualmodeclearselection - // - this.visualmodeclearselection.AutoSize = true; - this.visualmodeclearselection.Location = new System.Drawing.Point(13, 149); - this.visualmodeclearselection.Name = "visualmodeclearselection"; - this.visualmodeclearselection.Size = new System.Drawing.Size(216, 17); - this.visualmodeclearselection.TabIndex = 5; - this.visualmodeclearselection.Text = "Automatic clear selection in Visual Mode"; - this.visualmodeclearselection.UseVisualStyleBackColor = true; - // - // autoclearselection - // - this.autoclearselection.AutoSize = true; - this.autoclearselection.Location = new System.Drawing.Point(13, 124); - this.autoclearselection.Name = "autoclearselection"; - this.autoclearselection.Size = new System.Drawing.Size(226, 17); - this.autoclearselection.TabIndex = 4; - this.autoclearselection.Text = "Automatic clear selection in Classic Modes"; - this.autoclearselection.UseVisualStyleBackColor = true; - // - // editnewthing - // - this.editnewthing.AutoSize = true; - this.editnewthing.Location = new System.Drawing.Point(13, 49); - this.editnewthing.Name = "editnewthing"; - this.editnewthing.Size = new System.Drawing.Size(248, 17); - this.editnewthing.TabIndex = 1; - this.editnewthing.Text = "Edit thing properties when inserting a new thing"; - this.editnewthing.UseVisualStyleBackColor = true; - // - // editnewsector - // - this.editnewsector.AutoSize = true; - this.editnewsector.Location = new System.Drawing.Point(13, 74); - this.editnewsector.Name = "editnewsector"; - this.editnewsector.Size = new System.Drawing.Size(258, 17); - this.editnewsector.TabIndex = 2; - this.editnewsector.Text = "Edit sector properties when drawing a new sector"; - this.editnewsector.UseVisualStyleBackColor = true; - // - // additiveselect - // - this.additiveselect.AutoSize = true; - this.additiveselect.Location = new System.Drawing.Point(13, 99); - this.additiveselect.Name = "additiveselect"; - this.additiveselect.Size = new System.Drawing.Size(205, 17); - this.additiveselect.TabIndex = 3; - this.additiveselect.Text = "Additive selecting without holding shift"; - this.additiveselect.UseVisualStyleBackColor = true; - // - // dontusenodes - // - this.dontusenodes.AutoSize = true; - this.dontusenodes.Location = new System.Drawing.Point(13, 274); - this.dontusenodes.Name = "dontusenodes"; - this.dontusenodes.Size = new System.Drawing.Size(349, 17); - this.dontusenodes.TabIndex = 12; - this.dontusenodes.Text = "Use blockmap instead of nodes in Visual Mode (warning: inaccurate)"; - this.dontusenodes.UseVisualStyleBackColor = true; - // - // groupBox2 - // - this.groupBox2.Controls.Add(this.splitlinedefsrange); - this.groupBox2.Controls.Add(this.stitchrange); - this.groupBox2.Controls.Add(this.highlightthingsrange); - this.groupBox2.Controls.Add(this.highlightrange); - this.groupBox2.Controls.Add(this.label8); - this.groupBox2.Controls.Add(this.label2); - this.groupBox2.Controls.Add(this.label3); - this.groupBox2.Controls.Add(this.label9); - this.groupBox2.Controls.Add(this.label5); - this.groupBox2.Controls.Add(this.label6); - this.groupBox2.Controls.Add(this.label4); - this.groupBox2.Controls.Add(this.label7); - this.groupBox2.Location = new System.Drawing.Point(6, 104); - this.groupBox2.Name = "groupBox2"; - this.groupBox2.Size = new System.Drawing.Size(272, 151); - this.groupBox2.TabIndex = 17; - this.groupBox2.TabStop = false; - this.groupBox2.Text = " Ranges "; - // - // splitlinedefsrange - // - this.splitlinedefsrange.AllowDecimal = false; - this.splitlinedefsrange.AllowNegative = false; - this.splitlinedefsrange.AllowRelative = false; - this.splitlinedefsrange.ButtonStep = 5; - this.splitlinedefsrange.ButtonStepBig = 10F; - this.splitlinedefsrange.ButtonStepFloat = 1F; - this.splitlinedefsrange.ButtonStepSmall = 0.1F; - this.splitlinedefsrange.ButtonStepsUseModifierKeys = false; - this.splitlinedefsrange.ButtonStepsWrapAround = false; - this.splitlinedefsrange.Location = new System.Drawing.Point(156, 111); - this.splitlinedefsrange.Name = "splitlinedefsrange"; - this.splitlinedefsrange.Size = new System.Drawing.Size(59, 24); - this.splitlinedefsrange.StepValues = null; - this.splitlinedefsrange.TabIndex = 19; - // - // stitchrange - // - this.stitchrange.AllowDecimal = false; - this.stitchrange.AllowNegative = false; - this.stitchrange.AllowRelative = false; - this.stitchrange.ButtonStep = 5; - this.stitchrange.ButtonStepBig = 10F; - this.stitchrange.ButtonStepFloat = 1F; - this.stitchrange.ButtonStepSmall = 0.1F; - this.stitchrange.ButtonStepsUseModifierKeys = false; - this.stitchrange.ButtonStepsWrapAround = false; - this.stitchrange.Location = new System.Drawing.Point(156, 81); - this.stitchrange.Name = "stitchrange"; - this.stitchrange.Size = new System.Drawing.Size(59, 24); - this.stitchrange.StepValues = null; - this.stitchrange.TabIndex = 18; - // - // highlightthingsrange - // - this.highlightthingsrange.AllowDecimal = false; - this.highlightthingsrange.AllowNegative = false; - this.highlightthingsrange.AllowRelative = false; - this.highlightthingsrange.ButtonStep = 5; - this.highlightthingsrange.ButtonStepBig = 10F; - this.highlightthingsrange.ButtonStepFloat = 1F; - this.highlightthingsrange.ButtonStepSmall = 0.1F; - this.highlightthingsrange.ButtonStepsUseModifierKeys = false; - this.highlightthingsrange.ButtonStepsWrapAround = false; - this.highlightthingsrange.Location = new System.Drawing.Point(156, 51); - this.highlightthingsrange.Name = "highlightthingsrange"; - this.highlightthingsrange.Size = new System.Drawing.Size(59, 24); - this.highlightthingsrange.StepValues = null; - this.highlightthingsrange.TabIndex = 17; - // - // highlightrange - // - this.highlightrange.AllowDecimal = false; - this.highlightrange.AllowNegative = false; - this.highlightrange.AllowRelative = false; - this.highlightrange.ButtonStep = 5; - this.highlightrange.ButtonStepBig = 10F; - this.highlightrange.ButtonStepFloat = 1F; - this.highlightrange.ButtonStepSmall = 0.1F; - this.highlightrange.ButtonStepsUseModifierKeys = false; - this.highlightrange.ButtonStepsWrapAround = false; - this.highlightrange.Location = new System.Drawing.Point(156, 21); - this.highlightrange.Name = "highlightrange"; - this.highlightrange.Size = new System.Drawing.Size(59, 24); - this.highlightrange.StepValues = null; - this.highlightrange.TabIndex = 16; - // - // label8 - // - this.label8.AutoSize = true; - this.label8.Location = new System.Drawing.Point(221, 116); - this.label8.Name = "label8"; - this.label8.Size = new System.Drawing.Size(33, 13); - this.label8.TabIndex = 15; - this.label8.Text = "pixels"; - // - // label2 - // - this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(33, 86); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(113, 13); - this.label2.TabIndex = 4; - this.label2.Text = "Stitch geometry within:"; - this.label2.TextAlign = System.Drawing.ContentAlignment.TopRight; - // - // label3 - // - this.label3.AutoSize = true; - this.label3.Location = new System.Drawing.Point(221, 86); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(33, 13); - this.label3.TabIndex = 6; - this.label3.Text = "pixels"; - // - // label9 - // - this.label9.AutoSize = true; - this.label9.Location = new System.Drawing.Point(47, 115); - this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(99, 13); - this.label9.TabIndex = 13; - this.label9.Text = "Split linedefs within:"; - this.label9.TextAlign = System.Drawing.ContentAlignment.TopRight; - // - // label5 - // - this.label5.AutoSize = true; - this.label5.Location = new System.Drawing.Point(20, 26); - this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(127, 13); - this.label5.TabIndex = 7; - this.label5.Text = "Highlight geometry within:"; - this.label5.TextAlign = System.Drawing.ContentAlignment.TopRight; - // - // label6 - // - this.label6.AutoSize = true; - this.label6.Location = new System.Drawing.Point(221, 55); - this.label6.Name = "label6"; - this.label6.Size = new System.Drawing.Size(33, 13); - this.label6.TabIndex = 12; - this.label6.Text = "pixels"; - // - // label4 - // - this.label4.AutoSize = true; - this.label4.Location = new System.Drawing.Point(221, 26); - this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(33, 13); - this.label4.TabIndex = 9; - this.label4.Text = "pixels"; - // - // label7 - // - this.label7.AutoSize = true; - this.label7.Location = new System.Drawing.Point(36, 56); - this.label7.Name = "label7"; - this.label7.Size = new System.Drawing.Size(112, 13); - this.label7.TabIndex = 10; - this.label7.Text = "Highlight things within:"; - this.label7.TextAlign = System.Drawing.ContentAlignment.TopRight; - // - // groupBox1 - // - this.groupBox1.Controls.Add(this.splitbehavior); - this.groupBox1.Controls.Add(this.label10); - this.groupBox1.Controls.Add(this.label1); - this.groupBox1.Controls.Add(this.heightbysidedef); - this.groupBox1.Location = new System.Drawing.Point(6, 6); - this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(657, 92); - this.groupBox1.TabIndex = 16; - this.groupBox1.TabStop = false; - this.groupBox1.Text = " Behavior "; - // - // splitbehavior - // - this.splitbehavior.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.splitbehavior.FormattingEnabled = true; - this.splitbehavior.Items.AddRange(new object[] { + this.tabs.Controls.Add(this.taboptions); + this.tabs.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204))); + this.tabs.Location = new System.Drawing.Point(12, 12); + this.tabs.Name = "tabs"; + this.tabs.Padding = new System.Drawing.Point(24, 3); + this.tabs.SelectedIndex = 0; + this.tabs.Size = new System.Drawing.Size(685, 561); + this.tabs.TabIndex = 0; + // + // taboptions + // + this.taboptions.Controls.Add(this.groupBox4); + this.taboptions.Controls.Add(this.groupBox3); + this.taboptions.Controls.Add(this.groupBox2); + this.taboptions.Controls.Add(this.groupBox1); + this.taboptions.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.taboptions.Location = new System.Drawing.Point(4, 22); + this.taboptions.Name = "taboptions"; + this.taboptions.Padding = new System.Windows.Forms.Padding(3); + this.taboptions.Size = new System.Drawing.Size(677, 535); + this.taboptions.TabIndex = 0; + this.taboptions.Text = "Editing"; + this.taboptions.UseVisualStyleBackColor = true; + // + // groupBox4 + // + this.groupBox4.Controls.Add(this.label15); + this.groupBox4.Controls.Add(this.label14); + this.groupBox4.Controls.Add(this.defaultfloorheight); + this.groupBox4.Controls.Add(this.label13); + this.groupBox4.Controls.Add(this.defaultceilheight); + this.groupBox4.Controls.Add(this.label12); + this.groupBox4.Controls.Add(this.defaultbrightness); + this.groupBox4.Controls.Add(this.label11); + this.groupBox4.Location = new System.Drawing.Point(6, 261); + this.groupBox4.Name = "groupBox4"; + this.groupBox4.Size = new System.Drawing.Size(272, 144); + this.groupBox4.TabIndex = 19; + this.groupBox4.TabStop = false; + this.groupBox4.Text = " Default sector settings"; + // + // label15 + // + this.label15.AutoSize = true; + this.label15.Location = new System.Drawing.Point(218, 37); + this.label15.Name = "label15"; + this.label15.Size = new System.Drawing.Size(27, 13); + this.label15.TabIndex = 26; + this.label15.Text = "m.u."; + // + // label14 + // + this.label14.AutoSize = true; + this.label14.Location = new System.Drawing.Point(218, 67); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(27, 13); + this.label14.TabIndex = 20; + this.label14.Text = "m.u."; + // + // defaultfloorheight + // + this.defaultfloorheight.AllowDecimal = false; + this.defaultfloorheight.AllowNegative = true; + this.defaultfloorheight.AllowRelative = false; + this.defaultfloorheight.ButtonStep = 5; + this.defaultfloorheight.ButtonStepBig = 10F; + this.defaultfloorheight.ButtonStepFloat = 1F; + this.defaultfloorheight.ButtonStepSmall = 0.1F; + this.defaultfloorheight.ButtonStepsUseModifierKeys = false; + this.defaultfloorheight.ButtonStepsWrapAround = false; + this.defaultfloorheight.Location = new System.Drawing.Point(153, 32); + this.defaultfloorheight.MaximumValue = 2147483647; + this.defaultfloorheight.Name = "defaultfloorheight"; + this.defaultfloorheight.Size = new System.Drawing.Size(59, 24); + this.defaultfloorheight.StepValues = null; + this.defaultfloorheight.TabIndex = 25; + // + // label13 + // + this.label13.Location = new System.Drawing.Point(38, 37); + this.label13.Name = "label13"; + this.label13.Size = new System.Drawing.Size(110, 14); + this.label13.TabIndex = 24; + this.label13.Text = "Default floor height:"; + this.label13.TextAlign = System.Drawing.ContentAlignment.TopRight; + // + // defaultceilheight + // + this.defaultceilheight.AllowDecimal = false; + this.defaultceilheight.AllowNegative = true; + this.defaultceilheight.AllowRelative = false; + this.defaultceilheight.ButtonStep = 5; + this.defaultceilheight.ButtonStepBig = 10F; + this.defaultceilheight.ButtonStepFloat = 1F; + this.defaultceilheight.ButtonStepSmall = 0.1F; + this.defaultceilheight.ButtonStepsUseModifierKeys = false; + this.defaultceilheight.ButtonStepsWrapAround = false; + this.defaultceilheight.Location = new System.Drawing.Point(153, 62); + this.defaultceilheight.MaximumValue = 2147483647; + this.defaultceilheight.Name = "defaultceilheight"; + this.defaultceilheight.Size = new System.Drawing.Size(59, 24); + this.defaultceilheight.StepValues = null; + this.defaultceilheight.TabIndex = 23; + // + // label12 + // + this.label12.Location = new System.Drawing.Point(38, 67); + this.label12.Name = "label12"; + this.label12.Size = new System.Drawing.Size(110, 14); + this.label12.TabIndex = 22; + this.label12.Text = "Default ceiling height:"; + this.label12.TextAlign = System.Drawing.ContentAlignment.TopRight; + // + // defaultbrightness + // + this.defaultbrightness.AllowDecimal = false; + this.defaultbrightness.AllowNegative = false; + this.defaultbrightness.AllowRelative = false; + this.defaultbrightness.ButtonStep = 5; + this.defaultbrightness.ButtonStepBig = 10F; + this.defaultbrightness.ButtonStepFloat = 1F; + this.defaultbrightness.ButtonStepSmall = 0.1F; + this.defaultbrightness.ButtonStepsUseModifierKeys = false; + this.defaultbrightness.ButtonStepsWrapAround = false; + this.defaultbrightness.Location = new System.Drawing.Point(153, 92); + this.defaultbrightness.MaximumValue = 2147483647; + this.defaultbrightness.Name = "defaultbrightness"; + this.defaultbrightness.Size = new System.Drawing.Size(59, 24); + this.defaultbrightness.StepValues = null; + this.defaultbrightness.TabIndex = 21; + // + // label11 + // + this.label11.Location = new System.Drawing.Point(38, 97); + this.label11.Name = "label11"; + this.label11.Size = new System.Drawing.Size(110, 14); + this.label11.TabIndex = 20; + this.label11.Text = "Default brightness:"; + this.label11.TextAlign = System.Drawing.ContentAlignment.TopRight; + // + // groupBox3 + // + this.groupBox3.Controls.Add(this.additivepaintselect); + this.groupBox3.Controls.Add(this.autodrawonedit); + this.groupBox3.Controls.Add(this.syncSelection); + this.groupBox3.Controls.Add(this.dontMoveGeometryOutsideBounds); + this.groupBox3.Controls.Add(this.autoaligntexturesoncreate); + this.groupBox3.Controls.Add(this.autodragonpaste); + this.groupBox3.Controls.Add(this.visualmodeclearselection); + this.groupBox3.Controls.Add(this.autoclearselection); + this.groupBox3.Controls.Add(this.editnewthing); + this.groupBox3.Controls.Add(this.editnewsector); + this.groupBox3.Controls.Add(this.additiveselect); + this.groupBox3.Controls.Add(this.dontusenodes); + this.groupBox3.Location = new System.Drawing.Point(284, 104); + this.groupBox3.Name = "groupBox3"; + this.groupBox3.Size = new System.Drawing.Size(379, 327); + this.groupBox3.TabIndex = 18; + this.groupBox3.TabStop = false; + this.groupBox3.Text = " Options "; + // + // additivepaintselect + // + this.additivepaintselect.AutoSize = true; + this.additivepaintselect.Location = new System.Drawing.Point(13, 124); + this.additivepaintselect.Name = "additivepaintselect"; + this.additivepaintselect.Size = new System.Drawing.Size(233, 17); + this.additivepaintselect.TabIndex = 11; + this.additivepaintselect.Text = "Additive paint selecting without holding Shift"; + this.additivepaintselect.UseVisualStyleBackColor = true; + // + // autodrawonedit + // + this.autodrawonedit.AutoSize = true; + this.autodrawonedit.Location = new System.Drawing.Point(13, 24); + this.autodrawonedit.Name = "autodrawonedit"; + this.autodrawonedit.Size = new System.Drawing.Size(346, 17); + this.autodrawonedit.TabIndex = 11; + this.autodrawonedit.Text = "Start drawing when Edit pressed over empty space in Classic modes"; + this.autodrawonedit.UseVisualStyleBackColor = true; + // + // syncSelection + // + this.syncSelection.AutoSize = true; + this.syncSelection.Location = new System.Drawing.Point(13, 274); + this.syncSelection.Name = "syncSelection"; + this.syncSelection.Size = new System.Drawing.Size(295, 17); + this.syncSelection.TabIndex = 10; + this.syncSelection.Text = "Synchronize selection between Visual and Classic modes"; + this.syncSelection.UseVisualStyleBackColor = true; + // + // dontMoveGeometryOutsideBounds + // + this.dontMoveGeometryOutsideBounds.AutoSize = true; + this.dontMoveGeometryOutsideBounds.Location = new System.Drawing.Point(13, 249); + this.dontMoveGeometryOutsideBounds.Name = "dontMoveGeometryOutsideBounds"; + this.dontMoveGeometryOutsideBounds.Size = new System.Drawing.Size(323, 17); + this.dontMoveGeometryOutsideBounds.TabIndex = 9; + this.dontMoveGeometryOutsideBounds.Text = "Don\'t move selection if any part of it is outside of map boundary"; + this.dontMoveGeometryOutsideBounds.UseVisualStyleBackColor = true; + // + // autoaligntexturesoncreate + // + this.autoaligntexturesoncreate.AutoSize = true; + this.autoaligntexturesoncreate.Location = new System.Drawing.Point(13, 224); + this.autoaligntexturesoncreate.Name = "autoaligntexturesoncreate"; + this.autoaligntexturesoncreate.Size = new System.Drawing.Size(233, 17); + this.autoaligntexturesoncreate.TabIndex = 7; + this.autoaligntexturesoncreate.Text = "Auto-align textures of newly created linedefs"; + this.autoaligntexturesoncreate.UseVisualStyleBackColor = true; + // + // autodragonpaste + // + this.autodragonpaste.AutoSize = true; + this.autodragonpaste.Location = new System.Drawing.Point(13, 199); + this.autodragonpaste.Name = "autodragonpaste"; + this.autodragonpaste.Size = new System.Drawing.Size(202, 17); + this.autodragonpaste.TabIndex = 6; + this.autodragonpaste.Text = "Drag selection automatically on paste"; + this.autodragonpaste.UseVisualStyleBackColor = true; + // + // visualmodeclearselection + // + this.visualmodeclearselection.AutoSize = true; + this.visualmodeclearselection.Location = new System.Drawing.Point(13, 174); + this.visualmodeclearselection.Name = "visualmodeclearselection"; + this.visualmodeclearselection.Size = new System.Drawing.Size(216, 17); + this.visualmodeclearselection.TabIndex = 5; + this.visualmodeclearselection.Text = "Automatic clear selection in Visual Mode"; + this.visualmodeclearselection.UseVisualStyleBackColor = true; + // + // autoclearselection + // + this.autoclearselection.AutoSize = true; + this.autoclearselection.Location = new System.Drawing.Point(13, 149); + this.autoclearselection.Name = "autoclearselection"; + this.autoclearselection.Size = new System.Drawing.Size(226, 17); + this.autoclearselection.TabIndex = 4; + this.autoclearselection.Text = "Automatic clear selection in Classic Modes"; + this.autoclearselection.UseVisualStyleBackColor = true; + // + // editnewthing + // + this.editnewthing.AutoSize = true; + this.editnewthing.Location = new System.Drawing.Point(13, 49); + this.editnewthing.Name = "editnewthing"; + this.editnewthing.Size = new System.Drawing.Size(248, 17); + this.editnewthing.TabIndex = 1; + this.editnewthing.Text = "Edit thing properties when inserting a new thing"; + this.editnewthing.UseVisualStyleBackColor = true; + // + // editnewsector + // + this.editnewsector.AutoSize = true; + this.editnewsector.Location = new System.Drawing.Point(13, 74); + this.editnewsector.Name = "editnewsector"; + this.editnewsector.Size = new System.Drawing.Size(258, 17); + this.editnewsector.TabIndex = 2; + this.editnewsector.Text = "Edit sector properties when drawing a new sector"; + this.editnewsector.UseVisualStyleBackColor = true; + // + // additiveselect + // + this.additiveselect.AutoSize = true; + this.additiveselect.Location = new System.Drawing.Point(13, 99); + this.additiveselect.Name = "additiveselect"; + this.additiveselect.Size = new System.Drawing.Size(205, 17); + this.additiveselect.TabIndex = 3; + this.additiveselect.Text = "Additive selecting without holding shift"; + this.additiveselect.UseVisualStyleBackColor = true; + // + // dontusenodes + // + this.dontusenodes.AutoSize = true; + this.dontusenodes.Location = new System.Drawing.Point(13, 299); + this.dontusenodes.Name = "dontusenodes"; + this.dontusenodes.Size = new System.Drawing.Size(349, 17); + this.dontusenodes.TabIndex = 12; + this.dontusenodes.Text = "Use blockmap instead of nodes in Visual Mode (warning: inaccurate)"; + this.dontusenodes.UseVisualStyleBackColor = true; + // + // groupBox2 + // + this.groupBox2.Controls.Add(this.splitlinedefsrange); + this.groupBox2.Controls.Add(this.stitchrange); + this.groupBox2.Controls.Add(this.highlightthingsrange); + this.groupBox2.Controls.Add(this.highlightrange); + this.groupBox2.Controls.Add(this.label8); + this.groupBox2.Controls.Add(this.label2); + this.groupBox2.Controls.Add(this.label3); + this.groupBox2.Controls.Add(this.label9); + this.groupBox2.Controls.Add(this.label5); + this.groupBox2.Controls.Add(this.label6); + this.groupBox2.Controls.Add(this.label4); + this.groupBox2.Controls.Add(this.label7); + this.groupBox2.Location = new System.Drawing.Point(6, 104); + this.groupBox2.Name = "groupBox2"; + this.groupBox2.Size = new System.Drawing.Size(272, 151); + this.groupBox2.TabIndex = 17; + this.groupBox2.TabStop = false; + this.groupBox2.Text = " Ranges "; + // + // splitlinedefsrange + // + this.splitlinedefsrange.AllowDecimal = false; + this.splitlinedefsrange.AllowNegative = false; + this.splitlinedefsrange.AllowRelative = false; + this.splitlinedefsrange.ButtonStep = 5; + this.splitlinedefsrange.ButtonStepBig = 10F; + this.splitlinedefsrange.ButtonStepFloat = 1F; + this.splitlinedefsrange.ButtonStepSmall = 0.1F; + this.splitlinedefsrange.ButtonStepsUseModifierKeys = false; + this.splitlinedefsrange.ButtonStepsWrapAround = false; + this.splitlinedefsrange.Location = new System.Drawing.Point(156, 111); + this.splitlinedefsrange.MaximumValue = 2147483647; + this.splitlinedefsrange.Name = "splitlinedefsrange"; + this.splitlinedefsrange.Size = new System.Drawing.Size(59, 24); + this.splitlinedefsrange.StepValues = null; + this.splitlinedefsrange.TabIndex = 19; + // + // stitchrange + // + this.stitchrange.AllowDecimal = false; + this.stitchrange.AllowNegative = false; + this.stitchrange.AllowRelative = false; + this.stitchrange.ButtonStep = 5; + this.stitchrange.ButtonStepBig = 10F; + this.stitchrange.ButtonStepFloat = 1F; + this.stitchrange.ButtonStepSmall = 0.1F; + this.stitchrange.ButtonStepsUseModifierKeys = false; + this.stitchrange.ButtonStepsWrapAround = false; + this.stitchrange.Location = new System.Drawing.Point(156, 81); + this.stitchrange.MaximumValue = 2147483647; + this.stitchrange.Name = "stitchrange"; + this.stitchrange.Size = new System.Drawing.Size(59, 24); + this.stitchrange.StepValues = null; + this.stitchrange.TabIndex = 18; + // + // highlightthingsrange + // + this.highlightthingsrange.AllowDecimal = false; + this.highlightthingsrange.AllowNegative = false; + this.highlightthingsrange.AllowRelative = false; + this.highlightthingsrange.ButtonStep = 5; + this.highlightthingsrange.ButtonStepBig = 10F; + this.highlightthingsrange.ButtonStepFloat = 1F; + this.highlightthingsrange.ButtonStepSmall = 0.1F; + this.highlightthingsrange.ButtonStepsUseModifierKeys = false; + this.highlightthingsrange.ButtonStepsWrapAround = false; + this.highlightthingsrange.Location = new System.Drawing.Point(156, 51); + this.highlightthingsrange.MaximumValue = 2147483647; + this.highlightthingsrange.Name = "highlightthingsrange"; + this.highlightthingsrange.Size = new System.Drawing.Size(59, 24); + this.highlightthingsrange.StepValues = null; + this.highlightthingsrange.TabIndex = 17; + // + // highlightrange + // + this.highlightrange.AllowDecimal = false; + this.highlightrange.AllowNegative = false; + this.highlightrange.AllowRelative = false; + this.highlightrange.ButtonStep = 5; + this.highlightrange.ButtonStepBig = 10F; + this.highlightrange.ButtonStepFloat = 1F; + this.highlightrange.ButtonStepSmall = 0.1F; + this.highlightrange.ButtonStepsUseModifierKeys = false; + this.highlightrange.ButtonStepsWrapAround = false; + this.highlightrange.Location = new System.Drawing.Point(156, 21); + this.highlightrange.MaximumValue = 2147483647; + this.highlightrange.Name = "highlightrange"; + this.highlightrange.Size = new System.Drawing.Size(59, 24); + this.highlightrange.StepValues = null; + this.highlightrange.TabIndex = 16; + // + // label8 + // + this.label8.AutoSize = true; + this.label8.Location = new System.Drawing.Point(221, 116); + this.label8.Name = "label8"; + this.label8.Size = new System.Drawing.Size(33, 13); + this.label8.TabIndex = 15; + this.label8.Text = "pixels"; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(33, 86); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(113, 13); + this.label2.TabIndex = 4; + this.label2.Text = "Stitch geometry within:"; + this.label2.TextAlign = System.Drawing.ContentAlignment.TopRight; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(221, 86); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(33, 13); + this.label3.TabIndex = 6; + this.label3.Text = "pixels"; + // + // label9 + // + this.label9.AutoSize = true; + this.label9.Location = new System.Drawing.Point(47, 115); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(99, 13); + this.label9.TabIndex = 13; + this.label9.Text = "Split linedefs within:"; + this.label9.TextAlign = System.Drawing.ContentAlignment.TopRight; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Location = new System.Drawing.Point(20, 26); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(127, 13); + this.label5.TabIndex = 7; + this.label5.Text = "Highlight geometry within:"; + this.label5.TextAlign = System.Drawing.ContentAlignment.TopRight; + // + // label6 + // + this.label6.AutoSize = true; + this.label6.Location = new System.Drawing.Point(221, 55); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(33, 13); + this.label6.TabIndex = 12; + this.label6.Text = "pixels"; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Location = new System.Drawing.Point(221, 26); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(33, 13); + this.label4.TabIndex = 9; + this.label4.Text = "pixels"; + // + // label7 + // + this.label7.AutoSize = true; + this.label7.Location = new System.Drawing.Point(36, 56); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(112, 13); + this.label7.TabIndex = 10; + this.label7.Text = "Highlight things within:"; + this.label7.TextAlign = System.Drawing.ContentAlignment.TopRight; + // + // groupBox1 + // + this.groupBox1.Controls.Add(this.splitbehavior); + this.groupBox1.Controls.Add(this.label10); + this.groupBox1.Controls.Add(this.label1); + this.groupBox1.Controls.Add(this.heightbysidedef); + this.groupBox1.Location = new System.Drawing.Point(6, 6); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(657, 92); + this.groupBox1.TabIndex = 16; + this.groupBox1.TabStop = false; + this.groupBox1.Text = " Behavior "; + // + // splitbehavior + // + this.splitbehavior.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.splitbehavior.FormattingEnabled = true; + this.splitbehavior.Items.AddRange(new object[] { "Interpolate texture coordinates", "Duplicate texture coordinates", "Reset X coordinate, duplicate Y coordinate", "Reset X and Y coordinates"}); - this.splitbehavior.Location = new System.Drawing.Point(342, 55); - this.splitbehavior.Name = "splitbehavior"; - this.splitbehavior.Size = new System.Drawing.Size(309, 21); - this.splitbehavior.TabIndex = 2; - // - // label10 - // - this.label10.AutoSize = true; - this.label10.Location = new System.Drawing.Point(203, 58); - this.label10.Name = "label10"; - this.label10.Size = new System.Drawing.Size(120, 13); - this.label10.TabIndex = 1; - this.label10.Text = "When splitting a linedef:"; - this.label10.TextAlign = System.Drawing.ContentAlignment.TopRight; - // - // label1 - // - this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(9, 22); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(308, 13); - this.label1.TabIndex = 0; - this.label1.Text = "When sector height changes are used on a wall in Visual Mode:"; - this.label1.TextAlign = System.Drawing.ContentAlignment.TopRight; - // - // heightbysidedef - // - this.heightbysidedef.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.heightbysidedef.FormattingEnabled = true; - this.heightbysidedef.Items.AddRange(new object[] { + this.splitbehavior.Location = new System.Drawing.Point(342, 55); + this.splitbehavior.Name = "splitbehavior"; + this.splitbehavior.Size = new System.Drawing.Size(309, 21); + this.splitbehavior.TabIndex = 2; + // + // label10 + // + this.label10.AutoSize = true; + this.label10.Location = new System.Drawing.Point(203, 58); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(120, 13); + this.label10.TabIndex = 1; + this.label10.Text = "When splitting a linedef:"; + this.label10.TextAlign = System.Drawing.ContentAlignment.TopRight; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(9, 22); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(308, 13); + this.label1.TabIndex = 0; + this.label1.Text = "When sector height changes are used on a wall in Visual Mode:"; + this.label1.TextAlign = System.Drawing.ContentAlignment.TopRight; + // + // heightbysidedef + // + this.heightbysidedef.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.heightbysidedef.FormattingEnabled = true; + this.heightbysidedef.Items.AddRange(new object[] { "Do nothing", "Change the ceiling height", "Change the floor height", "Change both floor and ceiling height"}); - this.heightbysidedef.Location = new System.Drawing.Point(342, 19); - this.heightbysidedef.Name = "heightbysidedef"; - this.heightbysidedef.Size = new System.Drawing.Size(309, 21); - this.heightbysidedef.TabIndex = 0; - // - // PreferencesForm - // - this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; - this.ClientSize = new System.Drawing.Size(701, 473); - this.Controls.Add(this.tabs); - this.MaximizeBox = false; - this.MinimizeBox = false; - this.Name = "PreferencesForm"; - this.Opacity = 1D; - this.ShowIcon = false; - this.Text = "PreferencesForm"; - this.tabs.ResumeLayout(false); - this.taboptions.ResumeLayout(false); - this.groupBox4.ResumeLayout(false); - this.groupBox4.PerformLayout(); - this.groupBox3.ResumeLayout(false); - this.groupBox3.PerformLayout(); - this.groupBox2.ResumeLayout(false); - this.groupBox2.PerformLayout(); - this.groupBox1.ResumeLayout(false); - this.groupBox1.PerformLayout(); - this.ResumeLayout(false); + this.heightbysidedef.Location = new System.Drawing.Point(342, 19); + this.heightbysidedef.Name = "heightbysidedef"; + this.heightbysidedef.Size = new System.Drawing.Size(309, 21); + this.heightbysidedef.TabIndex = 0; + // + // switchviewmodes + // + this.switchviewmodes.Location = new System.Drawing.Point(0, 0); + this.switchviewmodes.Name = "switchviewmodes"; + this.switchviewmodes.Size = new System.Drawing.Size(104, 24); + this.switchviewmodes.TabIndex = 0; + // + // mouseselectionthreshold + // + this.mouseselectionthreshold.AllowDecimal = false; + this.mouseselectionthreshold.AllowNegative = false; + this.mouseselectionthreshold.AllowRelative = false; + this.mouseselectionthreshold.ButtonStep = 1; + this.mouseselectionthreshold.ButtonStepBig = 10F; + this.mouseselectionthreshold.ButtonStepFloat = 1F; + this.mouseselectionthreshold.ButtonStepSmall = 0.1F; + this.mouseselectionthreshold.ButtonStepsUseModifierKeys = false; + this.mouseselectionthreshold.ButtonStepsWrapAround = false; + this.mouseselectionthreshold.Location = new System.Drawing.Point(0, 0); + this.mouseselectionthreshold.MaximumValue = 2147483647; + this.mouseselectionthreshold.Name = "mouseselectionthreshold"; + this.mouseselectionthreshold.Size = new System.Drawing.Size(289, 24); + this.mouseselectionthreshold.StepValues = null; + this.mouseselectionthreshold.TabIndex = 0; + // + // label16 + // + this.label16.Location = new System.Drawing.Point(0, 0); + this.label16.Name = "label16"; + this.label16.Size = new System.Drawing.Size(100, 23); + this.label16.TabIndex = 0; + // + // label17 + // + this.label17.Location = new System.Drawing.Point(0, 0); + this.label17.Name = "label17"; + this.label17.Size = new System.Drawing.Size(100, 23); + this.label17.TabIndex = 0; + // + // PreferencesForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; + this.ClientSize = new System.Drawing.Size(709, 585); + this.Controls.Add(this.tabs); + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "PreferencesForm"; + this.Opacity = 1D; + this.ShowIcon = false; + this.Text = "PreferencesForm"; + this.tabs.ResumeLayout(false); + this.taboptions.ResumeLayout(false); + this.groupBox4.ResumeLayout(false); + this.groupBox4.PerformLayout(); + this.groupBox3.ResumeLayout(false); + this.groupBox3.PerformLayout(); + this.groupBox2.ResumeLayout(false); + this.groupBox2.PerformLayout(); + this.groupBox1.ResumeLayout(false); + this.groupBox1.PerformLayout(); + this.ResumeLayout(false); } @@ -644,5 +706,10 @@ namespace CodeImp.DoomBuilder.BuilderModes private System.Windows.Forms.Label label15; private System.Windows.Forms.Label label14; private System.Windows.Forms.CheckBox autodrawonedit; + private System.Windows.Forms.CheckBox switchviewmodes; + private Controls.ButtonsNumericTextbox mouseselectionthreshold; + private System.Windows.Forms.Label label16; + private System.Windows.Forms.Label label17; + private System.Windows.Forms.CheckBox additivepaintselect; } } \ No newline at end of file diff --git a/Source/Plugins/BuilderModes/Interface/PreferencesForm.cs b/Source/Plugins/BuilderModes/Interface/PreferencesForm.cs index 38b3080..4186f41 100644 --- a/Source/Plugins/BuilderModes/Interface/PreferencesForm.cs +++ b/Source/Plugins/BuilderModes/Interface/PreferencesForm.cs @@ -46,8 +46,9 @@ namespace CodeImp.DoomBuilder.BuilderModes editnewthing.Checked = General.Settings.ReadPluginSetting("editnewthing", true); editnewsector.Checked = General.Settings.ReadPluginSetting("editnewsector", false); additiveselect.Checked = General.Settings.ReadPluginSetting("additiveselect", false); + additivepaintselect.Checked = General.Settings.ReadPluginSetting("additivepaintselect", additiveselect.Checked); // Use the same settign as additive select by default + stitchrange.Text = General.Settings.ReadPluginSetting("stitchrange", 20).ToString(); dontusenodes.Checked = General.Settings.ReadPluginSetting("dontusenodes", false); - stitchrange.Text = General.Settings.ReadPluginSetting("stitchrange", 20).ToString(); highlightrange.Text = General.Settings.ReadPluginSetting("highlightrange", 20).ToString(); highlightthingsrange.Text = General.Settings.ReadPluginSetting("highlightthingsrange", 10).ToString(); splitlinedefsrange.Text = General.Settings.ReadPluginSetting("splitlinedefsrange", 10).ToString(); @@ -76,8 +77,9 @@ namespace CodeImp.DoomBuilder.BuilderModes General.Settings.WritePluginSetting("editnewthing", editnewthing.Checked); General.Settings.WritePluginSetting("editnewsector", editnewsector.Checked); General.Settings.WritePluginSetting("additiveselect", additiveselect.Checked); + General.Settings.WritePluginSetting("additivepaintselect", additivepaintselect.Checked); + General.Settings.WritePluginSetting("stitchrange", stitchrange.GetResult(0)); General.Settings.WritePluginSetting("dontusenodes", dontusenodes.Checked); - General.Settings.WritePluginSetting("stitchrange", stitchrange.GetResult(0)); General.Settings.WritePluginSetting("highlightrange", highlightrange.GetResult(0)); General.Settings.WritePluginSetting("highlightthingsrange", highlightthingsrange.GetResult(0)); General.Settings.WritePluginSetting("splitlinedefsrange", splitlinedefsrange.GetResult(0)); diff --git a/Source/Plugins/BuilderModes/Resources/Actions.cfg b/Source/Plugins/BuilderModes/Resources/Actions.cfg index 1c66d15..9e121ed 100644 --- a/Source/Plugins/BuilderModes/Resources/Actions.cfg +++ b/Source/Plugins/BuilderModes/Resources/Actions.cfg @@ -1422,4 +1422,18 @@ togglecolormaps allowmouse = true; allowscroll = false; default = 262211; //Alt+C -} \ No newline at end of file +} + +// biwa +visualpaintselect +{ + title = "Paint Selection"; + category = "visual"; + description = "Selects or deselects items by dragging the mouse. Hold shift while dragging to toggle additive selection. Hold Ctrl while dragging to enable subtractive selection"; + allowkeys = true; + allowmouse = true; + allowscroll = false; + disregardshift = true; + disregardcontrol = true; + disregardalt = true; +} diff --git a/Source/Plugins/BuilderModes/VisualModes/BaseVisualGeometrySector.cs b/Source/Plugins/BuilderModes/VisualModes/BaseVisualGeometrySector.cs index 2e973ba..b042ddf 100644 --- a/Source/Plugins/BuilderModes/VisualModes/BaseVisualGeometrySector.cs +++ b/Source/Plugins/BuilderModes/VisualModes/BaseVisualGeometrySector.cs @@ -484,6 +484,7 @@ namespace CodeImp.DoomBuilder.BuilderModes public virtual void ApplyLinedefFlag(string flag, bool set) { } protected abstract void MoveTextureOffset(Point xy); protected abstract Point GetTextureOffset(); + public virtual void OnPaintSelectEnd() { } // biwa // Setup this plane public bool Setup() { return this.Setup(this.level, this.extrafloor); } @@ -536,6 +537,42 @@ namespace CodeImp.DoomBuilder.BuilderModes // Moving the mouse public virtual void OnMouseMove(MouseEventArgs e) { + // biwa. Paint selection going on? + if(mode.PaintSelectPressed) + { + // toggle selected state + if (mode.PaintSelectType == this.GetType().BaseType && mode.Highlighted != this) // using BaseType so that both floor and ceiling can be selected in one go + { + if (General.Interface.ShiftState ^ BuilderPlug.Me.AdditivePaintSelect) + { + if (!selected) + { + selected = true; + mode.AddSelectedObject(this); + } + } + else if (General.Interface.CtrlState) + { + if (selected) + { + selected = false; + mode.RemoveSelectedObject(this); + } + } + else + { + if (selected) + mode.RemoveSelectedObject(this); + else + mode.AddSelectedObject(this); + + selected = !selected; + } + } + + return; + } + if(!General.Map.UDMF) return; //mxd. Cannot change texture offsets in other map formats... // Dragging UV? @@ -968,6 +1005,39 @@ namespace CodeImp.DoomBuilder.BuilderModes ChangeTextureScale(incrementX, incrementY); } + + // biwa + public virtual void OnPaintSelectBegin() + { + mode.PaintSelectType = this.GetType().BaseType; // using BaseType so that both floor and ceiling can be selected in one go + + // toggle selected state + if (General.Interface.ShiftState ^ BuilderPlug.Me.AdditivePaintSelect) + { + if (!selected) + { + selected = true; + mode.AddSelectedObject(this); + } + } + else if (General.Interface.CtrlState) + { + if (selected) + { + selected = false; + mode.RemoveSelectedObject(this); + } + } + else + { + if (selected) + mode.RemoveSelectedObject(this); + else + mode.AddSelectedObject(this); + + selected = !selected; + } + } #endregion } diff --git a/Source/Plugins/BuilderModes/VisualModes/BaseVisualGeometrySidedef.cs b/Source/Plugins/BuilderModes/VisualModes/BaseVisualGeometrySidedef.cs index cfa0af4..9f127e7 100644 --- a/Source/Plugins/BuilderModes/VisualModes/BaseVisualGeometrySidedef.cs +++ b/Source/Plugins/BuilderModes/VisualModes/BaseVisualGeometrySidedef.cs @@ -762,7 +762,8 @@ namespace CodeImp.DoomBuilder.BuilderModes protected abstract void MoveTextureOffset(Point xy); protected abstract Point GetTextureOffset(); public virtual void OnTextureFit(FitTextureOptions options) { } //mxd - + public virtual void OnPaintSelectEnd() { } // biwa + // Insert middle texture public virtual void OnInsert() { @@ -1282,6 +1283,40 @@ namespace CodeImp.DoomBuilder.BuilderModes { UpdateDragUV(); } + else if (mode.PaintSelectPressed) // biwa. Paint selection going on? + { + if (mode.PaintSelectType == this.GetType().BaseType && mode.Highlighted != this) // using BaseType so that middle, upper, lower, etc can be selecting in one go + { + // toggle selected state + if (General.Interface.ShiftState ^ BuilderPlug.Me.AdditivePaintSelect) + { + if (!selected) + { + selected = true; + mode.AddSelectedObject(this); + } + } + else if (General.Interface.CtrlState) + { + if (selected) + { + selected = false; + mode.RemoveSelectedObject(this); + } + } + else + { + if (selected) + mode.RemoveSelectedObject(this); + else + mode.AddSelectedObject(this); + + selected = !selected; + } + } + + return; + } else { // Select button pressed? @@ -1542,6 +1577,39 @@ namespace CodeImp.DoomBuilder.BuilderModes mode.SetActionResult("Wall scale changed to " + scaleX.ToString("F03", CultureInfo.InvariantCulture) + ", " + scaleY.ToString("F03", CultureInfo.InvariantCulture) + " (" + (int)Math.Round(Texture.Width / scaleX) + " x " + (int)Math.Round(Texture.Height / scaleY) + ")."); } + // biwa + public virtual void OnPaintSelectBegin() + { + mode.PaintSelectType = this.GetType().BaseType; // using BaseType so that middle, upper, lower, etc can be selecting in one go + + // toggle selected state + if (General.Interface.ShiftState ^ BuilderPlug.Me.AdditivePaintSelect) + { + if (!selected) + { + selected = true; + mode.AddSelectedObject(this); + } + } + else if (General.Interface.CtrlState) + { + if (selected) + { + selected = false; + mode.RemoveSelectedObject(this); + } + } + else + { + if (selected) + mode.RemoveSelectedObject(this); + else + mode.AddSelectedObject(this); + + selected = !selected; + } + } + #endregion } } diff --git a/Source/Plugins/BuilderModes/VisualModes/BaseVisualMode.cs b/Source/Plugins/BuilderModes/VisualModes/BaseVisualMode.cs index 3c9ee10..63f9f5c 100644 --- a/Source/Plugins/BuilderModes/VisualModes/BaseVisualMode.cs +++ b/Source/Plugins/BuilderModes/VisualModes/BaseVisualMode.cs @@ -50,6 +50,7 @@ namespace CodeImp.DoomBuilder.BuilderModes #region ================== Constants // Object picking private const float PICK_INTERVAL = 80.0f; + private const float PICK_INTERVAL_PAINT_SELECT = 10.0f; // biwa private const float PICK_RANGE = 0.98f; // Gravity @@ -99,8 +100,13 @@ namespace CodeImp.DoomBuilder.BuilderModes private BSP bsp; private bool useblockmap; - //mxd. Moved here from Tools - private struct SidedefAlignJob + // biwa. Info for paint selection + protected bool paintselectpressed; + protected Type paintselecttype = null; + protected IVisualPickable highlighted; // biwa + + //mxd. Moved here from Tools + private struct SidedefAlignJob { public Sidedef sidedef; @@ -170,9 +176,13 @@ namespace CodeImp.DoomBuilder.BuilderModes public BSP BSP { get { return bsp; } } public bool UseBlockmap { get { return useblockmap; } } - #endregion + public bool PaintSelectPressed { get { return paintselectpressed; } } // biwa + public Type PaintSelectType { get { return paintselecttype; } set { paintselecttype = value; } } // biwa + public IVisualPickable Highlighted { get { return highlighted; } } // biwa - #region ================== Constructor / Disposer + #endregion + + #region ================== Constructor / Disposer // Constructor public BaseVisualMode() @@ -1281,6 +1291,7 @@ namespace CodeImp.DoomBuilder.BuilderModes // Processing public override void OnProcess(float deltatime) { + float pickinterval = PICK_INTERVAL; // biwa // Process things? base.ProcessThings = (BuilderPlug.Me.ShowVisualThings != 0); @@ -1354,9 +1365,13 @@ namespace CodeImp.DoomBuilder.BuilderModes { g.OnProcess(deltatime); } + + // biwa. Use a lower pick interval for paint selection, to make it more reliable + if (paintselectpressed) + pickinterval = PICK_INTERVAL_PAINT_SELECT; // Time to pick a new target? - if(Clock.CurrentTime > (lastpicktime + PICK_INTERVAL)) + if(Clock.CurrentTime > (lastpicktime + pickinterval)) { PickTargetUnlocked(); lastpicktime = Clock.CurrentTime; @@ -1570,6 +1585,14 @@ namespace CodeImp.DoomBuilder.BuilderModes lasthighlighttype = o.GetType(); } + + // biwa + if (o is NullVisualEventReceiver) + highlighted = null; + else if (o is VisualGeometry) + highlighted = (VisualGeometry)o; + else if (o is VisualThing) + highlighted = (VisualThing)o; } // Undo performed @@ -4058,6 +4081,23 @@ namespace CodeImp.DoomBuilder.BuilderModes General.Interface.DisplayStatus(StatusType.Action, "Toggled Slope for " + toUpdate.Count + (toUpdate.Count == 1 ? " surface." : " surfaces.")); } + // biwa + [BeginAction("visualpaintselect")] + protected virtual void OnPaintSelectBegin() + { + paintselectpressed = true; + GetTargetEventReceiver(true).OnPaintSelectBegin(); + } + + // biwa + [EndAction("visualpaintselect")] + protected virtual void OnPaintSelectEnd() + { + paintselectpressed = false; + paintselecttype = null; + GetTargetEventReceiver(true).OnPaintSelectEnd(); + } + #endregion #region ================== Texture Alignment diff --git a/Source/Plugins/BuilderModes/VisualModes/BaseVisualThing.cs b/Source/Plugins/BuilderModes/VisualModes/BaseVisualThing.cs index 6ae6df2..dbea72c 100644 --- a/Source/Plugins/BuilderModes/VisualModes/BaseVisualThing.cs +++ b/Source/Plugins/BuilderModes/VisualModes/BaseVisualThing.cs @@ -658,7 +658,6 @@ namespace CodeImp.DoomBuilder.BuilderModes // Unused public void OnSelectBegin() { } public void OnEditBegin() { } - public void OnMouseMove(MouseEventArgs e) { } public void OnChangeTargetBrightness(bool up) { } public void OnChangeTextureOffset(int horizontal, int vertical, bool doSurfaceAngleCorrection) { } public void OnSelectTexture() { } @@ -678,7 +677,8 @@ namespace CodeImp.DoomBuilder.BuilderModes public void ApplyTexture(string texture) { } public void ApplyLinedefFlag(string flag, bool set) { } public void SelectNeighbours(bool select, bool withSameTexture, bool withSameHeight) { } //mxd - + public virtual void OnPaintSelectEnd() { } // biwa + // Return texture name public string GetTextureName() { return ""; } @@ -890,6 +890,77 @@ namespace CodeImp.DoomBuilder.BuilderModes this.Changed = true; } + // biwa. Moving the mouse + public virtual void OnMouseMove(MouseEventArgs e) + { + // biwa. Paint selection going on? + if (mode.PaintSelectPressed) + { + // toggle selected state + if (mode.PaintSelectType == this.GetType() && mode.Highlighted != this) + { + if (General.Interface.ShiftState ^ BuilderPlug.Me.AdditivePaintSelect) + { + if (!selected) + { + selected = true; + mode.AddSelectedObject(this); + } + } + else if (General.Interface.CtrlState) + { + if (selected) + { + selected = false; + mode.RemoveSelectedObject(this); + } + } + else + { + if (selected) + mode.RemoveSelectedObject(this); + else + mode.AddSelectedObject(this); + + selected = !selected; + } + } + } + } + + // biwa + public virtual void OnPaintSelectBegin() + { + mode.PaintSelectType = this.GetType(); + + // toggle selected state + if (General.Interface.ShiftState ^ BuilderPlug.Me.AdditivePaintSelect) + { + if (!selected) + { + selected = true; + mode.AddSelectedObject(this); + } + } + else if (General.Interface.CtrlState) + { + if (selected) + { + selected = false; + mode.RemoveSelectedObject(this); + } + } + else + { + if (selected) + mode.RemoveSelectedObject(this); + else + mode.AddSelectedObject(this); + + selected = !selected; + } + } + //mxd public void SetAngle(int newangle) { diff --git a/Source/Plugins/BuilderModes/VisualModes/BaseVisualVertex.cs b/Source/Plugins/BuilderModes/VisualModes/BaseVisualVertex.cs index b800f5e..918e68f 100644 --- a/Source/Plugins/BuilderModes/VisualModes/BaseVisualVertex.cs +++ b/Source/Plugins/BuilderModes/VisualModes/BaseVisualVertex.cs @@ -263,6 +263,8 @@ namespace CodeImp.DoomBuilder.BuilderModes public void ApplyLinedefFlag(string flag, bool set) { } public string GetTextureName() { return ""; } public void SelectNeighbours(bool select, bool withSameTexture, bool withSameHeight) { } //mxd + public virtual void OnPaintSelectBegin() { } // biwa + public virtual void OnPaintSelectEnd() { } // biwa #endregion diff --git a/Source/Plugins/BuilderModes/VisualModes/IVisualEventReceiver.cs b/Source/Plugins/BuilderModes/VisualModes/IVisualEventReceiver.cs index cf2c2c4..c3b6134 100644 --- a/Source/Plugins/BuilderModes/VisualModes/IVisualEventReceiver.cs +++ b/Source/Plugins/BuilderModes/VisualModes/IVisualEventReceiver.cs @@ -53,6 +53,8 @@ namespace CodeImp.DoomBuilder.BuilderModes void OnProcess(float deltatime); void OnInsert(); void OnDelete(); + void OnPaintSelectBegin(); // biwa + void OnPaintSelectEnd(); // biwa // Assist functions void ApplyTexture(string texture); diff --git a/Source/Plugins/BuilderModes/VisualModes/NullVisualEventReceiver.cs b/Source/Plugins/BuilderModes/VisualModes/NullVisualEventReceiver.cs index c51feef..83ffa54 100644 --- a/Source/Plugins/BuilderModes/VisualModes/NullVisualEventReceiver.cs +++ b/Source/Plugins/BuilderModes/VisualModes/NullVisualEventReceiver.cs @@ -53,6 +53,8 @@ namespace CodeImp.DoomBuilder.BuilderModes public void OnProcess(float deltatime) { } public void OnInsert() { } public void OnDelete() { } + public void OnPaintSelectBegin() { } // biwa + public void OnPaintSelectEnd() { } // biwa public void ApplyTexture(string texture) { } public void ApplyLinedefFlag(string flag, bool set) { } public string GetTextureName() { return ""; }