summaryrefslogtreecommitdiff
path: root/src/gui/equipmentwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/equipmentwindow.cpp')
-rw-r--r--src/gui/equipmentwindow.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/gui/equipmentwindow.cpp b/src/gui/equipmentwindow.cpp
index d3b5fc6b..f1b9b4ba 100644
--- a/src/gui/equipmentwindow.cpp
+++ b/src/gui/equipmentwindow.cpp
@@ -35,8 +35,8 @@
#include <sstream>
-EquipmentWindow::EquipmentWindow():
- Window("Equipment")
+EquipmentWindow::EquipmentWindow(Equipment *equipment):
+ Window("Equipment"), mEquipment(equipment)
{
setWindowName("Equipment");
setDefaultSize(5, 230, 200, 90);
@@ -57,7 +57,6 @@ void EquipmentWindow::draw(gcn::Graphics *graphics)
// Draw window graphics
Window::draw(graphics);
- Equipment *equipment = Equipment::getInstance();
Item *item;
Image *image;
@@ -66,7 +65,7 @@ void EquipmentWindow::draw(gcn::Graphics *graphics)
graphics->drawRectangle(gcn::Rectangle(10 + 36 * (i % 4),
36 * (i / 4) + 25, 32, 32));
- if (!(item = equipment->getEquipment(i))) {
+ if (!(item = mEquipment->getEquipment(i))) {
continue;
}
@@ -78,7 +77,7 @@ void EquipmentWindow::draw(gcn::Graphics *graphics)
graphics->setColor(gcn::Color(0, 0, 0));
graphics->drawRectangle(gcn::Rectangle(160, 25, 32, 32));
- if (!(item = equipment->getArrows())) {
+ if (!(item = mEquipment->getArrows())) {
return;
}