summaryrefslogtreecommitdiff
path: root/src/gui/shoplistbox.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2007-11-15 23:44:01 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2007-11-15 23:44:01 +0000
commit0e925e97554aae573e895afa4e3d8450f01df342 (patch)
treebbc30319410aecb9fec7c005e667cd7fb628bb17 /src/gui/shoplistbox.cpp
parentffa0fae492d954c0aed35a0acbd7b856778d7328 (diff)
downloadmana-client-0e925e97554aae573e895afa4e3d8450f01df342.tar.gz
mana-client-0e925e97554aae573e895afa4e3d8450f01df342.tar.bz2
mana-client-0e925e97554aae573e895afa4e3d8450f01df342.tar.xz
mana-client-0e925e97554aae573e895afa4e3d8450f01df342.zip
Moved item icon from ItemInfo class to the Item class, so that it can be loaded
on demand. Results in faster startup time and reduced memory usage.
Diffstat (limited to 'src/gui/shoplistbox.cpp')
-rw-r--r--src/gui/shoplistbox.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/shoplistbox.cpp b/src/gui/shoplistbox.cpp
index e4f6e6f9..ffa4d116 100644
--- a/src/gui/shoplistbox.cpp
+++ b/src/gui/shoplistbox.cpp
@@ -79,7 +79,7 @@ void ShopListBox::draw(gcn::Graphics *gcnGraphics)
backgroundColor = gcn::Color(110, 160, 255);
}
else if (mShopItems &&
- mPlayerMoney < mShopItems->at(i).price && mPriceCheck)
+ mPlayerMoney < mShopItems->at(i)->getPrice() && mPriceCheck)
{
backgroundColor = gcn::Color(0x919191);
}
@@ -89,7 +89,7 @@ void ShopListBox::draw(gcn::Graphics *gcnGraphics)
if (mShopItems)
{
- Image *icon = mShopItems->at(i).image;
+ Image *icon = mShopItems->at(i)->getImage();
if (icon)
{
graphics->drawImage(icon, 1, y);