summaryrefslogtreecommitdiff
path: root/src/gui/itemcontainer.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2005-04-10 12:45:41 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2005-04-10 12:45:41 +0000
commitb42e9e23fd6fe4819d34f04124ba66eca6a6c020 (patch)
tree1605d6bf4fcd8372aab280d37f988d32d0ebbd9e /src/gui/itemcontainer.cpp
parent7eeb04e1a8bf103e3f8717af1e3ec09f58441bd4 (diff)
downloadmana-client-b42e9e23fd6fe4819d34f04124ba66eca6a6c020.tar.gz
mana-client-b42e9e23fd6fe4819d34f04124ba66eca6a6c020.tar.bz2
mana-client-b42e9e23fd6fe4819d34f04124ba66eca6a6c020.tar.xz
mana-client-b42e9e23fd6fe4819d34f04124ba66eca6a6c020.zip
Removed black outline around inventory and cleaned up some tabs.
Diffstat (limited to 'src/gui/itemcontainer.cpp')
-rw-r--r--src/gui/itemcontainer.cpp25
1 files changed, 12 insertions, 13 deletions
diff --git a/src/gui/itemcontainer.cpp b/src/gui/itemcontainer.cpp
index 0694fc2e..723cb262 100644
--- a/src/gui/itemcontainer.cpp
+++ b/src/gui/itemcontainer.cpp
@@ -54,39 +54,38 @@ void ItemContainer::draw(gcn::Graphics* graphics)
getAbsolutePosition(x, y);
w = getWidth();
h = getHeight();
- graphics->setColor(gcn::Color(0, 0, 0));
- graphics->drawRectangle(gcn::Rectangle(0, 0, w, h));
-
- if(items[selectedItem].quantity <= 0)
+
+ if (items[selectedItem].quantity <= 0) {
selectedItem = -1;
-
+ }
+
for (int i = 0; i < INVENTORY_SIZE; i++) {
int itemX = (((i - 2) * 24) % (getWidth() - 24));
int itemY = (((i - 2) * 24) / (getWidth() - 24)) * 24;
- itemX -= itemX % 24;
+ itemX -= itemX % 24;
if (items[i].quantity > 0) {
if (items[i].id >= 501 && items[i].id <= 1202) {
itemset->spriteset[items[i].id - 501]->draw(screen,
- x + itemX,
- y + itemY);
+ x + itemX,
+ y + itemY);
}
std::stringstream ss;
if(!items[i].equipped)
ss << items[i].quantity;
graphics->drawText(ss.str(),
- itemX + 12,
- itemY + 16,
- gcn::Graphics::CENTER);
+ itemX + 12,
+ itemY + 16,
+ gcn::Graphics::CENTER);
}
}
if (selectedItem >= 0) {
int itemX = (((selectedItem - 2) * 24) % (getWidth() - 24));
int itemY = (((selectedItem - 2) * 24) / (getWidth() - 24)) * 24;
- itemX -= itemX % 24;
+ itemX -= itemX % 24;
graphics->drawRectangle(gcn::Rectangle(itemX, itemY,
- 24, 24));
+ 24, 24));
}
}