diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-08-01 22:43:46 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-08-01 22:43:46 +0000 |
commit | 2f502ad2e18856b2207756b98d2b54fc6e5764b3 (patch) | |
tree | b107630c10dc120a11a9f6bb3578b9b11c3de416 /crawl-ref/source/shopping.cc | |
parent | 6abca99d684429a8d909260cec1f3c0f76f8ecc7 (diff) | |
download | crawl-ref-2f502ad2e18856b2207756b98d2b54fc6e5764b3.tar.gz crawl-ref-2f502ad2e18856b2207756b98d2b54fc6e5764b3.zip |
FR 2026227: Make $ list current gold.
FR 2027307: Use menu colours for shops, with an option to turn it off to
get the striped menu again.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6750 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/shopping.cc')
-rw-r--r-- | crawl-ref/source/shopping.cc | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/crawl-ref/source/shopping.cc b/crawl-ref/source/shopping.cc index 3568d5d79d..4e9f6eb3f6 100644 --- a/crawl-ref/source/shopping.cc +++ b/crawl-ref/source/shopping.cc @@ -104,7 +104,7 @@ static void _list_shop_keys(const std::string &purchasable) std::string pkeys = _purchase_keys(purchasable); if (!pkeys.empty()) - pkeys = "[" + pkeys + "] Buy Item"; + pkeys = "[" + pkeys + "] Select Item"; snprintf(buf, sizeof buf, "[<w>x</w>/<w>Esc</w>] Exit [<w>v</w>] Examine Items %s", @@ -117,7 +117,7 @@ static void _list_shop_keys(const std::string &purchasable) fs = formatted_string::parse_string( "[<w>?</w>/<w>*</w>] Inventory " - "[<w>\\</w>] Known Items"); + "[<w>\\</w>] Known Items [<w>Enter</w>] Make Purchase"); fs.cprintf("%*s", get_number_of_cols() - fs.length() - 1, ""); fs.display(); } @@ -193,7 +193,18 @@ static std::string _shop_print_stock( const std::vector<int>& stock, else cprintf("%c - ", c); - textcolor(i % 2 ? LIGHTGREY : WHITE); + + if (Options.menu_colour_shops) + { + // Colour stock according to menu colours. + const std::string colprf = menu_colour_item_prefix(mitm[stock[i]]); + const int col = menu_colour(mitm[stock[i]].name(DESC_NOCAP_A), + colprf, "shop"); + textcolor(col != -1 ? col : LIGHTGREY); + } + else + textcolor(i % 2 ? LIGHTGREY : WHITE); + cprintf("%-56s%5d gold", mitm[stock[i]].name(DESC_NOCAP_A, false, id).c_str(), gp_value); |