summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/menu.h
diff options
context:
space:
mode:
authorNeil Moore <neil@s-z.org>2012-07-05 01:34:04 -0400
committerNeil Moore <neil@s-z.org>2012-07-05 02:36:01 -0400
commit33a2b7e32a922aaae6c83d1cfbe31625ce1c1014 (patch)
tree3e8f04062c4c73e4dc014c6551180ce151af0df1 /crawl-ref/source/menu.h
parente6c9c25219475abd3e9fb94264b8c822e228c5b0 (diff)
downloadcrawl-ref-33a2b7e32a922aaae6c83d1cfbe31625ce1c1014.tar.gz
crawl-ref-33a2b7e32a922aaae6c83d1cfbe31625ce1c1014.zip
Don't break autopickup menu with easy_exit_menu = true.
Because we used MF_EASY_EXIT as a hack for regenerating the menu, the user's easy_exit_menu option would prevent leaving the menu. Instead use lastch == CONTROL('R') to indicate that the menu should be re-entered, and respect the user's easy_exit_menu setting. Unfortunately, easy_exit_menu was disallowed when anything is selected, to prevent leaving e.g. the drop menu too soon. Override this behaviour for MT_KNOW inventory menus.
Diffstat (limited to 'crawl-ref/source/menu.h')
-rw-r--r--crawl-ref/source/menu.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/crawl-ref/source/menu.h b/crawl-ref/source/menu.h
index 6ed982ccba..6893c1038f 100644
--- a/crawl-ref/source/menu.h
+++ b/crawl-ref/source/menu.h
@@ -471,6 +471,8 @@ protected:
virtual bool is_selectable(int index) const;
virtual bool process_key(int keyin);
+
+ virtual bool allow_easy_exit() const;
};
/// Allows toggling by specific keys.