From 154b69628095afb767ea62b9781078cf89c935f0 Mon Sep 17 00:00:00 2001 From: Nat Quayle Nelson Date: Tue, 30 Aug 2022 15:38:04 +0000 Subject: [PATCH] show/hide the entry window when skipping puzzle --- .../flixel-desktop-habit-puzzle-game/source/HabitState.kiss | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/projects/flixel-desktop-habit-puzzle-game/source/HabitState.kiss b/projects/flixel-desktop-habit-puzzle-game/source/HabitState.kiss index 1474ea52..b3a924cf 100644 --- a/projects/flixel-desktop-habit-puzzle-game/source/HabitState.kiss +++ b/projects/flixel-desktop-habit-puzzle-game/source/HabitState.kiss @@ -285,6 +285,7 @@ (_makeText "Abandon this puzzle" 0 ->_ (defAndCall method skipPuzzle + (entryWindow.hide) (model.skipRewardFile) (setModel model))))) (set entryWindow.textColor FlxColor.ORANGE) @@ -687,6 +688,7 @@ collected) (prop &mut :FlxGroup nextPuzzleChoiceGroup null) (method :Void startPuzzlePackChoice [nextStartingPoints] + (when rewardSprites (rewardSprites.kill)) (set puzzlePackChoiceWindow (SimpleWindow.promptForChoice "Choose a puzzle pack:" (PuzzlePack.availablePacks model) ->[:PuzzlePack pack] (ifLet [(Some np) pack.nextPuzzle] @@ -698,7 +700,8 @@ w (max 1 (Math.round (* aspectRatioX chosenSize))) h (max 1 (Math.round (* aspectRatioY chosenSize)))] (model.addRewardFile np.path nextStartingPoints w h pointsPerPiece) - (setModel model))) + (setModel model) + (entryWindow.show))) (startPuzzlePackChoice nextStartingPoints)) null null FlxColor.LIME null 0.9)) (set puzzlePackChoiceWindow.cameras [uiCamera]))