summaryrefslogtreecommitdiff
path: root/src/gui/item_amount.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2009-03-27 18:54:04 +0100
committerBjørn Lindeijer <bjorn@lindeijer.nl>2009-03-27 18:57:04 +0100
commit4b70908a529317ce4e57448fe4f4a59e75416537 (patch)
treea041eeed198708bf5f558f595f716c7814961daf /src/gui/item_amount.cpp
parent372f6493d07cbffb601ecb775ebecd51267725cf (diff)
downloadmana-client-4b70908a529317ce4e57448fe4f4a59e75416537.tar.gz
mana-client-4b70908a529317ce4e57448fe4f4a59e75416537.tar.bz2
mana-client-4b70908a529317ce4e57448fe4f4a59e75416537.tar.xz
mana-client-4b70908a529317ce4e57448fe4f4a59e75416537.zip
Fixed inventory window. Not resizable though.
Resizing of the inventory window may come back later. Also did some more code cleanups, moving defines to enums, getting rid of eAthena-specific offset handling (to be done in the network layer), etc. Mantis-issue: 666
Diffstat (limited to 'src/gui/item_amount.cpp')
-rw-r--r--src/gui/item_amount.cpp26
1 files changed, 12 insertions, 14 deletions
diff --git a/src/gui/item_amount.cpp b/src/gui/item_amount.cpp
index 0f6aa593..f539f8ab 100644
--- a/src/gui/item_amount.cpp
+++ b/src/gui/item_amount.cpp
@@ -36,8 +36,8 @@
#include "../utils/gettext.h"
#include "../utils/strprintf.h"
-ItemAmountWindow::ItemAmountWindow(int usage, Window *parent, Item *item,
- int maxRange):
+ItemAmountWindow::ItemAmountWindow(Usage usage, Window *parent, Item *item,
+ int maxRange):
Window("", true, parent),
mItem(item),
mMax(maxRange),
@@ -87,23 +87,21 @@ ItemAmountWindow::ItemAmountWindow(int usage, Window *parent, Item *item,
switch (usage)
{
- case AMOUNT_TRADE_ADD:
+ case TradeAdd:
setCaption(_("Select amount of items to trade."));
break;
- case AMOUNT_ITEM_DROP:
+ case ItemDrop:
setCaption(_("Select amount of items to drop."));
break;
- case AMOUNT_STORE_ADD:
+ case StoreAdd:
setCaption(_("Select amount of items to store."));
break;
- case AMOUNT_STORE_REMOVE:
+ case StoreRemove:
setCaption(_("Select amount of items to retrieve."));
break;
- case AMOUNT_ITEM_SPLIT:
+ case ItemSplit:
setCaption(_("Select amount of items to split."));
break;
- default:
- break;
}
setLocationRelativeTo(getParentWindow());
@@ -142,21 +140,21 @@ void ItemAmountWindow::action(const gcn::ActionEvent &event)
switch (mUsage)
{
- case AMOUNT_TRADE_ADD:
+ case TradeAdd:
tradeWindow->tradeItem(mItem, amount);
break;
- case AMOUNT_ITEM_DROP:
+ case ItemDrop:
player_node->dropItem(mItem, amount);
break;
#ifdef TMWSERV_SUPPORT
- case AMOUNT_ITEM_SPLIT:
+ case ItemSplit:
player_node->splitItem(mItem, amount);
break;
#else
- case AMOUNT_STORE_ADD:
+ case StoreAdd:
storageWindow->addStore(mItem, amount);
break;
- case AMOUNT_STORE_REMOVE:
+ case StoreRemove:
storageWindow->removeStore(mItem, amount);
break;
#endif