summaryrefslogtreecommitdiff
path: root/src/gui/shoplistbox.cpp
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2009-02-22 19:00:56 -0700
committerJared Adams <jaxad0127@gmail.com>2009-02-22 19:00:56 -0700
commitebe59b84ab4c378bc0c203d7f22e1196058a15d2 (patch)
treecd479f35f8a7f106ec6f6582e378963c67be03a5 /src/gui/shoplistbox.cpp
parent0a2fb7484cf06f5645e176e543b423601bff7f3f (diff)
downloadMana-ebe59b84ab4c378bc0c203d7f22e1196058a15d2.tar.gz
Mana-ebe59b84ab4c378bc0c203d7f22e1196058a15d2.tar.bz2
Mana-ebe59b84ab4c378bc0c203d7f22e1196058a15d2.tar.xz
Mana-ebe59b84ab4c378bc0c203d7f22e1196058a15d2.zip
Highlight unbuyable items in red
Diffstat (limited to 'src/gui/shoplistbox.cpp')
-rw-r--r--src/gui/shoplistbox.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/gui/shoplistbox.cpp b/src/gui/shoplistbox.cpp
index 8aed3c77..b258c2d8 100644
--- a/src/gui/shoplistbox.cpp
+++ b/src/gui/shoplistbox.cpp
@@ -80,15 +80,14 @@ void ShopListBox::draw(gcn::Graphics *gcnGraphics)
{
gcn::Color backgroundColor = gcn::Color(255, 255, 255, alpha);
- if (i == mSelected)
- {
- backgroundColor = gcn::Color(red, green, blue, alpha);
- }
- else if (mShopItems &&
+ if (mShopItems &&
mPlayerMoney < mShopItems->at(i)->getPrice() && mPriceCheck)
- {
- backgroundColor = gcn::Color(145, 145, 145, alpha);
- }
+ if (i == mSelected)
+ backgroundColor = gcn::Color(145, 0, 0, alpha);
+ else
+ backgroundColor = gcn::Color(145, 145, 145, alpha);
+ else if (i == mSelected)
+ backgroundColor = gcn::Color(red, green, blue, alpha);
graphics->setColor(backgroundColor);
graphics->fillRectangle(gcn::Rectangle(0, y, getWidth(), mRowHeight));