Skip to content

Commit 38c28ee

Browse files
committed
Add branchID parameter to tastudio.getmarker
1 parent 284500a commit 38c28ee

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/BizHawk.Client.EmuHawk/tools/Lua/Libraries/TAStudioLuaLibrary.cs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -459,12 +459,16 @@ public void LoadBranch(int index)
459459
}
460460

461461
[LuaMethodExample("local sttasget = tastudio.getmarker( 500 );")]
462-
[LuaMethod("getmarker", "returns the marker text at the given frame, or an empty string if there is no marker for the given frame")]
463-
public string GetMarker(int frame)
462+
[LuaMethod(
463+
name: "getmarker",
464+
description: "Returns the label of the marker on the given frame."
465+
+ " If that frame doesn't have a marker (or TAStudio isn't running), returns an empty string."
466+
+ " If branchID is specified, searches the markers in that branch instead.")]
467+
public string GetMarker(int frame, string/*?*/ branchID = null)
464468
{
465469
if (Engaged())
466470
{
467-
var marker = Tastudio.CurrentTasMovie.Markers.Get(frame);
471+
var marker = MarkerListForBranch(branchID).Get(frame);
468472
if (marker != null)
469473
{
470474
return marker.Message;

0 commit comments

Comments
 (0)