implement onCloseSubState (#789)

Seriously, why havent this been added alongside with onOpenSubstate
This commit is contained in:
ItsLJcool
2025-10-16 20:23:31 +07:00
committed by GitHub
parent 90e0e5618d
commit 3469524d8c
+6
View File
@@ -275,6 +275,12 @@ class MusicBeatState extends FlxState implements IBeatCancellableReceiver
if (!e.cancelled)
super.openSubState(e.substate is FlxSubState ? cast e.substate : subState);
}
public override function closeSubState() {
var e = event("onCloseSubState", EventManager.get(CancellableEvent).recycle());
if (!e.cancelled)
super.closeSubState();
}
public override function onResize(w:Int, h:Int) {
super.onResize(w, h);