Start a tastudio lua library
This commit is contained in:
parent
83ab148708
commit
ad16be7712
|
@ -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>
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue