summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/menu.cc
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2007-07-03 21:55:23 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2007-07-03 21:55:23 +0000
commit00bb42dc5e7570932126361340420b339c0e265c (patch)
treec24b1ce518515a954f05185e80117301d42b9fb3 /crawl-ref/source/menu.cc
parent2f988e26917a2fd048d66f16117f4f7627a80dd3 (diff)
downloadcrawl-ref-00bb42dc5e7570932126361340420b339c0e265c.tar.gz
crawl-ref-00bb42dc5e7570932126361340420b339c0e265c.zip
Coloured power display. This is, for now, a rather extreme hack.
Note that some spells (e.g. Apportation) have no actual power limits, so they will always be 'red'. Suggestions welcome. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1736 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/menu.cc')
-rw-r--r--crawl-ref/source/menu.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/crawl-ref/source/menu.cc b/crawl-ref/source/menu.cc
index 10573e0f6e..539d9bad17 100644
--- a/crawl-ref/source/menu.cc
+++ b/crawl-ref/source/menu.cc
@@ -572,7 +572,10 @@ void Menu::draw_index_item(int index, const MenuEntry *me) const
void Menu::draw_stock_item(int index, const MenuEntry *me) const
{
textattr( item_colour(index, items[index]) );
- cprintf( "%s", items[index]->get_text().c_str() );
+ if ( flags & MF_ALLOW_FORMATTING )
+ formatted_string::parse_string(items[index]->get_text()).display();
+ else
+ cprintf( "%s", items[index]->get_text().c_str() );
}
bool Menu::page_down()