summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/stuff.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/stuff.cc')
-rw-r--r--crawl-ref/source/stuff.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/crawl-ref/source/stuff.cc b/crawl-ref/source/stuff.cc
index 7562d1e0b0..29c03cd096 100644
--- a/crawl-ref/source/stuff.cc
+++ b/crawl-ref/source/stuff.cc
@@ -725,7 +725,8 @@ void canned_msg(canned_message_type which_message)
// jmf: general helper (should be used all over in code)
// -- idea borrowed from Nethack
bool yesno( const char *str, bool safe, int safeanswer, bool clear_after,
- bool interrupt_delays, bool noprompt )
+ bool interrupt_delays, bool noprompt,
+ const explicit_keymap *map )
{
if (interrupt_delays && !crawl_state.is_repeating_cmd())
interrupt_activity( AI_FORCE_INTERRUPT );
@@ -737,6 +738,9 @@ bool yesno( const char *str, bool safe, int safeanswer, bool clear_after,
int tmp = getchm(KC_CONFIRM);
+ if (map && map->find(tmp) != map->end())
+ tmp = map->find(tmp)->second;
+
if ((tmp == ' ' || tmp == 27 || tmp == '\r' || tmp == '\n')
&& safeanswer)
tmp = safeanswer;