From c20c6715b299eda038bb94b26635fbc894b31cc2 Mon Sep 17 00:00:00 2001 From: Eric Pierce Date: Tue, 4 Feb 2020 19:24:24 -0700 Subject: [PATCH] Make ESC key stop trying to sleep In most other popup prompts in the game, pressing ESC cancels whatever was being attempted, and generally prevents any further actions or time passing. Before this commit, the "You have trouble sleeping, keep trying?" prompt would treat ESC as synonymous with "c", or "Continue trying to fall asleep." In other words, ESC did not cancel or escape the menu, as a player would expect from the behavior of other ingame menus. After this commit, pressing ESC in the "You have trouble sleeping" prompt is the same as "S", "Stop trying to fall asleep and get up." This is the quickest shortcut to cancel the sleeping action, and stop time from continuing to pass. --- src/activity_handlers.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/activity_handlers.cpp b/src/activity_handlers.cpp index f84ac0c4dfec3..1ab05183d41c0 100644 --- a/src/activity_handlers.cpp +++ b/src/activity_handlers.cpp @@ -3126,6 +3126,7 @@ void activity_handlers::try_sleep_query( player_activity *act, player *p ) _( "Continue trying to fall asleep and don't ask again." ) ); sleep_query.query(); switch( sleep_query.ret ) { + case UILIST_CANCEL: case 1: act->set_to_null(); break;