summaryrefslogtreecommitdiff
path: root/src/gui/item_amount.cpp
diff options
context:
space:
mode:
authorBjörn Steinbrink <B.Steinbrink@gmx.de>2005-07-17 21:10:44 +0000
committerBjörn Steinbrink <B.Steinbrink@gmx.de>2005-07-17 21:10:44 +0000
commit9bf3338f82bfbd425debb2855d015c7bd0e33989 (patch)
treeba390f42ebb7149e91c3494bc6a4ef3ac919ae22 /src/gui/item_amount.cpp
parentfbf19c2cdde592b126fe91c0dfff480f1318f50c (diff)
downloadmana-9bf3338f82bfbd425debb2855d015c7bd0e33989.tar.gz
mana-9bf3338f82bfbd425debb2855d015c7bd0e33989.tar.bz2
mana-9bf3338f82bfbd425debb2855d015c7bd0e33989.tar.xz
mana-9bf3338f82bfbd425debb2855d015c7bd0e33989.zip
Added Item and Equipment class and made the appropriate places make use of them. Plus some cleanups.
Diffstat (limited to 'src/gui/item_amount.cpp')
-rw-r--r--src/gui/item_amount.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/item_amount.cpp b/src/gui/item_amount.cpp
index 036fdc15..021da3eb 100644
--- a/src/gui/item_amount.cpp
+++ b/src/gui/item_amount.cpp
@@ -38,7 +38,7 @@ ItemAmountWindow::ItemAmountWindow(int usage, Window *parent):
itemAmountOkButton = new Button("Okay");
itemAmountCancelButton = new Button("Cancel");
- itemAmountTextBox->setRange(1, inventoryWindow->items->getQuantity());
+ itemAmountTextBox->setRange(1, inventoryWindow->items->getItem()->getQuantity());
// Set button events Id
itemAmountMinusButton->setEventId("Minus");
@@ -108,12 +108,12 @@ void ItemAmountWindow::action(const std::string& eventId)
}
else if (eventId == "Drop")
{
- inventoryWindow->dropItem(inventoryWindow->items->getIndex(), itemAmountTextBox->getInt());
+ inventoryWindow->dropItem(inventoryWindow->items->getItem(), itemAmountTextBox->getInt());
scheduleDelete();
}
else if (eventId == "AddTrade")
{
- tradeWindow->tradeItem(inventoryWindow->items->getIndex(), itemAmountTextBox->getInt());
+ tradeWindow->tradeItem(inventoryWindow->items->getItem(), itemAmountTextBox->getInt());
scheduleDelete();
}
else if (eventId == "Plus")