diff options
author | ennewalker <ennewalker@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-02-12 05:05:43 +0000 |
---|---|---|
committer | ennewalker <ennewalker@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-02-12 05:05:43 +0000 |
commit | 76a5cc5049290770249b6661a2f4558b7fbb645e (patch) | |
tree | fa2131d2cef62d963d3c6c821c3ca230b541260f /crawl-ref/source/command.cc | |
parent | aa6dd78dceb8d09547021cd319aaaef053df1f4f (diff) | |
download | crawl-ref-76a5cc5049290770249b6661a2f4558b7fbb645e.tar.gz crawl-ref-76a5cc5049290770249b6661a2f4558b7fbb645e.zip |
Mousing over monsters, items, and features will now show their description in the message window. This inadvertantly fixes [2469950], where some lines would appear off screen.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9030 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/command.cc')
-rw-r--r-- | crawl-ref/source/command.cc | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/crawl-ref/source/command.cc b/crawl-ref/source/command.cc index ae0c88f9a1..1dcd900e9f 100644 --- a/crawl-ref/source/command.cc +++ b/crawl-ref/source/command.cc @@ -1255,10 +1255,9 @@ static bool _append_books(std::string &desc, item_def &item, std::string key) static bool _do_description(std::string key, std::string type, std::string footer = "") { + describe_info inf; std::string desc = getLongDescription(key); - std::string quote = getQuoteString(key); - - std::string prefix, suffix; + inf.quote = getQuoteString(key); int width = std::min(80, get_number_of_cols()); @@ -1267,8 +1266,8 @@ static bool _do_description(std::string key, std::string type, { if (is_good_god(which_god)) { - suffix = "$$" + god_name(which_god) + " won't accept worship from " - "undead or evil beings."; + inf.suffix = "$$" + god_name(which_god) + + " won't accept worship from undead or evil beings."; } std::string help = get_god_powers(which_god); if (!help.empty()) @@ -1361,7 +1360,11 @@ static bool _do_description(std::string key, std::string type, key = uppercase_first(key); linebreak_string2(footer, width - 1); - print_description(desc, key, suffix, prefix, footer, quote); + + inf.footer = footer; + inf.title = key; + + print_description(inf); return (true); } |