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.
This commit is contained in:
yellows111 2024-03-11 17:13:39 +00:00
parent 71a29803ff
commit 35a70c21e6
1 changed files with 3 additions and 1 deletions

View File

@ -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();";
}
}