add a toggle all cheats hotkey
This commit is contained in:
parent
98a390b3c6
commit
dec3a31d2b
|
@ -255,6 +255,8 @@ namespace BizHawk.Client.Common
|
||||||
Bind("Analog", "X Down Small", toolTip: "For Virtual Pad"),
|
Bind("Analog", "X Down Small", toolTip: "For Virtual Pad"),
|
||||||
Bind("Analog", "X Down Large", 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
|
//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;
|
using BizHawk.Emulation.Common.IEmulatorExtensions;
|
||||||
|
|
||||||
namespace BizHawk.Client.EmuHawk
|
namespace BizHawk.Client.EmuHawk
|
||||||
|
@ -321,6 +323,22 @@ namespace BizHawk.Client.EmuHawk
|
||||||
case "Cheats":
|
case "Cheats":
|
||||||
GlobalWin.Tools.Load<Cheats>();
|
GlobalWin.Tools.Load<Cheats>();
|
||||||
break;
|
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":
|
case "TAStudio":
|
||||||
GlobalWin.Tools.Load<TAStudio>();
|
GlobalWin.Tools.Load<TAStudio>();
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue