Skip to content

Commit

Permalink
fix buttonB spam
Browse files Browse the repository at this point in the history
  • Loading branch information
mcagabe19 committed Sep 15, 2024
1 parent 36a0480 commit 18b118d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions source/options/NotesSubState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ class NotesSubState extends MusicBeatSubstate
FlxG.mouse.visible = false;
FlxG.sound.play(Paths.sound('cancelMenu'));
close();
removeVirtualPad();
return;
}

Expand Down
8 changes: 4 additions & 4 deletions source/options/OptionsState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -147,13 +147,13 @@ class OptionsState extends MusicBeatState

override function closeSubState() {
super.closeSubState();
removeVirtualPad();
persistentUpdate = true;
addVirtualPad(LEFT_FULL, ClientPrefs.mobileCPlayStateVpad ? A_B_C : A_B);
virtualPad.camera = otherCamera;
if (FlxG.sound.music != null && FlxG.sound.music.volume == 0)
FlxTween.tween(FlxG.sound.music, {pitch: 1, volume: 1}, 2.5, {ease: FlxEase.cubeOut});
ClientPrefs.saveSettings();
removeVirtualPad();
addVirtualPad(LEFT_FULL, ClientPrefs.mobileCPlayStateVpad ? A_B_C : A_B);
virtualPad.camera = otherCamera;
persistentUpdate = true;
}

override function update(elapsed:Float) {
Expand Down

0 comments on commit 18b118d

Please sign in to comment.