Add "Toggle Menu" hotkey

This commit is contained in:
andres.delikat 2011-10-01 03:43:37 +00:00
parent e79d06a0eb
commit 2418947b69
4 changed files with 32 additions and 1 deletions

View File

@ -421,6 +421,7 @@
public string MTDecrementPlayer = "";
public string AVIRecordBinding = "";
public string AVIStopBinding = "";
public string ToggleMenuBinding = "";
// SMS / GameGear Settings
public bool SmsEnableFM = true;

View File

@ -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)

View File

@ -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;
}
}

View File

@ -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();