Add hotkey for background input (add on screen message when toggling this feature)

This commit is contained in:
andres.delikat 2012-07-12 21:56:59 +00:00
parent 16b86e70e7
commit 70b5d68ae0
5 changed files with 614 additions and 571 deletions

View File

@ -410,6 +410,7 @@ namespace BizHawk.MultiClient
public bool TI83ToolTips = true;
// Client Hotkey Bindings
public string ToggleBackgroundInput = "";
public string IncreaseSpeedBinding = "Equals";
public string DecreaseSpeedBinding = "Minus";
public string HardResetBinding = "Ctrl+R";

View File

@ -767,8 +767,21 @@ namespace BizHawk.MultiClient
}
private void acceptBackgroundInputToolStripMenuItem_Click(object sender, EventArgs e)
{
ToggleBackgroundInput();
}
public void ToggleBackgroundInput()
{
Global.Config.AcceptBackgroundInput ^= true;
if (Global.Config.AcceptBackgroundInput)
{
Global.OSD.AddMessage("Background Input enabled");
}
else
{
Global.OSD.AddMessage("Background Input disabled");
}
}
private void displayStatusBarToolStripMenuItem_Click(object sender, EventArgs e)

View File

@ -507,7 +507,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", "Toggle Menu", "Increase Speed", "Decrease Speed"}
"Soft Reset", "Decrement Player", "Record AVI", "Stop AVI", "Toggle Menu", "Increase Speed", "Decrease Speed", "Toggle Background Input"}
};
private void InitControls()
@ -522,6 +522,7 @@ namespace BizHawk.MultiClient
controls.BindMulti("Frame Advance", Global.Config.FrameAdvanceBinding);
controls.BindMulti("Increase Speed", Global.Config.IncreaseSpeedBinding);
controls.BindMulti("Decrease Speed", Global.Config.DecreaseSpeedBinding);
controls.BindMulti("Toggle Background Input", Global.Config.ToggleBackgroundInput);
controls.BindMulti("Unthrottle", Global.Config.TurboBinding);
controls.BindMulti("Screenshot", Global.Config.ScreenshotBinding);
controls.BindMulti("Toggle Fullscreen", Global.Config.ToggleFullscreenBinding);
@ -1594,6 +1595,9 @@ namespace BizHawk.MultiClient
case "Decrease Speed":
DecreaseSpeed();
break;
case "Toggle Background Input":
ToggleBackgroundInput();
break;
case "Quick Save State":
if (!IsNullEmulator())
SaveState("QuickSave" + Global.Config.SaveSlot.ToString());

File diff suppressed because it is too large Load Diff

View File

@ -97,6 +97,7 @@ namespace BizHawk.MultiClient.tools
IDW_DecreaseWindowSize.SetBindings(Global.Config.DecreaseWindowSize);
IDW_IncSpeed.SetBindings(Global.Config.IncreaseSpeedBinding);
IDW_DecSpeed.SetBindings(Global.Config.DecreaseSpeedBinding);
IDW_ToggleBGInput.SetBindings(Global.Config.ToggleBackgroundInput);
}
private void button2_Click(object sender, EventArgs e)
{
@ -202,7 +203,7 @@ namespace BizHawk.MultiClient.tools
Global.Config.DecreaseWindowSize = IDW_DecreaseWindowSize.Text;
Global.Config.IncreaseSpeedBinding = IDW_IncSpeed.Text;
Global.Config.DecreaseSpeedBinding = IDW_DecSpeed.Text;
Global.Config.ToggleBackgroundInput = IDW_ToggleBGInput.Text;
this.DialogResult = DialogResult.OK;
this.Close();
}