diff options
author | Jared Adams <jaxad0127@gmail.com> | 2009-03-08 18:40:48 -0600 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2009-03-08 18:40:48 -0600 |
commit | 6099a24784843ac2c6eb4036f5c08bba2f9299c3 (patch) | |
tree | 7bc6684986ec10d9fa241b98b9a27e511233cc63 /src/gui | |
parent | 989be6b1e7634726f5f49e19d6e7dabad7c793e6 (diff) | |
download | mana-6099a24784843ac2c6eb4036f5c08bba2f9299c3.tar.gz mana-6099a24784843ac2c6eb4036f5c08bba2f9299c3.tar.bz2 mana-6099a24784843ac2c6eb4036f5c08bba2f9299c3.tar.xz mana-6099a24784843ac2c6eb4036f5c08bba2f9299c3.zip |
Add an interface for eAthena's storage system
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/item_amount.cpp | 19 | ||||
-rw-r--r-- | src/gui/item_amount.h | 2 |
2 files changed, 21 insertions, 0 deletions
diff --git a/src/gui/item_amount.cpp b/src/gui/item_amount.cpp index 92be3d6e..280f063e 100644 --- a/src/gui/item_amount.cpp +++ b/src/gui/item_amount.cpp @@ -23,6 +23,7 @@ #include "inttextfield.h" #include "item_amount.h" #include "slider.h" +#include "storagewindow.h" #include "trade.h" #include "widgets/layout.h" @@ -80,6 +81,14 @@ ItemAmountWindow::ItemAmountWindow(int usage, Window *parent, Item *item): setCaption(_("Select amount of items to drop.")); okButton->setActionEventId("Drop"); break; + case AMOUNT_STORE_ADD: + setCaption(_("Select amount of items to store.")); + okButton->setActionEventId("AddStore"); + break; + case AMOUNT_STORE_REMOVE: + setCaption(_("Select amount of items to remove from storage.")); + okButton->setActionEventId("RemoveStore"); + break; default: break; } @@ -123,6 +132,16 @@ void ItemAmountWindow::action(const gcn::ActionEvent &event) tradeWindow->tradeItem(mItem, mItemAmountTextField->getValue()); scheduleDelete(); } + else if (event.getId() == "AddStore") + { + storageWindow->addStore(mItem, mItemAmountTextField->getValue()); + scheduleDelete(); + } + else if (event.getId() == "RemoveStore") + { + storageWindow->removeStore(mItem, mItemAmountTextField->getValue()); + scheduleDelete(); + } mItemAmountTextField->setValue(amount); mItemAmountSlide->setValue(amount); } diff --git a/src/gui/item_amount.h b/src/gui/item_amount.h index 618d7d51..26cca32c 100644 --- a/src/gui/item_amount.h +++ b/src/gui/item_amount.h @@ -31,6 +31,8 @@ class Item; #define AMOUNT_TRADE_ADD 1 #define AMOUNT_ITEM_DROP 2 +#define AMOUNT_STORE_ADD 3 +#define AMOUNT_STORE_REMOVE 4 /** * Window used for selecting the amount of items to drop or trade. |