diff options
author | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-06-30 15:17:02 +0000 |
---|---|---|
committer | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-06-30 15:17:02 +0000 |
commit | 34cc3ee5d9832be20c635849dc592611c4697f2c (patch) | |
tree | 5cd87912bea44920035af876766b976ceea5c98b /crawl-ref/source/tutorial.cc | |
parent | a8878308615ed621f4e0f3d041c3bd13403258e3 (diff) | |
download | crawl-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/tutorial.cc')
-rw-r--r-- | crawl-ref/source/tutorial.cc | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/crawl-ref/source/tutorial.cc b/crawl-ref/source/tutorial.cc index f221e2eec8..10ac59b00c 100644 --- a/crawl-ref/source/tutorial.cc +++ b/crawl-ref/source/tutorial.cc @@ -1321,20 +1321,20 @@ void learned_something_new(tutorial_event_type seen_what, int x, int y) Options.tutorial_left--; } -void tut_describe_abilities() +formatted_string tut_abilities_info() { - const int bottom_line = (get_number_of_lines() > 30) ? 30 : get_number_of_lines(); - textcolor(MAGENTA); - gotoxy(1, bottom_line-5); - std::string text = - "This screen shows your character's set of talents. You can gain new " EOL - "abilities via certain items, through religion or by way of mutations. " EOL - "Activation of an ability usually comes at a cost, e.g. nutrition or " EOL - "Magic power. "; - if (you.religion == GOD_TROG) text += - "<w>Renounce Religion<magenta> will make your character leave your god" EOL - "(and usually anger said god), while <w>Berserk<magenta> temporarily increases your" EOL - "damage output in melee fights."; - - formatted_string::parse_block(text, false).display(); + std::string text = "<magenta>" + "This screen shows your character's set of talents. You can gain new " EOL + "abilities via certain items, through religion or by way of mutations. " EOL + "Activation of an ability usually comes at a cost, e.g. nutrition or " EOL + "Magic power. "; + + if (you.religion == GOD_TROG) + { + text += + "<w>Renounce Religion<magenta> will make your character leave your god" EOL + "(and usually anger said god), while <w>Berserk<magenta> temporarily increases your" EOL + "damage output in melee fights."; + } + return formatted_string::parse_string(text, false); } |