diff options
author | Philipp Sehmisch <crush@themanaworld.org> | 2009-01-06 17:00:25 +0100 |
---|---|---|
committer | Philipp Sehmisch <crush@themanaworld.org> | 2009-01-06 17:00:25 +0100 |
commit | 791ec19aa351df7d5d1ecc3bc6007ba512c05488 (patch) | |
tree | ab17df5c3d67389d0dc08733570edeeb7a9c9999 /src/gui/item_amount.cpp | |
parent | 6b60673b0805fbab747924d1a0b6d9c66fc96f64 (diff) | |
parent | ed39006cfe36e01f68d13a59d1109db905997efc (diff) | |
download | mana-client-791ec19aa351df7d5d1ecc3bc6007ba512c05488.tar.gz mana-client-791ec19aa351df7d5d1ecc3bc6007ba512c05488.tar.bz2 mana-client-791ec19aa351df7d5d1ecc3bc6007ba512c05488.tar.xz mana-client-791ec19aa351df7d5d1ecc3bc6007ba512c05488.zip |
Merge branch 'master' of git@gitorious.org:tmw/eathena
Diffstat (limited to 'src/gui/item_amount.cpp')
-rw-r--r-- | src/gui/item_amount.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/src/gui/item_amount.cpp b/src/gui/item_amount.cpp index 2e8941e8..064c8f93 100644 --- a/src/gui/item_amount.cpp +++ b/src/gui/item_amount.cpp @@ -29,31 +29,33 @@ #include "../item.h" #include "../localplayer.h" +#include "../utils/gettext.h" + ItemAmountWindow::ItemAmountWindow(int usage, Window *parent, Item *item): - Window("Select amount of items to drop.", true, parent), + Window("", true, parent), mItem(item) { - // New labels + // Integer field mItemAmountTextBox = new IntTextBox(1); - - // New buttons - Button *minusButton = new Button("-", "Minus", this); - Button *plusButton = new Button("+", "Plus", this); - Button *okButton = new Button("Okay", "Drop", this); - Button *cancelButton = new Button("Cancel", "Cancel", this); - mItemAmountSlide = new Slider(1.0, mItem->getQuantity()); - mItemAmountTextBox->setRange(1, mItem->getQuantity()); - mItemAmountSlide->setDimension(gcn::Rectangle(5, 120, 180, 10)); - // Set button events Id + // Slider + mItemAmountSlide = new Slider(1.0, mItem->getQuantity()); mItemAmountSlide->setActionEventId("Slide"); + mItemAmountSlide->addActionListener(this); + + // Buttons + Button *minusButton = new Button("-", "Minus", this); + Button *plusButton = new Button("+", "Plus", this); + Button *okButton = new Button(_("Ok"), "Drop", this); + Button *cancelButton = new Button(_("Cancel"), "Cancel", this); - // Set position + // Set positions mItemAmountTextBox->setPosition(35, 10); mItemAmountTextBox->setSize(24, 16); plusButton->setPosition(60, 5); minusButton->setPosition(10, 5); + mItemAmountSlide->setDimension(gcn::Rectangle(5, 120, 180, 10)); mItemAmountSlide->setPosition(10, 35); okButton->setPosition(10, 50); cancelButton->setPosition(60, 50); @@ -66,17 +68,15 @@ ItemAmountWindow::ItemAmountWindow(int usage, Window *parent, Item *item): add(okButton); add(cancelButton); - mItemAmountSlide->addActionListener(this); - resetAmount(); switch (usage) { case AMOUNT_TRADE_ADD: - setCaption("Select amount of items to trade."); + setCaption(_("Select amount of items to trade.")); okButton->setActionEventId("AddTrade"); break; case AMOUNT_ITEM_DROP: - setCaption("Select amount of items to drop."); + setCaption(_("Select amount of items to drop.")); okButton->setActionEventId("Drop"); break; default: |