summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/directn.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-04-05 15:21:03 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-04-05 15:21:03 +0000
commita3d677965e6a5c80754354d881c3fde7998503ca (patch)
tree9c8b4c00a04389b38077ddf17470e7c71e2c8f0f /crawl-ref/source/directn.cc
parentb35bbebf2c3cfb01dcd429c19412452bb6024593 (diff)
downloadcrawl-ref-a3d677965e6a5c80754354d881c3fde7998503ca.tar.gz
crawl-ref-a3d677965e6a5c80754354d881c3fde7998503ca.zip
Make the toggle actually update the title for V and a.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9582 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/directn.cc')
-rw-r--r--crawl-ref/source/directn.cc28
1 files changed, 23 insertions, 5 deletions
diff --git a/crawl-ref/source/directn.cc b/crawl-ref/source/directn.cc
index a151b45e99..f79df0c226 100644
--- a/crawl-ref/source/directn.cc
+++ b/crawl-ref/source/directn.cc
@@ -523,22 +523,39 @@ void full_describe_view()
// FIXME: Need different title for the opposite toggle:
// "Visible Monsters/Items (select for more detail, '!' to examine):"
std::string title = "";
+ std::string action = "";
if (!list_mons.empty())
- title += "Monsters";
+ {
+ title = "Monsters";
+ action = "view"; // toggle views monster description
+ }
+ bool nonmons = false;
if (!list_items.empty())
{
if (!title.empty())
title += "/";
title += "Items";
+ nonmons = true;
}
if (!list_features.empty())
{
if (!title.empty())
title += "/";
title += "Features";
+ nonmons = true;
}
- title = "Visible " + title + " (select for more detail, '!' to view/travel):";
- desc_menu.set_title( new MenuEntry(title, MEL_TITLE));
+ if (nonmons)
+ {
+ if (!action.empty())
+ action += "/";
+ action += "travel"; // toggle travels to items/features
+ }
+ title = "Visible " + title;
+ std::string title1 = title + " (select to " + action + ", '!' to examine):";
+ title += " (select for more detail, '!' to " + action + "):";
+
+ desc_menu.set_title( new MenuEntry(title, MEL_TITLE), false);
+ desc_menu.set_title( new MenuEntry(title1, MEL_TITLE) );
desc_menu.set_tag("pickup");
desc_menu.set_type(MT_PICKUP); // necessary for sorting of the item submenu
@@ -3029,7 +3046,8 @@ static std::string _get_monster_desc(const monsters *mon)
if (mons_is_sleeping(mon))
{
text += pronoun + " appears to be "
- + (mons_is_confused(mon) ? "sleepwalking" : "resting")
+ + (mons_is_confused(mon, true) ? "sleepwalking"
+ : "resting")
+ ".\n";
}
// Applies to both friendlies and hostiles
@@ -3039,7 +3057,7 @@ static std::string _get_monster_desc(const monsters *mon)
else if (!mons_friendly(mon) && !mons_neutral(mon)
&& mon->foe != MHITYOU && !crawl_state.arena_suspended)
{
- // special case: batty monsters get set to BEH_WANDER as
+ // Special case: batty monsters get set to BEH_WANDER as
// part of their special behaviour.
if (!mons_is_batty(mon))
text += pronoun + " doesn't appear to have noticed you.\n";