1
Fork 0
mirror of https://github.com/redstrate/Kawari.git synced 2025-06-30 03:37:45 +00:00

Account for the user pressing escape/cancel on controller to exit the bed menu (#80)

Yes, it's different than hitting Nothing on the menu!
This commit is contained in:
thedax 2025-06-28 11:50:01 -04:00 committed by GitHub
parent 2c159f591a
commit 7d5e9e3c57
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -22,6 +22,7 @@ end
function onReturn(scene, results, player)
local CUTSCENE_FLAGS <const> = FADE_OUT | HIDE_UI | CONDITION_CUTSCENE
-- Decision values the player can choose
local CANCEL_SCENE <const> = 0 -- If the player hits escape/cancel on controller to cancel the menu
local NOTHING <const> = 1
local DREAMFITTING <const> = 2
local LOG_OUT <const> = 3
@ -29,7 +30,7 @@ function onReturn(scene, results, player)
local decision <const> = results[1]
if scene == SCENE_SHOW_MENU then
if decision == NOTHING then
if decision == NOTHING or decision == CANCEL_SCENE then
player:finish_event(EVENT_ID)
else
if decision == LOG_OUT or decision == EXIT_GAME then