diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-01-11 08:43:24 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-01-11 08:43:24 +0000 |
commit | 9ed0206d8ee412153e794327376ed40a6737da6c (patch) | |
tree | 6f6eed58fbbd08b978984186f4372d34d5f5f6f4 /crawl-ref/source/stash.cc | |
parent | 670740704e4b9dcec66da1618f500f7bb18fddb8 (diff) | |
download | crawl-ref-9ed0206d8ee412153e794327376ed40a6737da6c.tar.gz crawl-ref-9ed0206d8ee412153e794327376ed40a6737da6c.zip |
Fix pickup and stash-search menus having unselectable items if there are lots
of items, and the term is taller than 52 lines.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@833 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/stash.cc')
-rw-r--r-- | crawl-ref/source/stash.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/crawl-ref/source/stash.cc b/crawl-ref/source/stash.cc index 8d6fd71f81..2a2f43b0f0 100644 --- a/crawl-ref/source/stash.cc +++ b/crawl-ref/source/stash.cc @@ -421,8 +421,8 @@ bool Stash::show_menu(const std::string &prefix, bool can_travel) const menu.can_travel = can_travel; mtitle->quantity = items.size(); menu.set_title(mtitle); - menu.load_items( InvMenu::xlat_itemvect(items), stash_menu_fixup); + std::vector<MenuEntry*> sel; while (true) { @@ -1454,6 +1454,10 @@ void StashTracker::display_search_results( mtitle->quantity = results.size(); stashmenu.set_title(mtitle); + // Don't make a menu so tall that we recycle hotkeys on the same page. + if (results.size() > 52) + stashmenu.set_maxpagesize(52); + menu_letter hotkey; for (unsigned i = 0; i < results.size(); ++i, ++hotkey) { |