diff --git a/rsrc/dialogs/get-items.xml b/rsrc/dialogs/get-items.xml
index 93ee78e3..3eeccd36 100644
--- a/rsrc/dialogs/get-items.xml
+++ b/rsrc/dialogs/get-items.xml
@@ -59,11 +59,19 @@
+
+
+
+
+
+
+
+
diff --git a/src/game/boe.items.cpp b/src/game/boe.items.cpp
index f294ef7d..a8713940 100644
--- a/src/game/boe.items.cpp
+++ b/src/game/boe.items.cpp
@@ -23,6 +23,7 @@
#include "message.hpp"
#include "prefs.hpp"
#include
+#include "view_dialogs.hpp"
#include "winutil.hpp"
#include "cursors.hpp"
@@ -401,6 +402,7 @@ static void put_item_graphics(cDialog& me, size_t& first_item_shown, short& curr
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";
+ std::string info = sout.str() + "-info";
key_stash[0] = 'a' + i;
// TODO: Rework this so that no exceptions are required
@@ -414,12 +416,14 @@ static void put_item_graphics(cDialog& me, size_t& first_item_shown, short& curr
me[detail].setText(get_item_interesting_string(item));
me[weight].setText("Weight: " + std::to_string(item.item_weight()));
me[key].setText(key_stash);
+ me[info].show();
} else { // erase the spot
me[pict].hide();
me[name].setText("");
me[detail].setText("");
me[weight].setText("");
me[key].setText("");
+ me[info].hide();
}
}
@@ -457,6 +461,17 @@ static bool display_item_event_filter(cDialog& me, std::string id, size_t& first
} else if(id.substr(0,2) == "pc") {
current_getting_pc = id[2] - '1';
put_item_graphics(me, first_item_shown, current_getting_pc, item_array);
+ } else if(id.substr(0,4) == "item" && id.length()==10 && id.substr(5,5)=="-info") {
+ size_t item_hit;
+ item_hit = id[4] - '1';
+ item_hit += first_item_shown;
+ if(item_hit >= item_array.size()) return true;
+ cDialog itemInfo("item-info",&me);
+ itemInfo.attachClickHandlers([](cDialog&me, std::string const &id,eKeyMod){if (id=="done") me.toast(true); return true;}, {"done","left","right","id","magic"});
+ itemInfo["left"].hide();
+ itemInfo["right"].hide();
+ put_item_info(itemInfo,*item_array[item_hit],univ.scenario);
+ itemInfo.run();
} else {
if(current_getting_pc == 6) return true;
size_t item_hit;
@@ -567,6 +582,9 @@ bool show_get_items(std::string titleText, std::vector& itemRefs, short
sout << "item" << i << "-key";
itemDialog[sout.str()].attachKey({false, static_cast('`' + i), mod_none});
itemDialog[sout.str()].attachClickHandler(handler);
+ sout.str("");
+ sout << "item" << i << "-info";
+ itemDialog[sout.str()].attachClickHandler(handler);
}
put_item_graphics(itemDialog, first_item, pc_getting, itemRefs);