diff options
-rw-r--r-- | crawl-ref/source/command.cc | 23 | ||||
-rw-r--r-- | crawl-ref/source/menu.cc | 4 | ||||
-rw-r--r-- | crawl-ref/source/shopping.cc | 17 | ||||
-rw-r--r-- | crawl-ref/source/spl-cast.cc | 4 |
4 files changed, 31 insertions, 17 deletions
diff --git a/crawl-ref/source/command.cc b/crawl-ref/source/command.cc index 6dec8688a0..f758fd84bc 100644 --- a/crawl-ref/source/command.cc +++ b/crawl-ref/source/command.cc @@ -24,6 +24,7 @@ REVISION("$Rev$"); #include "cio.h" #include "database.h" #include "debug.h" +#include "decks.h" #include "describe.h" #include "files.h" #include "initfile.h" @@ -1108,6 +1109,20 @@ static bool _feature_filter(std::string key, std::string body) return (feat_by_desc(key) == DNGN_UNSEEN); } +static bool _card_filter(std::string key, std::string body) +{ + key = lowercase_string(key); + std::string name; + for (int i = 0; i < NUM_CARDS; ++i) + { + name = lowercase_string(card_name((card_type) i)); + + if (name.find(key) != std::string::npos) + return (false); + } + return (true); +} + typedef void (*db_keys_recap)(std::vector<std::string>&); static void _recap_mon_keys(std::vector<std::string> &keys) @@ -1459,8 +1474,8 @@ static bool _find_description(bool &again, std::string& error_inout) if (!error_inout.empty()) mpr(error_inout.c_str(), MSGCH_PROMPT); - mpr("Describe a (M)onster, (S)pell, s(K)ill, (I)tem, (F)eature, (G)od " - "or (B)ranch?", MSGCH_PROMPT); + mpr("Describe a (M)onster, (S)pell, s(K)ill, (I)tem, (F)eature, (G)od, " + "(B)ranch, or (C)ard?", MSGCH_PROMPT); int ch = toupper(getch()); std::string type; @@ -1493,6 +1508,10 @@ static bool _find_description(bool &again, std::string& error_inout) type = "skill"; filter = _skill_filter; break; + case 'C': + type = "card"; + filter = _card_filter; + break; case 'I': type = "item"; extra = " Enter a single letter to list items displayed by " diff --git a/crawl-ref/source/menu.cc b/crawl-ref/source/menu.cc index f760fd2c13..277f6f0bac 100644 --- a/crawl-ref/source/menu.cc +++ b/crawl-ref/source/menu.cc @@ -118,11 +118,7 @@ Menu::Menu( const formatted_string &fs ) select_filter(), highlighter(new MenuHighlighter), num(-1), lastch(0), alive(false), last_selected(-1) { -#ifdef USE_TILE - mdisplay = new MenuDisplayText(this); -#else mdisplay = new MenuDisplayText(this); -#endif mdisplay->set_num_columns(1); int colour = LIGHTGREY; diff --git a/crawl-ref/source/shopping.cc b/crawl-ref/source/shopping.cc index 15fb4b87de..982cbb910c 100644 --- a/crawl-ref/source/shopping.cc +++ b/crawl-ref/source/shopping.cc @@ -105,12 +105,11 @@ static void _list_shop_keys(const std::string &purchasable, bool viewing) + (viewing ? "Examine" : "Buy"); } snprintf(buf, sizeof buf, + "[<w>x</w>/<w>Esc</w>" #ifdef USE_TILE - "[<w>x</w>/<w>Esc</w>/<w>R-Click</w>] exit" -#else - "[<w>x</w>/<w>Esc</w>] exit" + "/<w>R-Click</w>" #endif - " [<w>!</w>] %s %s", + "] exit [<w>!</w>] %s %s", (viewing ? "to select items " : "to examine items"), pkeys.c_str()); @@ -120,13 +119,13 @@ static void _list_shop_keys(const std::string &purchasable, bool viewing) cgotoxy(1, numlines, GOTO_CRT); fs = formatted_string::parse_string( + "[<w>Enter</w>" #ifdef USE_TILE - "[<w>?</w>/<w>*</w>] inventory [<w>\\</w>] known items " - "[<w>Enter</w>/<w>L-Click</w>] make purchase"); -#else - "[<w>Enter</w>] make purchase [<w>\\</w>] list known items " - "[<w>?</w>/<w>*</w>] inventory"); + "/<w>L-Click</w>" #endif + "] make purchase [<w>\\</w>] list known items " + "[<w>?</w>/<w>*</w>] inventory"); + fs.cprintf("%*s", get_number_of_cols() - fs.length() - 1, ""); fs.display(); } diff --git a/crawl-ref/source/spl-cast.cc b/crawl-ref/source/spl-cast.cc index c39774e896..88ffe247ae 100644 --- a/crawl-ref/source/spl-cast.cc +++ b/crawl-ref/source/spl-cast.cc @@ -182,8 +182,8 @@ static std::string _spell_extra_description(spell_type spell) int list_spells(bool toggle_with_I, bool viewing) { - ToggleableMenu spell_menu(MF_SINGLESELECT | MF_ANYPRINTABLE | - MF_ALWAYS_SHOW_MORE | MF_ALLOW_FORMATTING); + ToggleableMenu spell_menu(MF_SINGLESELECT | MF_ANYPRINTABLE + | MF_ALWAYS_SHOW_MORE | MF_ALLOW_FORMATTING); #ifdef USE_TILE { // [enne] - Hack. Make title an item so that it's aligned. |