diff options
author | Guillaume Melquiond <guillaume.melquiond@gmail.com> | 2007-07-31 21:29:00 +0000 |
---|---|---|
committer | Guillaume Melquiond <guillaume.melquiond@gmail.com> | 2007-07-31 21:29:00 +0000 |
commit | 36d28236321b6a2824ad4f394faeabbf79626808 (patch) | |
tree | 7d2475acf84852f2a21cc29eecbf7524cd58ff52 /src/gui/equipmentwindow.cpp | |
parent | c9f930c759004e179545c3b82992e3f8a12345f2 (diff) | |
download | mana-client-36d28236321b6a2824ad4f394faeabbf79626808.tar.gz mana-client-36d28236321b6a2824ad4f394faeabbf79626808.tar.bz2 mana-client-36d28236321b6a2824ad4f394faeabbf79626808.tar.xz mana-client-36d28236321b6a2824ad4f394faeabbf79626808.zip |
Removed legacy inventory code. Added display of equipment.
Diffstat (limited to 'src/gui/equipmentwindow.cpp')
-rw-r--r-- | src/gui/equipmentwindow.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/gui/equipmentwindow.cpp b/src/gui/equipmentwindow.cpp index 1ae887bc..27c97ea0 100644 --- a/src/gui/equipmentwindow.cpp +++ b/src/gui/equipmentwindow.cpp @@ -50,9 +50,6 @@ void EquipmentWindow::draw(gcn::Graphics *graphics) // Draw window graphics Window::draw(graphics); - Item *item; - Image *image; - // Rectangles around items are black graphics->setColor(gcn::Color(0, 0, 0)); @@ -60,17 +57,17 @@ void EquipmentWindow::draw(gcn::Graphics *graphics) graphics->drawRectangle(gcn::Rectangle(10 + 36 * (i % 4), 36 * (i / 4) + 25, 32, 32)); - if (!(item = mEquipment->getEquipment(i))) { - continue; - } + int item = mEquipment->getEquipment(i); + if (!item) continue; - image = item->getInfo().getImage(); + Image *image = Item(item).getInfo().getImage(); static_cast<Graphics*>(graphics)-> drawImage(image, 36 * (i % 4) + 10, 36 * (i / 4) + 25); } graphics->drawRectangle(gcn::Rectangle(160, 25, 32, 32)); + /* if (!(item = mEquipment->getArrows())) { return; } @@ -80,4 +77,6 @@ void EquipmentWindow::draw(gcn::Graphics *graphics) static_cast<Graphics*>(graphics)->drawImage(image, 160, 25); graphics->drawText(toString(item->getQuantity()), 170, 62, gcn::Graphics::CENTER); + */ + return; } |