Add select saveslot 0-9 hotkeys and implemented them
This commit is contained in:
parent
6dc3be29e3
commit
990934e4bd
|
@ -40,6 +40,16 @@
|
|||
public string ToggleFullscreenBinding = "LeftAlt+Return, RightAlt+Return";
|
||||
public string QuickSave = "I";
|
||||
public string QuickLoad = "P";
|
||||
public string SelectSlot0 = "0";
|
||||
public string SelectSlot1 = "1";
|
||||
public string SelectSlot2 = "2";
|
||||
public string SelectSlot3 = "3";
|
||||
public string SelectSlot4 = "4";
|
||||
public string SelectSlot5 = "5";
|
||||
public string SelectSlot6 = "6";
|
||||
public string SelectSlot7 = "7";
|
||||
public string SelectSlot8 = "8";
|
||||
public string SelectSlot9 = "9";
|
||||
|
||||
// SMS / GameGear Settings
|
||||
public bool SmsEnableFM = true;
|
||||
|
|
|
@ -124,7 +124,8 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
Name = "Emulator Frontend Controls",
|
||||
BoolButtons = { "Fast Forward", "Rewind", "Hard Reset", "Mode Flip", "Quick Save State", "Quick Load State", "Save Named State", "Load Named State",
|
||||
"Emulator Pause", "Frame Advance", "Screenshot", "Toggle Fullscreen" }
|
||||
"Emulator Pause", "Frame Advance", "Screenshot", "Toggle Fullscreen", "SelectSlot0", "SelectSlot1", "SelectSlot2", "SelectSlot3", "SelectSlot4",
|
||||
"SelectSlot5", "SelectSlot6", "SelectSlot7", "SelectSlot8", "SelectSlot9"}
|
||||
};
|
||||
|
||||
private void InitControls()
|
||||
|
@ -140,6 +141,16 @@ namespace BizHawk.MultiClient
|
|||
controls.BindMulti("Toggle Fullscreen", Global.Config.ToggleFullscreenBinding);
|
||||
controls.BindMulti("Quick Save State", Global.Config.QuickSave);
|
||||
controls.BindMulti("Quick Load State", Global.Config.QuickLoad);
|
||||
controls.BindMulti("SelectSlot0", Global.Config.SelectSlot0);
|
||||
controls.BindMulti("SelectSlot1", Global.Config.SelectSlot1);
|
||||
controls.BindMulti("SelectSlot2", Global.Config.SelectSlot2);
|
||||
controls.BindMulti("SelectSlot3", Global.Config.SelectSlot3);
|
||||
controls.BindMulti("SelectSlot4", Global.Config.SelectSlot4);
|
||||
controls.BindMulti("SelectSlot5", Global.Config.SelectSlot5);
|
||||
controls.BindMulti("SelectSlot6", Global.Config.SelectSlot6);
|
||||
controls.BindMulti("SelectSlot7", Global.Config.SelectSlot7);
|
||||
controls.BindMulti("SelectSlot8", Global.Config.SelectSlot8);
|
||||
controls.BindMulti("SelectSlot9", Global.Config.SelectSlot9);
|
||||
Global.ClientControls = controls;
|
||||
|
||||
var smsControls = new Controller(SMS.SmsController);
|
||||
|
@ -358,14 +369,77 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
if (!IsNullEmulator())
|
||||
SaveState("QuickSave" + SaveSlot.ToString());
|
||||
Global.ClientControls.UnpressButton("Quick Save State");
|
||||
}
|
||||
|
||||
if (Global.ClientControls["Quick Load State"])
|
||||
{
|
||||
if (!IsNullEmulator())
|
||||
LoadState("QuickSave" + SaveSlot.ToString());
|
||||
Global.ClientControls.UnpressButton("Quick Load State");
|
||||
}
|
||||
|
||||
|
||||
if (Global.ClientControls["SelectSlot0"])
|
||||
{
|
||||
SaveSlot = 0;
|
||||
SaveSlotSelectedMessage();
|
||||
Global.ClientControls.UnpressButton("SelectSlot0");
|
||||
}
|
||||
if (Global.ClientControls["SelectSlot1"])
|
||||
{
|
||||
SaveSlot = 1;
|
||||
SaveSlotSelectedMessage();
|
||||
Global.ClientControls.UnpressButton("SelectSlot1");
|
||||
}
|
||||
if (Global.ClientControls["SelectSlot2"])
|
||||
{
|
||||
SaveSlot = 2;
|
||||
SaveSlotSelectedMessage();
|
||||
Global.ClientControls.UnpressButton("SelectSlot2");
|
||||
}
|
||||
if (Global.ClientControls["SelectSlot3"])
|
||||
{
|
||||
SaveSlot = 3;
|
||||
SaveSlotSelectedMessage();
|
||||
Global.ClientControls.UnpressButton("SelectSlot3");
|
||||
}
|
||||
if (Global.ClientControls["SelectSlot4"])
|
||||
{
|
||||
SaveSlot = 4;
|
||||
SaveSlotSelectedMessage();
|
||||
Global.ClientControls.UnpressButton("SelectSlot4");
|
||||
}
|
||||
if (Global.ClientControls["SelectSlot5"])
|
||||
{
|
||||
SaveSlot = 5;
|
||||
SaveSlotSelectedMessage();
|
||||
Global.ClientControls.UnpressButton("SelectSlot5");
|
||||
}
|
||||
if (Global.ClientControls["SelectSlot6"])
|
||||
{
|
||||
SaveSlot = 6;
|
||||
SaveSlotSelectedMessage();
|
||||
Global.ClientControls.UnpressButton("SelectSlot6");
|
||||
}
|
||||
if (Global.ClientControls["SelectSlot7"])
|
||||
{
|
||||
SaveSlot = 7;
|
||||
SaveSlotSelectedMessage();
|
||||
Global.ClientControls.UnpressButton("SelectSlot7");
|
||||
}
|
||||
if (Global.ClientControls["SelectSlot8"])
|
||||
{
|
||||
SaveSlot = 8;
|
||||
SaveSlotSelectedMessage();
|
||||
Global.ClientControls.UnpressButton("SelectSlot8");
|
||||
}
|
||||
if (Global.ClientControls["SelectSlot9"])
|
||||
{
|
||||
SaveSlot = 9;
|
||||
SaveSlotSelectedMessage();
|
||||
Global.ClientControls.UnpressButton("SelectSlot9");
|
||||
}
|
||||
|
||||
if (Global.ClientControls["Hard Reset"])
|
||||
{
|
||||
Global.ClientControls.UnpressButton("Hard Reset");
|
||||
|
|
Loading…
Reference in New Issue