FeebackWindow in pause menu

This commit is contained in:
2023-08-14 16:23:48 -06:00
parent 4a65533078
commit 65c98f1416
2 changed files with 21 additions and 6 deletions

View File

@@ -1,4 +1,4 @@
# @install: lix --silent download "gh://github.com/kiss-lang/kiss-flixel#ffbf4a90ad79f11f1bf9b46b1df664fc1cb2901b" into kiss-flixel/0.0.0/github/ffbf4a90ad79f11f1bf9b46b1df664fc1cb2901b
# @install: lix --silent download "gh://github.com/kiss-lang/kiss-flixel#bcdc1124ee6a87bcdbcffe127be9632829caaae6" into kiss-flixel/0.0.0/github/bcdc1124ee6a87bcdbcffe127be9632829caaae6
-lib flixel
-lib flixel-addons
-lib flixel-ui
@@ -6,5 +6,5 @@
-lib kiss-tools
-lib lime
-lib openfl
-cp ${HAXE_LIBCACHE}/kiss-flixel/0.0.0/github/ffbf4a90ad79f11f1bf9b46b1df664fc1cb2901b/src/
-cp ${HAXE_LIBCACHE}/kiss-flixel/0.0.0/github/bcdc1124ee6a87bcdbcffe127be9632829caaae6/src/
-D kiss-flixel=0.0.0

View File

@@ -112,12 +112,13 @@
(sh.registerItem "{escape} pause" ->cc (showPauseMenu cc) true)
(resume)
} true)
(let [choices ["" "Resume" "Scene Selection" "Options" "Main Menu" "Quit to Desktop"]
(let [choices ["" "Resume" "Scene Selection" "Options" "Send Feedback" "Main Menu" "Quit to Desktop"]
sceneSelectionIndex (choices.indexOf "Scene Selection")
optsIdx (choices.indexOf "Options")]
optsIdx (choices.indexOf "Options")
feedbackIdx (choices.indexOf "Send Feedback")]
// chooseString automatically sets pauseMenu
(chooseString "PAUSED" choices
->choice
->:Void choice
(case choice
("Resume"
(sh.registerItem "{escape} pause" ->cc (showPauseMenu cc) true)
@@ -141,6 +142,19 @@
(showPauseMenu resume)
(set pauseMenu.selectedIndex optsIdx)
}))
("Send Feedback"
(sh.cancel)
(.enableGamepadInput
(kiss_flixel.FeedbackWindow.collectFeedback
->:Void {
(sh.start)
(showPauseMenu resume)
(set pauseMenu.selectedIndex feedbackIdx)
}
null
null
true
"escape") true))
("Main Menu" (FlxG.switchState (new MenuState)))
("Quit to Desktop" (Sys.exit 0))
(never otherwise)))))
@@ -455,7 +469,8 @@
(FlxG.state.add loop)))
(method :Void hideTitleCard []
(FlxG.state.remove titleCard true))
(FlxG.state.remove titleCard true)
(set titleCard null))
// TODO these could be customizable to the Actor, wrylies, etc.
(var DIALOG_BOX_COLOR FlxColor.BLACK)