Start a tastudio lua library

This commit is contained in:
adelikat 2014-09-19 21:43:16 +00:00
parent 83ab148708
commit ad16be7712
2 changed files with 30 additions and 0 deletions

View File

@ -702,6 +702,7 @@
<Compile Include="tools\Lua\Libraries\EmuLuaLibrary.Gui.cs" />
<Compile Include="tools\Lua\Libraries\EmuLuaLibrary.Input.cs" />
<Compile Include="tools\Lua\Libraries\EmuLuaLibrary.Savestate.cs" />
<Compile Include="tools\Lua\Libraries\EmuLuaLibrary.Tastudio.cs" />
<Compile Include="tools\Lua\LuaCheckbox.cs">
<SubType>Component</SubType>
</Compile>

View File

@ -0,0 +1,29 @@
using System;
using System.ComponentModel;
using BizHawk.Client.Common;
using LuaInterface;
namespace BizHawk.Client.EmuHawk
{
[Description("A library for manipulating the Tastudio dialog of the EmuHawk client")]
public sealed class TastudioLuaLibrary : LuaLibraryBase
{
public TastudioLuaLibrary(Lua lua)
: base(lua) { }
public TastudioLuaLibrary(Lua lua, Action<string> logOutputCallback)
: base(lua, logOutputCallback) { }
public override string Name { get { return "tastudio"; } }
[LuaMethodAttributes(
"engaged",
"returns whether or not tastudio is currently engaged (active)"
)]
public bool Engaged()
{
return GlobalWin.Tools.Has<TAStudio>(); // TODO: eventually tastudio should have an engaged flag
}
}
}