From 0bc00794625760f93f2d1fd20a78d02aaa7299f9 Mon Sep 17 00:00:00 2001 From: zelgadis Date: Mon, 17 Sep 2007 02:55:58 +0000 Subject: A handful of new game options: menu_colour_prefix_id, if set to true, causes the identification state of an object to be prefixed to the string menu colour regexes are matched against (but does not alter the string displayed on the screen). menu_colour_prefix_class, if set to true, prefixes the object's base type to the string menu colour regexes are matched against. user_note_prefix can be set to a string which will be prefixed to manual user notes when they are displayed, to make them easier to find. detailed_hunger, if set to true, will cause three new informational-only hunger states to be displayed: near starving, very hungry and very full. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2121 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/menu.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'crawl-ref/source/menu.h') diff --git a/crawl-ref/source/menu.h b/crawl-ref/source/menu.h index f169263a98..f2fbc5b359 100644 --- a/crawl-ref/source/menu.h +++ b/crawl-ref/source/menu.h @@ -47,6 +47,9 @@ struct menu_letter struct item_def; +int menu_colour(const std::string &itemtext, + const std::string &prefix = ""); + struct MenuEntry { std::string text; @@ -103,6 +106,11 @@ struct MenuEntry return text; } + virtual int highlight_colour() const + { + return (menu_colour(get_text())); + } + virtual bool selected() const { return selected_qty > 0 && quantity; @@ -403,7 +411,6 @@ protected: bool jump_to( int linenum ); }; -int menu_colour(const std::string &itemtext); int linebreak_string( std::string& s, int wrapcol, int maxcol ); int linebreak_string2( std::string& s, int maxcol ); void print_formatted_paragraph( std::string &s, int maxcol, -- cgit v1.2.3-54-g00ecf