tastudio lua: add recording mode functions

finally fixes #793
This commit is contained in:
feos 2017-03-08 19:56:44 +03:00
parent a124fd72a1
commit 853432da26
1 changed files with 28 additions and 0 deletions

View File

@ -37,6 +37,34 @@ namespace BizHawk.Client.EmuHawk
return GlobalWin.Tools.Has<TAStudio>(); // TODO: eventually tastudio should have an engaged flag
}
[LuaMethodAttributes(
"getrecording",
"returns whether or not TAStudio is in recording mode"
)]
public bool GetRecording()
{
return Tastudio.TasPlaybackBox.RecordingMode;
}
[LuaMethodAttributes(
"setrecording",
"sets the recording mode on/off depending on the parameter"
)]
public void SetRecording(bool val)
{
if (Tastudio.TasPlaybackBox.RecordingMode != val)
Tastudio.ToggleReadOnly();
}
[LuaMethodAttributes(
"togglerecording",
"toggles tastudio recording mode on/off depending on its current state"
)]
public void SetRecording()
{
Tastudio.ToggleReadOnly();
}
[LuaMethodAttributes(
"setbranchtext",
"adds the given message to the existing branch, or to the branch that will be created next if branch index is not specified"