summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/menu.cc
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2007-06-30 15:17:02 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2007-06-30 15:17:02 +0000
commit34cc3ee5d9832be20c635849dc592611c4697f2c (patch)
tree5cd87912bea44920035af876766b976ceea5c98b /crawl-ref/source/menu.cc
parenta8878308615ed621f4e0f3d041c3bd13403258e3 (diff)
downloadcrawl-ref-34cc3ee5d9832be20c635849dc592611c4697f2c.tar.gz
crawl-ref-34cc3ee5d9832be20c635849dc592611c4697f2c.zip
The tutorial now uses set_more() to display the ability-menu help
(so Menu doesn't need to be aware of the tutorial.) set_more() support with multi-line strings will only work if there are enough free lines; it doesn't (yet) reduce pagesize. Also, it doesn't handle newlines which aren't EOLs. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1700 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/menu.cc')
-rw-r--r--crawl-ref/source/menu.cc12
1 files changed, 4 insertions, 8 deletions
diff --git a/crawl-ref/source/menu.cc b/crawl-ref/source/menu.cc
index e4a3ea7904..85f596b1db 100644
--- a/crawl-ref/source/menu.cc
+++ b/crawl-ref/source/menu.cc
@@ -97,7 +97,7 @@ void Menu::reset()
first_entry = 0;
}
-std::vector<MenuEntry *> Menu::show(bool reuse_selections, bool tut_abil)
+std::vector<MenuEntry *> Menu::show(bool reuse_selections)
{
cursor_control cs(false);
@@ -111,18 +111,14 @@ std::vector<MenuEntry *> Menu::show(bool reuse_selections, bool tut_abil)
if (max_pagesize > 0 && pagesize > max_pagesize)
pagesize = max_pagesize;
- do_menu(tut_abil);
+ do_menu();
return (sel);
}
-void Menu::do_menu(bool tut_abil)
+void Menu::do_menu()
{
draw_menu();
- if (tut_abil)
- {
- tut_describe_abilities();
- }
alive = true;
while (alive)
@@ -477,7 +473,7 @@ void Menu::draw_menu()
}
if (end < (int) items.size() || is_set(MF_ALWAYS_SHOW_MORE))
{
- gotoxy( 1, y_offset + pagesize );
+ gotoxy( 1, y_offset + pagesize - count_linebreaks(more) );
more.display();
}
}