From 290aab364a310b18bb02567f6e4e424d94148bf9 Mon Sep 17 00:00:00 2001 From: Björn Steinbrink Date: Mon, 18 Jul 2005 00:27:11 +0000 Subject: Created Inventory class. (Really) Small code simplifications and cleanups. --- src/gui/item_amount.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/gui/item_amount.cpp') 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") -- cgit v1.2.3-70-g09d2