From 79185596c140ae696fd8e019151cb371d7cd451d Mon Sep 17 00:00:00 2001 From: sector-a <82838084+sector-a@users.noreply.github.com> Date: Thu, 12 Jun 2025 02:53:42 +0300 Subject: [PATCH 1/3] Hide the pause button on ending cutscenes --- source/funkin/play/PlayState.hx | 7 ++++--- source/funkin/play/cutscene/VideoCutscene.hx | 8 ++++++++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/source/funkin/play/PlayState.hx b/source/funkin/play/PlayState.hx index 2ea0d4a7b..9c66617f4 100644 --- a/source/funkin/play/PlayState.hx +++ b/source/funkin/play/PlayState.hx @@ -546,12 +546,12 @@ class PlayState extends MusicBeatSubState /** * The pause button for the game, only appears in Mobile targets. */ - var pauseButton:FunkinSprite; + public var pauseButton:FunkinSprite; /** * The pause circle for the game, only appears in Mobile targets. */ - var pauseCircle:FunkinSprite; + public var pauseCircle:FunkinSprite; #end /** @@ -3147,7 +3147,8 @@ class PlayState extends MusicBeatSubState #if mobile // Hide the buttons while the song is ending. - hitbox.visible = pauseButton.visible = false; + hitbox.visible = false; + pauseButton.visible = false; pauseCircle.visible = false; #end diff --git a/source/funkin/play/cutscene/VideoCutscene.hx b/source/funkin/play/cutscene/VideoCutscene.hx index 0b32307b4..398b52d3e 100644 --- a/source/funkin/play/cutscene/VideoCutscene.hx +++ b/source/funkin/play/cutscene/VideoCutscene.hx @@ -89,6 +89,14 @@ class VideoCutscene VideoCutscene.cutsceneType = cutsceneType; + #if mobile + if (cutsceneType == CutsceneType.ENDING) + { + PlayState.instance.pauseCircle.visible = false; + PlayState.instance.pauseButton.visible = false; + } + #end + #if html5 playVideoHTML5(rawFilePath); #elseif hxvlc From 47f0fc72361beb6410341645673697d8134d5640 Mon Sep 17 00:00:00 2001 From: sector-a <82838084+sector-a@users.noreply.github.com> Date: Thu, 12 Jun 2025 02:55:43 +0300 Subject: [PATCH 2/3] Bring back the resume entry in pause in cutscenes --- source/funkin/play/PauseSubState.hx | 2 -- 1 file changed, 2 deletions(-) diff --git a/source/funkin/play/PauseSubState.hx b/source/funkin/play/PauseSubState.hx index 136c6a564..5dcca8a42 100644 --- a/source/funkin/play/PauseSubState.hx +++ b/source/funkin/play/PauseSubState.hx @@ -80,9 +80,7 @@ class PauseSubState extends MusicBeatSubState * Pause menu entries for when the game is paused during a video cutscene. */ static final PAUSE_MENU_ENTRIES_VIDEO_CUTSCENE:Array = [ - #if !mobile {text: 'Resume', callback: resume}, - #end {text: 'Skip Cutscene', callback: skipVideoCutscene}, {text: 'Restart Cutscene', callback: restartVideoCutscene}, {text: 'Exit to Menu', callback: quitToMenu}, From 0d965ba91ccc99015a772fb2928cde3feada906c Mon Sep 17 00:00:00 2001 From: sector-a <82838084+sector-a@users.noreply.github.com> Date: Thu, 12 Jun 2025 04:06:56 +0300 Subject: [PATCH 3/3] Fix pause button hiding --- assets | 2 +- source/funkin/play/PlayState.hx | 12 ++++++++++-- source/funkin/play/cutscene/VideoCutscene.hx | 5 ++--- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/assets b/assets index 80cabb3d9..bf85a6950 160000 --- a/assets +++ b/assets @@ -1 +1 @@ -Subproject commit 80cabb3d9bb7bb228c5c0dbdaa170b0888b78e74 +Subproject commit bf85a69507203318bb3f2d2aa24fe14324dd7e9c diff --git a/source/funkin/play/PlayState.hx b/source/funkin/play/PlayState.hx index 9c66617f4..34760ab37 100644 --- a/source/funkin/play/PlayState.hx +++ b/source/funkin/play/PlayState.hx @@ -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. diff --git a/source/funkin/play/cutscene/VideoCutscene.hx b/source/funkin/play/cutscene/VideoCutscene.hx index 398b52d3e..798ab1d3d 100644 --- a/source/funkin/play/cutscene/VideoCutscene.hx +++ b/source/funkin/play/cutscene/VideoCutscene.hx @@ -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