Fix pause button hiding

This commit is contained in:
sector-a
2025-06-12 04:06:56 +03:00
parent 47f0fc7236
commit 0d965ba91c
3 changed files with 13 additions and 6 deletions
+1 -1
Submodule assets updated: 80cabb3d9b...bf85a69507
+10 -2
View File
@@ -546,12 +546,12 @@ class PlayState extends MusicBeatSubState
/**
* The pause button for the game, only appears in Mobile targets.
*/
public var pauseButton:FunkinSprite;
var pauseButton:FunkinSprite;
/**
* The pause circle for the game, only appears in Mobile targets.
*/
public var pauseCircle:FunkinSprite;
var pauseCircle:FunkinSprite;
#end
/**
@@ -845,6 +845,14 @@ class PlayState extends MusicBeatSubState
refresh();
}
public function togglePauseButton(visible:Bool = false):Void
{
#if mobile
pauseCircle.alpha = visible ? 0.1 : 0;
pauseButton.alpha = visible ? 1 : 0;
#end
}
function assertChartExists():Bool
{
// Returns null if the song failed to load or doesn't have the selected difficulty.
+2 -3
View File
@@ -90,10 +90,9 @@ class VideoCutscene
VideoCutscene.cutsceneType = cutsceneType;
#if mobile
if (cutsceneType == CutsceneType.ENDING)
if (cutsceneType == ENDING)
{
PlayState.instance.pauseCircle.visible = false;
PlayState.instance.pauseButton.visible = false;
PlayState.instance.togglePauseButton();
}
#end