summaryrefslogtreecommitdiff
path: root/src/gui/item_amount.cpp
diff options
context:
space:
mode:
authorBjörn Steinbrink <B.Steinbrink@gmx.de>2005-07-18 00:27:11 +0000
committerBjörn Steinbrink <B.Steinbrink@gmx.de>2005-07-18 00:27:11 +0000
commit290aab364a310b18bb02567f6e4e424d94148bf9 (patch)
tree13a860174c635db34e6087aa31c001386cbd6a7c /src/gui/item_amount.cpp
parent19b58f22f7e77382183c70d2b6a1c79b5e1584e7 (diff)
downloadmana-290aab364a310b18bb02567f6e4e424d94148bf9.tar.gz
mana-290aab364a310b18bb02567f6e4e424d94148bf9.tar.bz2
mana-290aab364a310b18bb02567f6e4e424d94148bf9.tar.xz
mana-290aab364a310b18bb02567f6e4e424d94148bf9.zip
Created Inventory class. (Really) Small code simplifications and cleanups.
Diffstat (limited to 'src/gui/item_amount.cpp')
-rw-r--r--src/gui/item_amount.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/item_amount.cpp b/src/gui/item_amount.cpp
index 021da3eb..eb3a4c5c 100644
--- a/src/gui/item_amount.cpp
+++ b/src/gui/item_amount.cpp
@@ -22,7 +22,7 @@
*/
#include "item_amount.h"
-#include "inventory.h"
+#include "inventorywindow.h"
#include "trade.h"
#include "button.h"
@@ -38,7 +38,7 @@ ItemAmountWindow::ItemAmountWindow(int usage, Window *parent):
itemAmountOkButton = new Button("Okay");
itemAmountCancelButton = new Button("Cancel");
- itemAmountTextBox->setRange(1, inventoryWindow->items->getItem()->getQuantity());
+ itemAmountTextBox->setRange(1, inventoryWindow->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->getItem(), itemAmountTextBox->getInt());
+ inventory->dropItem(inventoryWindow->getItem(), itemAmountTextBox->getInt());
scheduleDelete();
}
else if (eventId == "AddTrade")
{
- tradeWindow->tradeItem(inventoryWindow->items->getItem(), itemAmountTextBox->getInt());
+ tradeWindow->tradeItem(inventoryWindow->getItem(), itemAmountTextBox->getInt());
scheduleDelete();
}
else if (eventId == "Plus")