From fbfac8699bbd81afd1f4197ada29e32a5683e53a Mon Sep 17 00:00:00 2001 From: ItsLJcool Date: Fri, 10 Oct 2025 10:47:19 -0700 Subject: [PATCH] Implementing a feature that should have existed when THE FUCKING CLASS WAS MADE this isn't tested btw i just made a change form google LMAO --- source/funkin/backend/MusicBeatState.hx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source/funkin/backend/MusicBeatState.hx b/source/funkin/backend/MusicBeatState.hx index 74d953664..4b78b6f67 100644 --- a/source/funkin/backend/MusicBeatState.hx +++ b/source/funkin/backend/MusicBeatState.hx @@ -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);