diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-01-03 00:20:30 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-01-03 00:20:30 +0000 |
commit | 4d1ed355a8b118242938be2c79fb74173b37f5a1 (patch) | |
tree | 9188247228f9dc9436959528a49e89f3350c32f1 /crawl-ref/source/menu.cc | |
parent | 3a61889e9e926b7b49a074bba327b694905623ff (diff) | |
download | crawl-ref-4d1ed355a8b118242938be2c79fb74173b37f5a1.tar.gz crawl-ref-4d1ed355a8b118242938be2c79fb74173b37f5a1.zip |
Allow tiles in 'V' menu, at least for items - the menu structure can't
handle monster information (yet?)
This means that the two parts (monsters/items) are differently formatted
but for Tiles this looks much better this way than it did before.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8143 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/menu.cc')
-rw-r--r-- | crawl-ref/source/menu.cc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/crawl-ref/source/menu.cc b/crawl-ref/source/menu.cc index 6daa92f940..6b282bd849 100644 --- a/crawl-ref/source/menu.cc +++ b/crawl-ref/source/menu.cc @@ -564,9 +564,10 @@ void Menu::draw_select_count(int count, bool force) { char buf[100] = ""; if (count) + { snprintf(buf, sizeof buf, " (%d item%s) ", count, (count > 1? "s" : "")); - + } draw_title_suffix(buf); } } @@ -1741,18 +1742,20 @@ int ToggleableMenu::pre_process(int key) toggle_keys.end() ) { // Toggle all menu entries - for ( unsigned int i = 0; i < items.size(); ++i ) + for (unsigned int i = 0; i < items.size(); ++i) { ToggleableMenuEntry* const p = dynamic_cast<ToggleableMenuEntry*>(items[i]); - if ( p ) + + if (p) p->toggle(); } // Toggle title ToggleableMenuEntry* const pt = dynamic_cast<ToggleableMenuEntry*>(title); - if ( pt ) + + if (pt) pt->toggle(); // Redraw |