From 2f502ad2e18856b2207756b98d2b54fc6e5764b3 Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Fri, 1 Aug 2008 22:43:46 +0000 Subject: 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 --- crawl-ref/source/shopping.cc | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'crawl-ref/source/shopping.cc') 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, "[x/Esc] Exit [v] Examine Items %s", @@ -117,7 +117,7 @@ static void _list_shop_keys(const std::string &purchasable) fs = formatted_string::parse_string( "[?/*] Inventory " - "[\\] Known Items"); + "[\\] Known Items [Enter] 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& 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); -- cgit v1.2.3-54-g00ecf