diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-11-16 22:17:15 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-11-16 22:17:15 +0300 |
commit | 5e8e53f6e795a84ab5ca6cfe0d08672878044707 (patch) | |
tree | 23f5a196c6a288ef52cea2742b02ddbc52b2db61 /src/gui/popups | |
parent | 0c063cf5b45a843485fe3343e5fb79a40141f88c (diff) | |
download | plus-5e8e53f6e795a84ab5ca6cfe0d08672878044707.tar.gz plus-5e8e53f6e795a84ab5ca6cfe0d08672878044707.tar.bz2 plus-5e8e53f6e795a84ab5ca6cfe0d08672878044707.tar.xz plus-5e8e53f6e795a84ab5ca6cfe0d08672878044707.zip |
Convert InventoryType enum into strong typed.
Diffstat (limited to 'src/gui/popups')
-rw-r--r-- | src/gui/popups/popupmenu.cpp | 18 | ||||
-rw-r--r-- | src/gui/popups/popupmenu.h | 2 |
2 files changed, 10 insertions, 10 deletions
diff --git a/src/gui/popups/popupmenu.cpp b/src/gui/popups/popupmenu.cpp index e18906052..f55d8cb22 100644 --- a/src/gui/popups/popupmenu.cpp +++ b/src/gui/popups/popupmenu.cpp @@ -1625,7 +1625,7 @@ void PopupMenu::handleLink(const std::string &link, void PopupMenu::showPopup(Window *const parent, const int x, const int y, Item *const item, - const InventoryType::Type type) + const InventoryTypeT type) { if (!item) return; @@ -1644,7 +1644,7 @@ void PopupMenu::showPopup(Window *const parent, switch (type) { - case InventoryType::INVENTORY: + case InventoryType::Inventory: if (tradeWindow && tradeWindow->isWindowVisible() && !isProtected) { // TRANSLATORS: popup menu item @@ -1706,7 +1706,7 @@ void PopupMenu::showPopup(Window *const parent, addUseDrop(item, isProtected); break; - case InventoryType::STORAGE: + case InventoryType::Storage: // TRANSLATORS: popup menu item // TRANSLATORS: get item from storage mBrowserBox->addRow("/storagetoinv 'INVINDEX'", _("Retrieve")); @@ -1734,14 +1734,14 @@ void PopupMenu::showPopup(Window *const parent, } break; - case InventoryType::TRADE: - case InventoryType::NPC: + case InventoryType::Trade: + case InventoryType::Npc: #ifdef EATHENA_SUPPORT - case InventoryType::CART: - case InventoryType::VENDING: - case InventoryType::MAIL: + case InventoryType::Cart: + case InventoryType::Vending: + case InventoryType::Mail: #endif - case InventoryType::TYPE_END: + case InventoryType::TypeEnd: default: break; } diff --git a/src/gui/popups/popupmenu.h b/src/gui/popups/popupmenu.h index e8e0ddeb4..d37a29f56 100644 --- a/src/gui/popups/popupmenu.h +++ b/src/gui/popups/popupmenu.h @@ -96,7 +96,7 @@ class PopupMenu final : public Popup, public LinkHandler void showPopup(Window *const parent, const int x, const int y, Item *const item, - const InventoryType::Type type); + const InventoryTypeT type); void showPopup(const int x, const int y, Button *const button); |