From 35a70c21e6506d03b2a8f7ccc866a8b49d0593db Mon Sep 17 00:00:00 2001 From: yellows111 Date: Mon, 11 Mar 2024 17:13:39 +0000 Subject: [PATCH] Fix congratulations gui not being removed on retry Why would you want to replay the level after beating it, I don't know, but sure. --- marble/client/ui/endGameGui.gui | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/marble/client/ui/endGameGui.gui b/marble/client/ui/endGameGui.gui index 3433b3d..d9b14ea 100644 --- a/marble/client/ui/endGameGui.gui +++ b/marble/client/ui/endGameGui.gui @@ -52,7 +52,7 @@ new GuiControl(EndGameGui) { buttonType = "PushButton"; bitmap = "./endgame/continue"; }; - new GuiBitmapButtonCtrl() { + new GuiBitmapButtonCtrl(EndGameRetryButton) { profile = "GuiButtonProfile"; horizSizing = "right"; vertSizing = "bottom"; @@ -73,8 +73,10 @@ new GuiControl(EndGameGui) { function gameIsCompleteSignalForEndGameGui(%probably) { if(%probably) { + EndGameRetryButton.command = "Canvas.popDialog(congratsGui);Canvas.popDialog(EndGameGui);restartLevel();"; EndGameContinueButton.command = "Canvas.popDialog(EndGameGui);"; } else { + EndGameRetryButton.command = "Canvas.popDialog(EndGameGui);restartLevel();"; EndGameContinueButton.command = "setPlayMissionGui();"; } }