add a toggle all cheats hotkey
This commit is contained in:
parent
98a390b3c6
commit
dec3a31d2b
|
@ -254,7 +254,9 @@ namespace BizHawk.Client.Common
|
|||
Bind("Analog", "X Up Large", toolTip: "For Virtual Pad"),
|
||||
Bind("Analog", "X Down Small", toolTip: "For Virtual Pad"),
|
||||
Bind("Analog", "X Down Large", toolTip: "For Virtual Pad"),
|
||||
|
||||
|
||||
Bind("Tools", "Toggle All Cheats"),
|
||||
|
||||
};
|
||||
|
||||
//set ordinals based on order in list
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
using BizHawk.Client.Common;
|
||||
using System.Linq;
|
||||
|
||||
using BizHawk.Client.Common;
|
||||
using BizHawk.Emulation.Common.IEmulatorExtensions;
|
||||
|
||||
namespace BizHawk.Client.EmuHawk
|
||||
|
@ -321,6 +323,22 @@ namespace BizHawk.Client.EmuHawk
|
|||
case "Cheats":
|
||||
GlobalWin.Tools.Load<Cheats>();
|
||||
break;
|
||||
case "Toggle All Cheats":
|
||||
if (Global.CheatList.Any())
|
||||
{
|
||||
string type = " (mixed)";
|
||||
if (Global.CheatList.All(c => c.Enabled))
|
||||
{
|
||||
type = " (off)";
|
||||
}
|
||||
else if (Global.CheatList.All(c => !c.Enabled))
|
||||
{
|
||||
type = " (on)";
|
||||
}
|
||||
Global.CheatList.ToList().ForEach(x => x.Toggle());
|
||||
GlobalWin.OSD.AddMessage("Cheats toggled" + type);
|
||||
}
|
||||
break;
|
||||
case "TAStudio":
|
||||
GlobalWin.Tools.Load<TAStudio>();
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue