summaryrefslogtreecommitdiff
path: root/src/gui/item_amount.cpp
diff options
context:
space:
mode:
authorJoshua Langley <joshlangley[at]optusnet.com.au>2007-08-14 05:59:52 +0000
committerJoshua Langley <joshlangley[at]optusnet.com.au>2007-08-14 05:59:52 +0000
commit0601642d8b3aa2c7aa365e27aa3ef2459553c3fd (patch)
treee2c4a93c3aca4b35b69857b17b722c3260b4c3d1 /src/gui/item_amount.cpp
parent68f069fea3182c6d5720df03f1d63de38f14c31d (diff)
downloadmana-0601642d8b3aa2c7aa365e27aa3ef2459553c3fd.tar.gz
mana-0601642d8b3aa2c7aa365e27aa3ef2459553c3fd.tar.bz2
mana-0601642d8b3aa2c7aa365e27aa3ef2459553c3fd.tar.xz
mana-0601642d8b3aa2c7aa365e27aa3ef2459553c3fd.zip
mantis_id:129 - Inventory Window Slots Added.
Diffstat (limited to 'src/gui/item_amount.cpp')
-rw-r--r--src/gui/item_amount.cpp29
1 files changed, 19 insertions, 10 deletions
diff --git a/src/gui/item_amount.cpp b/src/gui/item_amount.cpp
index 2e3ac4ad..22c219f2 100644
--- a/src/gui/item_amount.cpp
+++ b/src/gui/item_amount.cpp
@@ -83,6 +83,10 @@ ItemAmountWindow::ItemAmountWindow(int usage, Window *parent, Item *item):
setCaption(_("Select amount of items to drop."));
okButton->setActionEventId("Drop");
break;
+ case AMOUNT_ITEM_SPLIT:
+ setCaption(_("Select amount of items to split."));
+ okButton->setActionEventId("Split");
+ break;
default:
break;
}
@@ -105,16 +109,6 @@ void ItemAmountWindow::action(const gcn::ActionEvent &event)
{
scheduleDelete();
}
- else if (event.getId() == "Drop")
- {
- player_node->dropItem(mItem, mItemAmountTextBox->getInt());
- scheduleDelete();
- }
- else if (event.getId() == "AddTrade")
- {
- tradeWindow->tradeItem(mItem, mItemAmountTextBox->getInt());
- scheduleDelete();
- }
else if (event.getId() == "Plus")
{
amount++;
@@ -127,6 +121,21 @@ void ItemAmountWindow::action(const gcn::ActionEvent &event)
{
amount = static_cast<int>(mItemAmountSlide->getValue());
}
+ else if (event.getId() == "Drop")
+ {
+ player_node->dropItem(mItem, mItemAmountTextBox->getInt());
+ scheduleDelete();
+ }
+ else if (event.getId() == "AddTrade")
+ {
+ tradeWindow->tradeItem(mItem, mItemAmountTextBox->getInt());
+ scheduleDelete();
+ }
+ else if (event.getId() == "Split")
+ {
+ player_node->splitItem(mItem, mItemAmountTextBox->getInt());
+ scheduleDelete();
+ }
mItemAmountTextBox->setInt(amount);
mItemAmountSlide->setValue(amount);
}