summaryrefslogtreecommitdiff
path: root/src/resources/iteminfo.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-08-09 18:47:10 +0300
committerAndrei Karas <akaras@inbox.ru>2017-08-09 18:47:10 +0300
commitb3fa7a53a29a1001935514a38f140af2b816771a (patch)
treea1d9449975a266e64bcc377ca692eb8d04f645e4 /src/resources/iteminfo.h
parentc0dbb0d20fb321ecf12cdcc22d960b3572e35286 (diff)
downloadmanaplus-b3fa7a53a29a1001935514a38f140af2b816771a.tar.gz
manaplus-b3fa7a53a29a1001935514a38f140af2b816771a.tar.bz2
manaplus-b3fa7a53a29a1001935514a38f140af2b816771a.tar.xz
manaplus-b3fa7a53a29a1001935514a38f140af2b816771a.zip
Allow for each item replace equip/use menu item to custom menu.
Separate menus supproted for inventory, storage, cart.
Diffstat (limited to 'src/resources/iteminfo.h')
-rw-r--r--src/resources/iteminfo.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/resources/iteminfo.h b/src/resources/iteminfo.h
index 92474ff7e..414fa45b8 100644
--- a/src/resources/iteminfo.h
+++ b/src/resources/iteminfo.h
@@ -31,6 +31,7 @@
#include "resources/cursors.h"
#include "resources/itemcolordata.h"
+#include "resources/itemmenuitem.h"
#include "resources/missileinfo.h"
#include "resources/soundinfo.h"
@@ -313,6 +314,20 @@ class ItemInfo final
std::string getIconColorName(const ItemColor idx) const;
std::string getIconColor(const ItemColor idx) const;
+ STD_VECTOR<ItemMenuItem> &getInventoryMenu()
+ { return mInventoryMenu; }
+ STD_VECTOR<ItemMenuItem> &getStorageMenu()
+ { return mStorageMenu; }
+ STD_VECTOR<ItemMenuItem> &getCartMenu()
+ { return mCartMenu; }
+
+ const STD_VECTOR<ItemMenuItem> &getInventoryMenuConst() const A_CONST
+ { return mInventoryMenu; }
+ const STD_VECTOR<ItemMenuItem> &getStorageMenuConst() const A_CONST
+ { return mStorageMenu; }
+ const STD_VECTOR<ItemMenuItem> &getCartMenuConst() const A_CONST
+ { return mCartMenu; }
+
int mDrawBefore[10];
int mDrawAfter[10];
int mDrawPriority[10];
@@ -363,6 +378,9 @@ class ItemInfo final
std::map <int, int> mTags;
const std::map <ItemColor, ItemColorData> *mColorsList;
const std::map <ItemColor, ItemColorData> *mIconColorsList;
+ STD_VECTOR<ItemMenuItem> mInventoryMenu;
+ STD_VECTOR<ItemMenuItem> mStorageMenu;
+ STD_VECTOR<ItemMenuItem> mCartMenu;
std::string mColorsListName;
std::string mIconColorsListName;
ItemColor mCardColor;