diff --git a/Source/Core/Config/ProgramConfiguration.cs b/Source/Core/Config/ProgramConfiguration.cs index 48cb5580..1b67bddf 100644 --- a/Source/Core/Config/ProgramConfiguration.cs +++ b/Source/Core/Config/ProgramConfiguration.cs @@ -84,6 +84,7 @@ namespace CodeImp.DoomBuilder.Config private float filteranisotropy; private bool showtexturesizes; private bool locatetexturegroup; //mxd + private bool keeptexturefilterfocused; //mxd private SplitLineBehavior splitlinebehavior; //mxd //mxd. Script editor settings @@ -183,6 +184,7 @@ namespace CodeImp.DoomBuilder.Config public float FilterAnisotropy { get { return filteranisotropy; } internal set { filteranisotropy = value; } } public bool ShowTextureSizes { get { return showtexturesizes; } internal set { showtexturesizes = value; } } public bool LocateTextureGroup { get { return locatetexturegroup; } internal set { locatetexturegroup = value; } } //mxd + public bool KeepTextureFilterFocused { get { return keeptexturefilterfocused; } internal set { keeptexturefilterfocused = value; } } //mxd public SplitLineBehavior SplitLineBehavior { get { return splitlinebehavior; } set { splitlinebehavior = value; } } //mxd //mxd. Script editor settings @@ -305,6 +307,7 @@ namespace CodeImp.DoomBuilder.Config filteranisotropy = cfg.ReadSetting("filteranisotropy", 8.0f); showtexturesizes = cfg.ReadSetting("showtexturesizes", true); locatetexturegroup = cfg.ReadSetting("locatetexturegroup", true); //mxd + keeptexturefilterfocused = cfg.ReadSetting("keeptexturefilterfocused", true); //mxd splitlinebehavior = (SplitLineBehavior) General.Clamp(cfg.ReadSetting("splitlinebehavior", 0), 0, 3); //mxd //mxd. Script editor @@ -408,6 +411,7 @@ namespace CodeImp.DoomBuilder.Config cfg.WriteSetting("filteranisotropy", filteranisotropy); cfg.WriteSetting("showtexturesizes", showtexturesizes); cfg.WriteSetting("locatetexturegroup", locatetexturegroup); //mxd + cfg.WriteSetting("keeptexturefilterfocused", keeptexturefilterfocused); //mxd cfg.WriteSetting("splitlinebehavior", (int)splitlinebehavior); //mxd //mxd. Script editor diff --git a/Source/Core/Controls/ImageBrowserControl.Designer.cs b/Source/Core/Controls/ImageBrowserControl.Designer.cs index b07dba09..e376addf 100644 --- a/Source/Core/Controls/ImageBrowserControl.Designer.cs +++ b/Source/Core/Controls/ImageBrowserControl.Designer.cs @@ -116,6 +116,7 @@ namespace CodeImp.DoomBuilder.Controls this.list.DoubleClick += new System.EventHandler(this.list_DoubleClick); this.list.ItemSelectionChanged += new System.Windows.Forms.ListViewItemSelectionChangedEventHandler(this.list_ItemSelectionChanged); this.list.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.list_KeyPress); + this.list.KeyDown += new System.Windows.Forms.KeyEventHandler(this.list_KeyDown); // // showsubdirtextures // diff --git a/Source/Core/Controls/ImageBrowserControl.cs b/Source/Core/Controls/ImageBrowserControl.cs index 52937200..469ee479 100644 --- a/Source/Core/Controls/ImageBrowserControl.cs +++ b/Source/Core/Controls/ImageBrowserControl.cs @@ -237,6 +237,20 @@ namespace CodeImp.DoomBuilder.Controls } } + //mxd. Handle keyboard navigation the same way regardless of list being focused... + private void list_KeyDown(object sender, KeyEventArgs e) + { + // Check what key is pressed + switch(e.KeyData) + { + // Cursor keys + case Keys.Left: SelectNextItem(SearchDirectionHint.Left); e.SuppressKeyPress = true; break; + case Keys.Right: SelectNextItem(SearchDirectionHint.Right); e.SuppressKeyPress = true; break; + case Keys.Up: SelectNextItem(SearchDirectionHint.Up); e.SuppressKeyPress = true; break; + case Keys.Down: SelectNextItem(SearchDirectionHint.Down); e.SuppressKeyPress = true; break; + } + } + //mxd private void filterSize_WhenTextChanged(object sender, EventArgs e) { @@ -277,6 +291,8 @@ namespace CodeImp.DoomBuilder.Controls //mxd. Transfer focus to Filter textbox private void list_KeyPress(object sender, KeyPressEventArgs e) { + if(!General.Settings.KeepTextureFilterFocused) return; + objectname.Focus(); if(e.KeyChar == '\b') // Any better way to check for Backspace?.. { @@ -388,36 +404,107 @@ namespace CodeImp.DoomBuilder.Controls } else { - // Get selected item - ListViewItem lvi = list.SelectedItems[0]; - Rectangle lvirect = list.GetItemRect(lvi.Index, ItemBoundsPortion.Entire); - Point spos = new Point(lvirect.Location.X + lvirect.Width / 2, lvirect.Y + lvirect.Height / 2); + //mxd + int index = list.SelectedItems[0].Index; + int targetindex = -1; + ListViewGroup startgroup = list.SelectedItems[0].Group; + Rectangle startrect = list.GetItemRect(index, ItemBoundsPortion.Entire); - // Try finding 5 times in the given direction - for(int i = 0; i < 5; i++) + switch(dir) { - // Move point in given direction - switch(dir) - { - case SearchDirectionHint.Left: spos.X -= list.TileSize.Width / 2; break; - case SearchDirectionHint.Right: spos.X += list.TileSize.Width / 2; break; - case SearchDirectionHint.Up: spos.Y -= list.TileSize.Height / 2; break; - case SearchDirectionHint.Down: spos.Y += list.TileSize.Height / 2; break; - } - - // Test position - lvi = list.GetItemAt(spos.X, spos.Y); - if(lvi != null) - { - // Select item - list.SelectedItems.Clear(); - lvi.Selected = true; + // Check previous items untill groups match... + case SearchDirectionHint.Left: + if(list.SelectedIndices[0] > 0) + { + while(--index > -1) + { + if(list.Items[index].Group == startgroup) + { + targetindex = index; + break; + } + } + } break; + + // Same thing, other direction... + case SearchDirectionHint.Right: + if(list.SelectedIndices[0] < list.Items.Count - 1) + { + while(++index < list.Items.Count) + { + if(list.Items[index].Group == startgroup) + { + targetindex = index; + break; + } + } + } + break; + + // Check previous items untill X coordinate match and Y coordinate is less than the start ones... + case SearchDirectionHint.Up: + while(--index > -1) + { + Rectangle rect = list.GetItemRect(index, ItemBoundsPortion.Entire); + if(list.Items[index].Group == startgroup && rect.X == startrect.X && rect.Y < startrect.Y) + { + targetindex = index; + break; + } + } + break; + + // Same thing, other direction... + case SearchDirectionHint.Down: + if(list.SelectedIndices[0] < list.Items.Count - 1) + { + while(++index < list.Items.Count) + { + Rectangle rect = list.GetItemRect(index, ItemBoundsPortion.Entire); + if(list.Items[index].Group == startgroup && rect.X == startrect.X && rect.Y > startrect.Y) + { + targetindex = index; + break; + } + } + } + break; + } + + //mxd. Use the old method for Up/Down keys, becaue it can jump between Groups... + if(targetindex == -1 && (dir == SearchDirectionHint.Up || dir == SearchDirectionHint.Down)) + { + Point spos = new Point(startrect.Location.X + startrect.Width / 2, startrect.Y + startrect.Height / 2); + + // Try finding 5 times in the given direction + for(int i = 0; i < 5; i++) + { + // Move point in given direction + switch(dir) + { + case SearchDirectionHint.Up: spos.Y -= list.TileSize.Height / 2; break; + case SearchDirectionHint.Down: spos.Y += list.TileSize.Height / 2; break; + } + + // Test position + ListViewItem lvi = list.GetItemAt(spos.X, spos.Y); + if(lvi != null) + { + targetindex = lvi.Index; + break; + } } } - - // Make selection visible - if(list.SelectedItems.Count > 0) list.SelectedItems[0].EnsureVisible(); + + //mxd. Found something?.. + if(targetindex != -1) + { + // Select item + list.SelectedItems.Clear(); + list.Items[targetindex].Selected = true; + list.SelectedItems[0].EnsureVisible(); + } } } @@ -514,6 +601,15 @@ namespace CodeImp.DoomBuilder.Controls private void RefillList(bool selectfirst) { visibleitems = new List(); + + //mxd. Store info about currently selected item + string selectedname = string.Empty; + ListViewGroup selecteditemgroup = null; + if(!selectfirst && keepselected == -1 && list.SelectedIndices.Count > 0) + { + selectedname = list.Items[list.SelectedIndices[0]].Text; + selecteditemgroup = list.Items[list.SelectedIndices[0]].Group; + } // Begin updating list updating = true; @@ -569,6 +665,56 @@ namespace CodeImp.DoomBuilder.Controls { SelectFirstItem(); } + //mxd. Try reselecting the same/next closest item + else if(selecteditemgroup != null && !string.IsNullOrEmpty(selectedname)) + { + ListViewItem bestmatch = null; + int charsmatched = 1; + foreach(ListViewItem item in list.Items) + { + if(item.Group == selecteditemgroup && item.Text[0] == selectedname[0]) + { + if(item.Text == selectedname) + { + bestmatch = item; + break; + } + + for(int i = 1; i < Math.Min(item.Text.Length, selectedname.Length); i++) + { + if(item.Text[i] != selectedname[i]) + { + if(i > charsmatched) + { + bestmatch = item; + charsmatched = i; + } + break; + } + } + } + } + + // Select the first item from the same group... + if(bestmatch == null) + { + foreach(ListViewItem item in list.Items) + { + if(item.Group == selecteditemgroup) + { + bestmatch = item; + break; + } + } + } + + // Select found item + if(bestmatch != null) + { + bestmatch.Selected = true; + bestmatch.EnsureVisible(); + } + } } // Raise event @@ -605,7 +751,10 @@ namespace CodeImp.DoomBuilder.Controls // This sends the focus to the textbox public void FocusTextbox() { - objectname.Focus(); + if(General.Settings.KeepTextureFilterFocused) //mxd + objectname.Focus(); + else + list.Focus(); } #endregion diff --git a/Source/Core/Windows/PreferencesForm.Designer.cs b/Source/Core/Windows/PreferencesForm.Designer.cs index aa582bab..306dd362 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.keepfilterfocused = new System.Windows.Forms.CheckBox(); this.checkforupdates = new System.Windows.Forms.CheckBox(); this.cbStoreEditTab = new System.Windows.Forms.CheckBox(); this.locatetexturegroup = new System.Windows.Forms.CheckBox(); @@ -171,6 +172,7 @@ namespace CodeImp.DoomBuilder.Windows this.label8 = new System.Windows.Forms.Label(); this.scriptfontsize = new System.Windows.Forms.ComboBox(); this.groupBox6 = new System.Windows.Forms.GroupBox(); + this.colorproperties = new CodeImp.DoomBuilder.Controls.ColorControl(); this.label23 = new System.Windows.Forms.Label(); this.scriptcolorpresets = new System.Windows.Forms.ComboBox(); this.colorfoldback = new CodeImp.DoomBuilder.Controls.ColorControl(); @@ -197,7 +199,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.colorproperties = new CodeImp.DoomBuilder.Controls.ColorControl(); label7 = new System.Windows.Forms.Label(); label6 = new System.Windows.Forms.Label(); label5 = new System.Windows.Forms.Label(); @@ -271,6 +272,7 @@ namespace CodeImp.DoomBuilder.Windows // // groupBox1 // + groupBox1.Controls.Add(this.keepfilterfocused); groupBox1.Controls.Add(this.checkforupdates); groupBox1.Controls.Add(this.cbStoreEditTab); groupBox1.Controls.Add(this.locatetexturegroup); @@ -301,10 +303,22 @@ namespace CodeImp.DoomBuilder.Windows groupBox1.TabStop = false; groupBox1.Text = " Options "; // + // keepfilterfocused + // + this.keepfilterfocused.AutoSize = true; + this.keepfilterfocused.Location = new System.Drawing.Point(32, 350); + this.keepfilterfocused.Name = "keepfilterfocused"; + this.keepfilterfocused.Size = new System.Drawing.Size(280, 17); + this.keepfilterfocused.TabIndex = 52; + this.keepfilterfocused.Text = "Keep Filter input focused when image browser is open"; + this.toolTip1.SetToolTip(this.keepfilterfocused, "When enabled, all key presses in \r\nimage browsers will be redirected \r\nto the Fil" + + "ter textbox."); + this.keepfilterfocused.UseVisualStyleBackColor = true; + // // checkforupdates // this.checkforupdates.AutoSize = true; - this.checkforupdates.Location = new System.Drawing.Point(32, 392); + this.checkforupdates.Location = new System.Drawing.Point(32, 413); this.checkforupdates.Name = "checkforupdates"; this.checkforupdates.Size = new System.Drawing.Size(160, 17); this.checkforupdates.TabIndex = 51; @@ -314,7 +328,7 @@ namespace CodeImp.DoomBuilder.Windows // cbStoreEditTab // this.cbStoreEditTab.AutoSize = true; - this.cbStoreEditTab.Location = new System.Drawing.Point(32, 371); + this.cbStoreEditTab.Location = new System.Drawing.Point(32, 392); this.cbStoreEditTab.Name = "cbStoreEditTab"; this.cbStoreEditTab.Size = new System.Drawing.Size(203, 17); this.cbStoreEditTab.TabIndex = 50; @@ -401,7 +415,7 @@ namespace CodeImp.DoomBuilder.Windows // cbSynchCameras // this.cbSynchCameras.AutoSize = true; - this.cbSynchCameras.Location = new System.Drawing.Point(32, 350); + this.cbSynchCameras.Location = new System.Drawing.Point(32, 371); this.cbSynchCameras.Name = "cbSynchCameras"; this.cbSynchCameras.Size = new System.Drawing.Size(260, 17); this.cbSynchCameras.TabIndex = 42; @@ -1905,6 +1919,18 @@ namespace CodeImp.DoomBuilder.Windows this.groupBox6.TabStop = false; this.groupBox6.Text = " Colors "; // + // colorproperties + // + this.colorproperties.BackColor = System.Drawing.Color.Transparent; + this.colorproperties.Label = "Keywords:"; + this.colorproperties.Location = new System.Drawing.Point(15, 169); + this.colorproperties.MaximumSize = new System.Drawing.Size(10000, 23); + this.colorproperties.MinimumSize = new System.Drawing.Size(100, 16); + this.colorproperties.Name = "colorproperties"; + this.colorproperties.Size = new System.Drawing.Size(168, 21); + this.colorproperties.TabIndex = 41; + this.colorproperties.ColorChanged += new System.EventHandler(this.colorproperties_ColorChanged); + // // label23 // this.label23.AutoSize = true; @@ -1934,6 +1960,7 @@ namespace CodeImp.DoomBuilder.Windows this.colorfoldback.Label = "Fold BG:"; this.colorfoldback.Location = new System.Drawing.Point(15, 457); this.colorfoldback.MaximumSize = new System.Drawing.Size(10000, 23); + this.colorfoldback.MinimumSize = new System.Drawing.Size(100, 16); this.colorfoldback.Name = "colorfoldback"; this.colorfoldback.Size = new System.Drawing.Size(168, 21); this.colorfoldback.TabIndex = 16; @@ -1945,6 +1972,7 @@ namespace CodeImp.DoomBuilder.Windows this.colorfoldfore.Label = "Fold:"; this.colorfoldfore.Location = new System.Drawing.Point(15, 433); this.colorfoldfore.MaximumSize = new System.Drawing.Size(10000, 23); + this.colorfoldfore.MinimumSize = new System.Drawing.Size(100, 16); this.colorfoldfore.Name = "colorfoldfore"; this.colorfoldfore.Size = new System.Drawing.Size(168, 21); this.colorfoldfore.TabIndex = 15; @@ -1956,6 +1984,7 @@ namespace CodeImp.DoomBuilder.Windows this.colorindicator.Label = "Matching word:"; this.colorindicator.Location = new System.Drawing.Point(15, 337); this.colorindicator.MaximumSize = new System.Drawing.Size(10000, 23); + this.colorindicator.MinimumSize = new System.Drawing.Size(100, 16); this.colorindicator.Name = "colorindicator"; this.colorindicator.Size = new System.Drawing.Size(168, 21); this.colorindicator.TabIndex = 14; @@ -1967,6 +1996,7 @@ namespace CodeImp.DoomBuilder.Windows this.colorwhitespace.Label = "Whitespace:"; this.colorwhitespace.Location = new System.Drawing.Point(15, 409); this.colorwhitespace.MaximumSize = new System.Drawing.Size(10000, 23); + this.colorwhitespace.MinimumSize = new System.Drawing.Size(100, 16); this.colorwhitespace.Name = "colorwhitespace"; this.colorwhitespace.Size = new System.Drawing.Size(168, 21); this.colorwhitespace.TabIndex = 13; @@ -1978,6 +2008,7 @@ namespace CodeImp.DoomBuilder.Windows this.colorbracebad.Label = "Mismatching brace:"; this.colorbracebad.Location = new System.Drawing.Point(15, 385); this.colorbracebad.MaximumSize = new System.Drawing.Size(10000, 23); + this.colorbracebad.MinimumSize = new System.Drawing.Size(100, 16); this.colorbracebad.Name = "colorbracebad"; this.colorbracebad.Size = new System.Drawing.Size(168, 21); this.colorbracebad.TabIndex = 12; @@ -1989,6 +2020,7 @@ namespace CodeImp.DoomBuilder.Windows this.colorbrace.Label = "Matching brace:"; this.colorbrace.Location = new System.Drawing.Point(15, 361); this.colorbrace.MaximumSize = new System.Drawing.Size(10000, 23); + this.colorbrace.MinimumSize = new System.Drawing.Size(100, 16); this.colorbrace.Name = "colorbrace"; this.colorbrace.Size = new System.Drawing.Size(168, 21); this.colorbrace.TabIndex = 11; @@ -2000,6 +2032,7 @@ namespace CodeImp.DoomBuilder.Windows this.colorselectionback.Label = "Selection BG:"; this.colorselectionback.Location = new System.Drawing.Point(15, 313); this.colorselectionback.MaximumSize = new System.Drawing.Size(10000, 23); + this.colorselectionback.MinimumSize = new System.Drawing.Size(100, 16); this.colorselectionback.Name = "colorselectionback"; this.colorselectionback.Size = new System.Drawing.Size(168, 21); this.colorselectionback.TabIndex = 10; @@ -2011,6 +2044,7 @@ namespace CodeImp.DoomBuilder.Windows this.colorselectionfore.Label = "Selection:"; this.colorselectionfore.Location = new System.Drawing.Point(15, 289); this.colorselectionfore.MaximumSize = new System.Drawing.Size(10000, 23); + this.colorselectionfore.MinimumSize = new System.Drawing.Size(100, 16); this.colorselectionfore.Name = "colorselectionfore"; this.colorselectionfore.Size = new System.Drawing.Size(168, 21); this.colorselectionfore.TabIndex = 9; @@ -2022,6 +2056,7 @@ namespace CodeImp.DoomBuilder.Windows this.colorincludes.Label = "Includes:"; this.colorincludes.Location = new System.Drawing.Point(15, 265); this.colorincludes.MaximumSize = new System.Drawing.Size(10000, 23); + this.colorincludes.MinimumSize = new System.Drawing.Size(100, 16); this.colorincludes.Name = "colorincludes"; this.colorincludes.Size = new System.Drawing.Size(168, 21); this.colorincludes.TabIndex = 8; @@ -2033,6 +2068,7 @@ namespace CodeImp.DoomBuilder.Windows this.colorstrings.Label = "Strings:"; this.colorstrings.Location = new System.Drawing.Point(15, 193); this.colorstrings.MaximumSize = new System.Drawing.Size(10000, 23); + this.colorstrings.MinimumSize = new System.Drawing.Size(100, 16); this.colorstrings.Name = "colorstrings"; this.colorstrings.Size = new System.Drawing.Size(168, 21); this.colorstrings.TabIndex = 7; @@ -2044,6 +2080,7 @@ namespace CodeImp.DoomBuilder.Windows this.colorscriptbackground.Label = "Background:"; this.colorscriptbackground.Location = new System.Drawing.Point(15, 49); this.colorscriptbackground.MaximumSize = new System.Drawing.Size(10000, 23); + this.colorscriptbackground.MinimumSize = new System.Drawing.Size(100, 16); this.colorscriptbackground.Name = "colorscriptbackground"; this.colorscriptbackground.Size = new System.Drawing.Size(168, 21); this.colorscriptbackground.TabIndex = 0; @@ -2055,6 +2092,7 @@ namespace CodeImp.DoomBuilder.Windows this.colorplaintext.Label = "Plain text:"; this.colorplaintext.Location = new System.Drawing.Point(15, 97); this.colorplaintext.MaximumSize = new System.Drawing.Size(10000, 23); + this.colorplaintext.MinimumSize = new System.Drawing.Size(100, 16); this.colorplaintext.Name = "colorplaintext"; this.colorplaintext.Size = new System.Drawing.Size(168, 21); this.colorplaintext.TabIndex = 2; @@ -2066,6 +2104,7 @@ namespace CodeImp.DoomBuilder.Windows this.colorcomments.Label = "Comments:"; this.colorcomments.Location = new System.Drawing.Point(15, 121); this.colorcomments.MaximumSize = new System.Drawing.Size(10000, 23); + this.colorcomments.MinimumSize = new System.Drawing.Size(100, 16); this.colorcomments.Name = "colorcomments"; this.colorcomments.Size = new System.Drawing.Size(168, 21); this.colorcomments.TabIndex = 3; @@ -2077,6 +2116,7 @@ namespace CodeImp.DoomBuilder.Windows this.colorlinenumbers.Label = "Line numbers:"; this.colorlinenumbers.Location = new System.Drawing.Point(15, 73); this.colorlinenumbers.MaximumSize = new System.Drawing.Size(10000, 23); + this.colorlinenumbers.MinimumSize = new System.Drawing.Size(100, 16); this.colorlinenumbers.Name = "colorlinenumbers"; this.colorlinenumbers.Size = new System.Drawing.Size(168, 21); this.colorlinenumbers.TabIndex = 1; @@ -2088,6 +2128,7 @@ namespace CodeImp.DoomBuilder.Windows this.colorkeywords.Label = "Functions:"; this.colorkeywords.Location = new System.Drawing.Point(15, 145); this.colorkeywords.MaximumSize = new System.Drawing.Size(10000, 23); + this.colorkeywords.MinimumSize = new System.Drawing.Size(100, 16); this.colorkeywords.Name = "colorkeywords"; this.colorkeywords.Size = new System.Drawing.Size(168, 21); this.colorkeywords.TabIndex = 4; @@ -2099,6 +2140,7 @@ namespace CodeImp.DoomBuilder.Windows this.colorliterals.Label = "Numbers:"; this.colorliterals.Location = new System.Drawing.Point(15, 217); this.colorliterals.MaximumSize = new System.Drawing.Size(10000, 23); + this.colorliterals.MinimumSize = new System.Drawing.Size(100, 16); this.colorliterals.Name = "colorliterals"; this.colorliterals.Size = new System.Drawing.Size(168, 21); this.colorliterals.TabIndex = 5; @@ -2110,6 +2152,7 @@ namespace CodeImp.DoomBuilder.Windows this.colorconstants.Label = "Constants:"; this.colorconstants.Location = new System.Drawing.Point(15, 241); this.colorconstants.MaximumSize = new System.Drawing.Size(10000, 23); + this.colorconstants.MinimumSize = new System.Drawing.Size(100, 16); this.colorconstants.Name = "colorconstants"; this.colorconstants.Size = new System.Drawing.Size(168, 21); this.colorconstants.TabIndex = 6; @@ -2173,17 +2216,6 @@ namespace CodeImp.DoomBuilder.Windows // this.browseScreenshotsFolderDialog.Description = "Select a Folder to Save Screenshots Into"; // - // colorproperties - // - this.colorproperties.BackColor = System.Drawing.Color.Transparent; - this.colorproperties.Label = "Keywords:"; - this.colorproperties.Location = new System.Drawing.Point(15, 169); - this.colorproperties.MaximumSize = new System.Drawing.Size(10000, 23); - this.colorproperties.Name = "colorproperties"; - this.colorproperties.Size = new System.Drawing.Size(168, 21); - this.colorproperties.TabIndex = 41; - this.colorproperties.ColorChanged += new System.EventHandler(this.colorproperties_ColorChanged); - // // PreferencesForm // this.AcceptButton = this.apply; @@ -2417,5 +2449,6 @@ namespace CodeImp.DoomBuilder.Windows private System.Windows.Forms.ComboBox scriptcolorpresets; private System.Windows.Forms.Label label23; private CodeImp.DoomBuilder.Controls.ColorControl colorproperties; + private System.Windows.Forms.CheckBox keepfilterfocused; } } \ No newline at end of file diff --git a/Source/Core/Windows/PreferencesForm.cs b/Source/Core/Windows/PreferencesForm.cs index fc1912ce..11203799 100644 --- a/Source/Core/Windows/PreferencesForm.cs +++ b/Source/Core/Windows/PreferencesForm.cs @@ -89,6 +89,7 @@ namespace CodeImp.DoomBuilder.Windows //mxd locatetexturegroup.Checked = General.Settings.LocateTextureGroup; + keepfilterfocused.Checked = General.Settings.KeepTextureFilterFocused; cbStoreEditTab.Checked = General.Settings.StoreSelectedEditTab; checkforupdates.Checked = General.Settings.CheckForUpdates; toolbar_gzdoom.Checked = General.Settings.GZToolbarGZDoom; @@ -280,6 +281,7 @@ namespace CodeImp.DoomBuilder.Windows General.Settings.StoreSelectedEditTab = cbStoreEditTab.Checked; //mxd General.Settings.CheckForUpdates = checkforupdates.Checked; //mxd General.Settings.LocateTextureGroup = locatetexturegroup.Checked; //mxd + General.Settings.KeepTextureFilterFocused = keepfilterfocused.Checked; //mxd General.Settings.MaxRecentFiles = recentFiles.Value; //mxd General.Settings.ScreenshotsPath = screenshotsfolderpath.Text.Trim(); //mxd