buttons to skip to labels

This commit is contained in:
2021-12-30 15:18:44 -07:00
parent 5c4927f908
commit e56d2092fa

View File

@@ -120,7 +120,17 @@ class AsyncEmbeddedScript {
}
}
// TODO skip to label by name
public function skipToLabel(name:String) {
var ip = labels[name];
if (lastInstructionPointer > ip) {
throw "Rewinding AsyncEmbeddedScript is not implemented";
}
skipToInstruction(ip);
}
public function labelRunners():Map<String,Void->Void> {
return [for (label => ip in labels) label => () -> skipToInstruction(ip)];
}
#if macro
public static function build(dslHaxelib:String, dslFile:String, scriptFile:String):Array<Field> {