diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-04-16 16:18:29 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-04-16 16:18:29 +0300 |
commit | c94a736ddcf5299b6eacb9cfd5c09c6266dd78aa (patch) | |
tree | 356f87aac5b794fa4e0903a15ec83f55f52f7b00 /src/gui/windows/itemamountwindow.h | |
parent | e811e48760c7f9a22615f40a0b025d34b9f12eb0 (diff) | |
download | mv-c94a736ddcf5299b6eacb9cfd5c09c6266dd78aa.tar.gz mv-c94a736ddcf5299b6eacb9cfd5c09c6266dd78aa.tar.bz2 mv-c94a736ddcf5299b6eacb9cfd5c09c6266dd78aa.tar.xz mv-c94a736ddcf5299b6eacb9cfd5c09c6266dd78aa.zip |
Move itemamountwindowusage enum into separate file.
Also convert it to strong typed enum.
Diffstat (limited to 'src/gui/windows/itemamountwindow.h')
-rw-r--r-- | src/gui/windows/itemamountwindow.h | 29 |
1 files changed, 6 insertions, 23 deletions
diff --git a/src/gui/windows/itemamountwindow.h b/src/gui/windows/itemamountwindow.h index c072b39c7..c9cbd4227 100644 --- a/src/gui/windows/itemamountwindow.h +++ b/src/gui/windows/itemamountwindow.h @@ -25,6 +25,8 @@ #include "gui/widgets/window.h" +#include "enums/gui/itemamountwindowusage.h" + #include "listeners/actionlistener.h" #include "listeners/keylistener.h" @@ -46,25 +48,6 @@ class ItemAmountWindow final : public Window, public KeyListener { public: - enum Usage - { - TradeAdd = 0, - ItemDrop, - StoreAdd, - StoreRemove, - CartAdd, - CartRemove, - ItemSplit, - ShopBuyAdd, -#ifdef EATHENA_SUPPORT - ShopSellAdd, - CraftAdd, - MailAdd -#else - ShopSellAdd -#endif - }; - A_DELETE_COPY(ItemAmountWindow) void postInit() override final; @@ -94,7 +77,7 @@ class ItemAmountWindow final : public Window, /** * Creates the dialog, or bypass it if there aren't enough items. */ - static void showWindow(const Usage usage, + static void showWindow(const ItemAmountWindowUsageT usage, Window *const parent, Item *const item, int maxRange = 0, @@ -106,9 +89,9 @@ class ItemAmountWindow final : public Window, static void finish(Item *const item, const int amount, const int price, - const Usage usage); + const ItemAmountWindowUsageT usage); - ItemAmountWindow(const Usage usage, + ItemAmountWindow(const ItemAmountWindowUsageT usage, Window *const parent, Item *const item, const int maxRange = 0); @@ -131,7 +114,7 @@ class ItemAmountWindow final : public Window, int mPrice; int mMax; - Usage mUsage; + ItemAmountWindowUsageT mUsage; bool mEnabledKeyboard; }; |