From 2418947b692075d8dc9854f48847d60318e69057 Mon Sep 17 00:00:00 2001 From: "andres.delikat" Date: Sat, 1 Oct 2011 03:43:37 +0000 Subject: [PATCH] Add "Toggle Menu" hotkey --- BizHawk.MultiClient/Config.cs | 1 + BizHawk.MultiClient/MainForm.cs | 6 ++++- .../config/HotkeyWindow.Designer.cs | 24 +++++++++++++++++++ BizHawk.MultiClient/config/HotkeyWindow.cs | 2 ++ 4 files changed, 32 insertions(+), 1 deletion(-) diff --git a/BizHawk.MultiClient/Config.cs b/BizHawk.MultiClient/Config.cs index 68f4ff2957..721562be86 100644 --- a/BizHawk.MultiClient/Config.cs +++ b/BizHawk.MultiClient/Config.cs @@ -421,6 +421,7 @@ public string MTDecrementPlayer = ""; public string AVIRecordBinding = ""; public string AVIStopBinding = ""; + public string ToggleMenuBinding = ""; // SMS / GameGear Settings public bool SmsEnableFM = true; diff --git a/BizHawk.MultiClient/MainForm.cs b/BizHawk.MultiClient/MainForm.cs index 6acf3c6c23..11e95ea725 100644 --- a/BizHawk.MultiClient/MainForm.cs +++ b/BizHawk.MultiClient/MainForm.cs @@ -433,7 +433,7 @@ namespace BizHawk.MultiClient "LoadSlot7","LoadSlot8","LoadSlot9", "ToolBox", "Previous Slot", "Next Slot", "Ram Watch", "Ram Search", "Ram Poke", "Hex Editor", "Lua Console", "Cheats", "Open ROM", "Close ROM", "Display FPS", "Display FrameCounter", "Display LagCounter", "Display Input", "Toggle Read Only", "Play Movie", "Record Movie", "Stop Movie", "Play Beginning", "Volume Up", "Volume Down", "Toggle MultiTrack", "Record All", "Record None", "Increment Player", - "Soft Reset", "Decrement Player", "Record AVI", "Stop AVI"} + "Soft Reset", "Decrement Player", "Record AVI", "Stop AVI", "Toggle Menu"} }; private void InitControls() @@ -511,6 +511,7 @@ namespace BizHawk.MultiClient controls.BindMulti("Soft Reset", Global.Config.SoftResetBinding); controls.BindMulti("Record AVI", Global.Config.AVIRecordBinding); controls.BindMulti("Stop AVI", Global.Config.AVIStopBinding); + controls.BindMulti("Toggle Menu", Global.Config.ToggleMenuBinding); Global.ClientControls = controls; @@ -1513,6 +1514,9 @@ namespace BizHawk.MultiClient //used to be here: (the pause hotkey is ignored when we are frame advancing) TogglePause(); break; + case "Toggle Menu": + ShowHideMenu(); + break; } //switch(trigger) diff --git a/BizHawk.MultiClient/config/HotkeyWindow.Designer.cs b/BizHawk.MultiClient/config/HotkeyWindow.Designer.cs index 991a79f628..e08c0aabb6 100644 --- a/BizHawk.MultiClient/config/HotkeyWindow.Designer.cs +++ b/BizHawk.MultiClient/config/HotkeyWindow.Designer.cs @@ -183,6 +183,8 @@ this.IDB_CANCEL = new System.Windows.Forms.Button(); this.label38 = new System.Windows.Forms.Label(); this.AutoTabCheckBox = new System.Windows.Forms.CheckBox(); + this.IDW_ToggleMenu = new BizHawk.MultiClient.InputWidget(); + this.label74 = new System.Windows.Forms.Label(); this.hotkeyTabs.SuspendLayout(); this.tabPage1.SuspendLayout(); this.tabPage2.SuspendLayout(); @@ -207,6 +209,8 @@ // // tabPage1 // + this.tabPage1.Controls.Add(this.label74); + this.tabPage1.Controls.Add(this.IDW_ToggleMenu); this.tabPage1.Controls.Add(this.label73); this.tabPage1.Controls.Add(this.label72); this.tabPage1.Controls.Add(this.IDW_StopAVI); @@ -1666,6 +1670,24 @@ this.AutoTabCheckBox.UseVisualStyleBackColor = true; this.AutoTabCheckBox.CheckedChanged += new System.EventHandler(this.AutoTabCheckBox_CheckedChanged); // + // IDW_ToggleMenu + // + this.IDW_ToggleMenu.AcceptsTab = true; + this.IDW_ToggleMenu.BackColor = System.Drawing.SystemColors.Window; + this.IDW_ToggleMenu.Location = new System.Drawing.Point(494, 106); + this.IDW_ToggleMenu.Name = "IDW_ToggleMenu"; + this.IDW_ToggleMenu.Size = new System.Drawing.Size(100, 20); + this.IDW_ToggleMenu.TabIndex = 98; + // + // label74 + // + this.label74.AutoSize = true; + this.label74.Location = new System.Drawing.Point(408, 112); + this.label74.Name = "label74"; + this.label74.Size = new System.Drawing.Size(70, 13); + this.label74.TabIndex = 99; + this.label74.Text = "Toggle Menu"; + // // HotkeyWindow // this.AcceptButton = this.IDB_SAVE; @@ -1855,5 +1877,7 @@ private System.Windows.Forms.Label label72; private InputWidget IDW_StopAVI; private InputWidget IDW_RecordAVI; + private System.Windows.Forms.Label label74; + private InputWidget IDW_ToggleMenu; } } \ No newline at end of file diff --git a/BizHawk.MultiClient/config/HotkeyWindow.cs b/BizHawk.MultiClient/config/HotkeyWindow.cs index d849c16f6e..dc04090011 100644 --- a/BizHawk.MultiClient/config/HotkeyWindow.cs +++ b/BizHawk.MultiClient/config/HotkeyWindow.cs @@ -91,6 +91,7 @@ namespace BizHawk.MultiClient.tools IDW_RESET.SetBindings(Global.Config.SoftResetBinding); IDW_RecordAVI.SetBindings(Global.Config.AVIRecordBinding); IDW_StopAVI.SetBindings(Global.Config.AVIStopBinding); + IDW_ToggleMenu.SetBindings(Global.Config.ToggleMenuBinding); } private void button2_Click(object sender, EventArgs e) { @@ -189,6 +190,7 @@ namespace BizHawk.MultiClient.tools Global.Config.SoftResetBinding = IDW_RESET.Text; Global.Config.AVIRecordBinding = IDW_RecordAVI.Text; Global.Config.AVIStopBinding = IDW_StopAVI.Text; + Global.Config.ToggleMenuBinding = IDW_ToggleMenu.Text; this.DialogResult = DialogResult.OK; this.Close();