diff options
author | Björn Steinbrink <B.Steinbrink@gmx.de> | 2006-03-09 03:21:39 +0000 |
---|---|---|
committer | Björn Steinbrink <B.Steinbrink@gmx.de> | 2006-03-09 03:21:39 +0000 |
commit | 7593d6c71e2331c3e43c732db60ad03ee4d5385d (patch) | |
tree | 3ad242a957b6a500319d7bdae15149c553521ee4 /src/gui/itemcontainer.cpp | |
parent | 81cf85e9ec1d37dc6e8dd9883f42bb50dace9135 (diff) | |
download | mana-7593d6c71e2331c3e43c732db60ad03ee4d5385d.tar.gz mana-7593d6c71e2331c3e43c732db60ad03ee4d5385d.tar.bz2 mana-7593d6c71e2331c3e43c732db60ad03ee4d5385d.tar.xz mana-7593d6c71e2331c3e43c732db60ad03ee4d5385d.zip |
Added Spriteset::get() and Spriteset::size() to hide the member vector and remove the weird mySpriteset->spriteset stuff.
Diffstat (limited to 'src/gui/itemcontainer.cpp')
-rw-r--r-- | src/gui/itemcontainer.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/gui/itemcontainer.cpp b/src/gui/itemcontainer.cpp index 67cb5251..cc42066a 100644 --- a/src/gui/itemcontainer.cpp +++ b/src/gui/itemcontainer.cpp @@ -74,8 +74,8 @@ void ItemContainer::logic() void ItemContainer::draw(gcn::Graphics* graphics) { - int gridWidth = itemset->spriteset[0]->getWidth() + 4; - int gridHeight = itemset->spriteset[0]->getHeight() + 10; + int gridWidth = itemset->get(0)->getWidth() + 4; + int gridHeight = itemset->get(0)->getHeight() + 10; int w = getWidth(); int columns = w / gridWidth; @@ -119,7 +119,7 @@ void ItemContainer::draw(gcn::Graphics* graphics) if ((idx = item->getInfo()->getImage()) > 0) { dynamic_cast<Graphics*>(graphics)->drawImage( - itemset->spriteset[idx - 1], itemX, itemY); + itemset->get(idx - 1), itemX, itemY); } // Draw item caption @@ -143,8 +143,8 @@ void ItemContainer::setWidth(int width) { gcn::Widget::setWidth(width); - int gridWidth = itemset->spriteset[0]->getWidth() + 4; - int gridHeight = itemset->spriteset[0]->getHeight() + 14; + int gridWidth = itemset->get(0)->getWidth() + 4; + int gridHeight = itemset->get(0)->getHeight() + 14; int columns = getWidth() / gridWidth; if (columns < 1) @@ -168,8 +168,8 @@ void ItemContainer::selectNone() void ItemContainer::mousePress(int mx, int my, int button) { - int gridWidth = itemset->spriteset[0]->getWidth() + 4; - int gridHeight = itemset->spriteset[0]->getHeight() + 10; + int gridWidth = itemset->get(0)->getWidth() + 4; + int gridHeight = itemset->get(0)->getHeight() + 10; int w = getWidth(); int columns = w / gridWidth; |