Fix pause button hiding
This commit is contained in:
+1
-1
Submodule assets updated: 80cabb3d9b...bf85a69507
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user