diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-09-19 17:58:35 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-09-19 17:58:35 +0000 |
commit | bb7663ad4d03b1e36d1cbc28d797a19dfe39bbd0 (patch) | |
tree | ada9fcc62888bbbf5fcbc8491e28b2d90dbf73de | |
parent | ae6c83ec9f0273d13ad57f1382528d7715189a2b (diff) | |
download | crawl-ref-bb7663ad4d03b1e36d1cbc28d797a19dfe39bbd0.tar.gz crawl-ref-bb7663ad4d03b1e36d1cbc28d797a19dfe39bbd0.zip |
Highlighting species in aptitudes list, and added the
"." command to help screen. I've added some "\n" to make
it look nice (on Windows) but it's looking differently
on Linux. *shrugs*
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2147 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r-- | crawl-ref/source/command.cc | 12 | ||||
-rw-r--r-- | crawl-ref/source/menu.cc | 32 |
2 files changed, 38 insertions, 6 deletions
diff --git a/crawl-ref/source/command.cc b/crawl-ref/source/command.cc index c450cecfe8..8a234a49fc 100644 --- a/crawl-ref/source/command.cc +++ b/crawl-ref/source/command.cc @@ -912,16 +912,16 @@ void list_commands(bool wizard, int hotkey) "<w>W</w> : Wear armour\n" "<w>T</w> : Take off armour\n" "<w>P</w> : Put on jewellery\n" - "<w>R</w> : Remove jewellery\n", + "<w>R</w> : Remove jewellery" + "\n ", true, true, cmdhelp_textfilter); cols.add_formatted( 0, "<h>In-game Toggles:\n" "<w>Ctrl-A</w> : toggle Autopickup\n" - "<w>Ctrl-V</w> : toggle auto-prayer" - " \n" - " \n", + "<w>Ctrl-V</w> : toggle auto-prayer\n" + "\n ", true, true, cmdhelp_textfilter); cols.add_formatted( @@ -941,8 +941,7 @@ void list_commands(bool wizard, int hotkey) "<lightgreen>}</lightgreen> : miscellaneous items (<w>E</w>voke)\n" "<lightmagenta>0</lightmagenta> : the Orb of Zot (Carry the Orb \n" " to the surface and win!)\n" - "<yellow>$</yellow> : gold\n" - " \n", + "<yellow>$</yellow> : gold\n", true, true, cmdhelp_textfilter); cols.add_formatted( @@ -1042,6 +1041,7 @@ void list_commands(bool wizard, int hotkey) "<w>+</w> : selects books\n" "<w>\\</w> : selects staves\n" "<w>}</w> : selects miscellaneous items\n" + "<w>.</w> : selects next item\n" "<w>,</w> : global selection\n" "<w>-</w> : global deselection\n" "<w>*</w> : invert selection\n", diff --git a/crawl-ref/source/menu.cc b/crawl-ref/source/menu.cc index 660786404e..7936be1bb1 100644 --- a/crawl-ref/source/menu.cc +++ b/crawl-ref/source/menu.cc @@ -11,6 +11,7 @@ #include "menu.h" #include "macro.h" #include "message.h" +#include "player.h" #include "tutorial.h" #include "view.h" #include "initfile.h" @@ -548,11 +549,42 @@ void Menu::update_title() gotoxy(x, y); } +// to highlight species in aptitudes list ('?%') +static std::string get_species_key() +{ + if (player_genus(GENPC_DRACONIAN) && you.experience_level < 7) + return ""; + + std::string result = ""; + switch (you.species) + { + case SP_RED_DRACONIAN: result = "Red"; break; + case SP_WHITE_DRACONIAN: result = "White"; break; + case SP_GREEN_DRACONIAN: result = "Green"; break; + case SP_GOLDEN_DRACONIAN: result = "Yellow"; break; + case SP_GREY_DRACONIAN: result = "Grey"; break; + case SP_BLACK_DRACONIAN: result = "Black"; break; + case SP_PURPLE_DRACONIAN: result = "Purple"; break; + case SP_MOTTLED_DRACONIAN: result = "Mottled"; break; + case SP_PALE_DRACONIAN: result = "Pale"; break; + default: + result = species_name(you.species, 1); + } + result += " "; + return (result); +} + int Menu::item_colour(int, const MenuEntry *entry) const { int icol = -1; if (highlighter) icol = highlighter->entry_colour(entry); + else + { + text_pattern tp(get_species_key()); + if (!tp.empty() && tp.matches(entry->text)) + icol = WHITE; + } return (icol == -1? entry->colour : icol); } |