Add `branchIndex` parameter to `tastudio.getmarker`
This commit is contained in:
parent
f4d98293d8
commit
ff04b85199
|
@ -444,12 +444,16 @@ namespace BizHawk.Client.EmuHawk
|
||||||
}
|
}
|
||||||
|
|
||||||
[LuaMethodExample("local sttasget = tastudio.getmarker( 500 );")]
|
[LuaMethodExample("local sttasget = tastudio.getmarker( 500 );")]
|
||||||
[LuaMethod("getmarker", "returns the marker text at the given frame, or an empty string if there is no marker for the given frame")]
|
[LuaMethod(
|
||||||
public string GetMarker(int frame)
|
name: "getmarker",
|
||||||
|
description: "Returns the label of the marker on the given frame."
|
||||||
|
+ " If that frame doesn't have a marker (or TAStudio isn't running), returns an empty string."
|
||||||
|
+ " If branchIndex is specified, searches the markers in that branch instead.")]
|
||||||
|
public string GetMarker(int frame, int? branchIndex = null)
|
||||||
{
|
{
|
||||||
if (Engaged())
|
if (Engaged())
|
||||||
{
|
{
|
||||||
var marker = Tastudio.CurrentTasMovie.Markers.Get(frame);
|
var marker = MarkerListForBranch(branchIndex).Get(frame);
|
||||||
if (marker != null)
|
if (marker != null)
|
||||||
{
|
{
|
||||||
return marker.Message;
|
return marker.Message;
|
||||||
|
|
Loading…
Reference in New Issue