lua - add client.SetSoundOn and client.GetSoundOn

This commit is contained in:
zeromus 2015-10-13 18:54:05 -05:00
parent cfe215d6c0
commit 3592d1418d
1 changed files with 18 additions and 0 deletions
BizHawk.Client.EmuHawk/tools/Lua/Libraries

View File

@ -161,6 +161,24 @@ namespace BizHawk.Client.EmuHawk
GlobalWin.MainForm.FrameBufferResized();
}
[LuaMethodAttributes(
"SetSoundOn",
"Sets the state of the Sound On toggle"
)]
public static void SetSoundOn(bool enable)
{
Global.Config.SoundEnabled = enable;
}
[LuaMethodAttributes(
"GetSoundOn",
"Gets the state of the Sound On toggle"
)]
public static bool GetSoundOn()
{
return Global.Config.SoundEnabled;
}
[LuaMethodAttributes(
"SetClientExtraPadding",
"Sets the extra padding added to the 'native' surface so that you can draw HUD elements in predictable placements"