From 7e341be73d63a8123cd0b55c12f40534281ffe44 Mon Sep 17 00:00:00 2001 From: Celtic Minstrel Date: Mon, 26 Jan 2015 18:55:40 -0500 Subject: [PATCH] Add key labels to get item dialog and make it more clear when items are not identified. --- rsrc/dialogs/get-items.xml | 20 ++++++++------------ src/boe.items.cpp | 5 +++++ src/boe.newgraph.cpp | 2 +- 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/rsrc/dialogs/get-items.xml b/rsrc/dialogs/get-items.xml index ab1bd4e8..d75c6ae5 100644 --- a/rsrc/dialogs/get-items.xml +++ b/rsrc/dialogs/get-items.xml @@ -19,40 +19,36 @@ You Find: - - - + - + - + - + - + - + - + - + diff --git a/src/boe.items.cpp b/src/boe.items.cpp index 9b60b6e5..b8001508 100644 --- a/src/boe.items.cpp +++ b/src/boe.items.cpp @@ -413,6 +413,7 @@ void set_town_attitude(short lo,short hi,short att) { static void put_item_graphics(cDialog& me, size_t& first_item_shown, short& current_getting_pc, const std::vector& item_array) { short i; cItem item; + char key_stash[2] = "a"; // First make sure all arrays for who can get stuff are in order. if(current_getting_pc < 6 && (univ.party[current_getting_pc].main_status != eMainStatus::ALIVE @@ -454,6 +455,8 @@ static void put_item_graphics(cDialog& me, size_t& first_item_shown, short& curr sout << "item" << i + 1; std::string pict = sout.str() + "-g", name = sout.str() + "-name"; std::string detail = sout.str() + "-detail", weight = sout.str() + "-weight"; + std::string key = sout.str() + "-key"; + key_stash[0] = 'a' + i; try { if(item_array.at(i + first_item_shown)->variety == eItemType::NO_ITEM) @@ -469,11 +472,13 @@ static void put_item_graphics(cDialog& me, size_t& first_item_shown, short& curr else pic.setPict(item.graphic_num, PIC_ITEM); me[detail].setText(get_item_interesting_string(item)); me[weight].setText("Weight: " + std::to_string(item.item_weight())); + me[key].setText(key_stash); } catch(std::out_of_range) { // erase the spot me[pict].hide(); me[name].setText(""); me[detail].setText(""); me[weight].setText(""); + me[key].setText(""); } } diff --git a/src/boe.newgraph.cpp b/src/boe.newgraph.cpp index cd3fe72e..5c04c6a8 100644 --- a/src/boe.newgraph.cpp +++ b/src/boe.newgraph.cpp @@ -894,7 +894,7 @@ std::string get_item_interesting_string(cItem item) { return "Not yours."; } if(!item.ident) { - return ""; + return "Not identified."; } if(item.cursed) { return "Cursed item.";