summaryrefslogtreecommitdiff
path: root/src/gui/item_amount.cpp
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2009-03-18 18:41:55 -0600
committerJared Adams <jaxad0127@gmail.com>2009-03-18 18:42:12 -0600
commitff3e3d5c6da770391daa4314410e2e716569f7f4 (patch)
treec752f1a09209b7dd288c88352c5c1a93d3ad4ab8 /src/gui/item_amount.cpp
parent87a5e7ff9aab0073a0658b543376622febabc630 (diff)
downloadMana-ff3e3d5c6da770391daa4314410e2e716569f7f4.tar.gz
Mana-ff3e3d5c6da770391daa4314410e2e716569f7f4.tar.bz2
Mana-ff3e3d5c6da770391daa4314410e2e716569f7f4.tar.xz
Mana-ff3e3d5c6da770391daa4314410e2e716569f7f4.zip
A few more fixes in the ItemAmount dialog
Diffstat (limited to 'src/gui/item_amount.cpp')
-rw-r--r--src/gui/item_amount.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gui/item_amount.cpp b/src/gui/item_amount.cpp
index aca7ff52..b440dfc0 100644
--- a/src/gui/item_amount.cpp
+++ b/src/gui/item_amount.cpp
@@ -55,7 +55,7 @@ ItemAmountWindow::ItemAmountWindow(int usage, Window *parent, Item *item):
minusButton->setSize(20, 20);
Button *plusButton = new Button("+", "Plus", this);
plusButton->setSize(20, 20);
- Button *okButton = new Button(_("Ok"), "Drop", this);
+ Button *okButton = new Button(_("Ok"), "Ok", this);
Button *cancelButton = new Button(_("Cancel"), "Cancel", this);
Button *addAllButton = new Button(_("All"), "All", this);
@@ -144,8 +144,12 @@ void ItemAmountWindow::action(const gcn::ActionEvent &event)
}
scheduleDelete();
+ return;
}
+ if (amount < 0) amount = 0;
+ else if (amount > mMax) amount = mMax;
+
mItemAmountTextField->setValue(amount);
mItemAmountSlide->setValue(amount);
}