show/hide the entry window when skipping puzzle

This commit is contained in:
2022-08-30 15:38:04 +00:00
parent 6a57612e5f
commit 154b696280

View File

@@ -285,6 +285,7 @@
(_makeText "Abandon this puzzle" 0 (_makeText "Abandon this puzzle" 0
->_ ->_
(defAndCall method skipPuzzle (defAndCall method skipPuzzle
(entryWindow.hide)
(model.skipRewardFile) (model.skipRewardFile)
(setModel model))))) (setModel model)))))
(set entryWindow.textColor FlxColor.ORANGE) (set entryWindow.textColor FlxColor.ORANGE)
@@ -687,6 +688,7 @@
collected) collected)
(prop &mut :FlxGroup nextPuzzleChoiceGroup null) (prop &mut :FlxGroup nextPuzzleChoiceGroup null)
(method :Void startPuzzlePackChoice [nextStartingPoints] (method :Void startPuzzlePackChoice [nextStartingPoints]
(when rewardSprites (rewardSprites.kill))
(set puzzlePackChoiceWindow (SimpleWindow.promptForChoice "Choose a puzzle pack:" (set puzzlePackChoiceWindow (SimpleWindow.promptForChoice "Choose a puzzle pack:"
(PuzzlePack.availablePacks model) (PuzzlePack.availablePacks model)
->[:PuzzlePack pack] (ifLet [(Some np) pack.nextPuzzle] ->[:PuzzlePack pack] (ifLet [(Some np) pack.nextPuzzle]
@@ -698,7 +700,8 @@
w (max 1 (Math.round (* aspectRatioX chosenSize))) w (max 1 (Math.round (* aspectRatioX chosenSize)))
h (max 1 (Math.round (* aspectRatioY chosenSize)))] h (max 1 (Math.round (* aspectRatioY chosenSize)))]
(model.addRewardFile np.path nextStartingPoints w h pointsPerPiece) (model.addRewardFile np.path nextStartingPoints w h pointsPerPiece)
(setModel model))) (setModel model)
(entryWindow.show)))
(startPuzzlePackChoice nextStartingPoints)) (startPuzzlePackChoice nextStartingPoints))
null null FlxColor.LIME null 0.9)) null null FlxColor.LIME null 0.9))
(set puzzlePackChoiceWindow.cameras [uiCamera])) (set puzzlePackChoiceWindow.cameras [uiCamera]))