diff --git a/BizHawk.MultiClient/Config.cs b/BizHawk.MultiClient/Config.cs index c74d65ec3b..efa9202587 100644 --- a/BizHawk.MultiClient/Config.cs +++ b/BizHawk.MultiClient/Config.cs @@ -103,6 +103,7 @@ public bool AllowUD_LR = false; public bool ShowContextMenu = true; public bool EnableBackupMovies = true; + public bool HotkeyConfigAutoTab = true; // Run-Control settings public int FrameProgressDelayMs = 500; //how long until a frame advance hold turns into a frame progress? diff --git a/BizHawk.MultiClient/config/HotkeyWindow.Designer.cs b/BizHawk.MultiClient/config/HotkeyWindow.Designer.cs index bbf8fd1cc7..0db409b424 100644 --- a/BizHawk.MultiClient/config/HotkeyWindow.Designer.cs +++ b/BizHawk.MultiClient/config/HotkeyWindow.Designer.cs @@ -31,6 +31,8 @@ System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(HotkeyWindow)); this.hotkeyTabs = new System.Windows.Forms.TabControl(); this.tabPage1 = new System.Windows.Forms.TabPage(); + this.label71 = new System.Windows.Forms.Label(); + this.IDW_RESET = new BizHawk.MultiClient.InputWidget(); this.label70 = new System.Windows.Forms.Label(); this.IDW_UNTHROTTLE = new BizHawk.MultiClient.InputWidget(); this.label69 = new System.Windows.Forms.Label(); @@ -176,8 +178,7 @@ this.IDB_SAVE = new System.Windows.Forms.Button(); this.IDB_CANCEL = new System.Windows.Forms.Button(); this.label38 = new System.Windows.Forms.Label(); - this.IDW_RESET = new BizHawk.MultiClient.InputWidget(); - this.label71 = new System.Windows.Forms.Label(); + this.AutoTabCheckBox = new System.Windows.Forms.CheckBox(); this.hotkeyTabs.SuspendLayout(); this.tabPage1.SuspendLayout(); this.tabPage2.SuspendLayout(); @@ -248,6 +249,24 @@ this.tabPage1.Text = "General"; this.tabPage1.UseVisualStyleBackColor = true; // + // label71 + // + this.label71.AutoSize = true; + this.label71.Location = new System.Drawing.Point(6, 110); + this.label71.Name = "label71"; + this.label71.Size = new System.Drawing.Size(57, 13); + this.label71.TabIndex = 61; + this.label71.Text = "Soft Reset"; + // + // IDW_RESET + // + this.IDW_RESET.AcceptsTab = true; + this.IDW_RESET.BackColor = System.Drawing.SystemColors.Window; + this.IDW_RESET.Location = new System.Drawing.Point(92, 107); + this.IDW_RESET.Name = "IDW_RESET"; + this.IDW_RESET.Size = new System.Drawing.Size(100, 20); + this.IDW_RESET.TabIndex = 5; + // // label70 // this.label70.AutoSize = true; @@ -1591,29 +1610,23 @@ this.label38.TabIndex = 3; this.label38.Text = "* Escape clears a key mapping"; // - // IDW_RESET + // AutoTabCheckBox // - this.IDW_RESET.AcceptsTab = true; - this.IDW_RESET.BackColor = System.Drawing.SystemColors.Window; - this.IDW_RESET.Location = new System.Drawing.Point(92, 107); - this.IDW_RESET.Name = "IDW_RESET"; - this.IDW_RESET.Size = new System.Drawing.Size(100, 20); - this.IDW_RESET.TabIndex = 5; - // - // label71 - // - this.label71.AutoSize = true; - this.label71.Location = new System.Drawing.Point(6, 110); - this.label71.Name = "label71"; - this.label71.Size = new System.Drawing.Size(57, 13); - this.label71.TabIndex = 61; - this.label71.Text = "Soft Reset"; + this.AutoTabCheckBox.AutoSize = true; + this.AutoTabCheckBox.Location = new System.Drawing.Point(552, 362); + this.AutoTabCheckBox.Name = "AutoTabCheckBox"; + this.AutoTabCheckBox.Size = new System.Drawing.Size(70, 17); + this.AutoTabCheckBox.TabIndex = 100; + this.AutoTabCheckBox.Text = "Auto Tab"; + this.AutoTabCheckBox.UseVisualStyleBackColor = true; + this.AutoTabCheckBox.CheckedChanged += new System.EventHandler(this.AutoTabCheckBox_CheckedChanged); // // HotkeyWindow // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(637, 380); + this.Controls.Add(this.AutoTabCheckBox); this.Controls.Add(this.label38); this.Controls.Add(this.IDB_CANCEL); this.Controls.Add(this.IDB_SAVE); @@ -1790,5 +1803,6 @@ private InputWidget IDW_UNTHROTTLE; private InputWidget IDW_RESET; private System.Windows.Forms.Label label71; + private System.Windows.Forms.CheckBox AutoTabCheckBox; } } \ No newline at end of file diff --git a/BizHawk.MultiClient/config/HotkeyWindow.cs b/BizHawk.MultiClient/config/HotkeyWindow.cs index 5a926f72ea..43f54ec4c0 100644 --- a/BizHawk.MultiClient/config/HotkeyWindow.cs +++ b/BizHawk.MultiClient/config/HotkeyWindow.cs @@ -184,7 +184,29 @@ namespace BizHawk.MultiClient.tools private void HotkeyWindow_Load(object sender, EventArgs e) { + AutoTabCheckBox.Checked = Global.Config.HotkeyConfigAutoTab; + SetAutoTab(); + } + private void AutoTabCheckBox_CheckedChanged(object sender, EventArgs e) + { + Global.Config.HotkeyConfigAutoTab = AutoTabCheckBox.Checked; + SetAutoTab(); + } + + private void SetAutoTab() + { + for (int x = 0; x < hotkeyTabs.TabPages.Count; x++) + { + for (int y = 0; y < hotkeyTabs.TabPages[x].Controls.Count; y++) + { + if (hotkeyTabs.TabPages[x].Controls[y] is InputWidget) + { + InputWidget w = hotkeyTabs.TabPages[x].Controls[y] as InputWidget; + w.AutoTab = AutoTabCheckBox.Checked; + } + } + } } } } diff --git a/BizHawk.MultiClient/config/InputWidget.cs b/BizHawk.MultiClient/config/InputWidget.cs index c2cd7033ad..9065d86134 100644 --- a/BizHawk.MultiClient/config/InputWidget.cs +++ b/BizHawk.MultiClient/config/InputWidget.cs @@ -13,6 +13,7 @@ namespace BizHawk.MultiClient } public List Bindings = new List(); + public bool AutoTab = true; bool ctrlWasPressed = false; bool altWasPressed = false; bool shiftWasPressed = false; @@ -52,7 +53,8 @@ namespace BizHawk.MultiClient Bindings.Clear(); UpdateLabel(); } - this.Parent.SelectNextControl(this, true, true, true, true); + if (AutoTab) + this.Parent.SelectNextControl(this, true, true, true, true); } protected override void OnKeyUp(KeyEventArgs e)