diff options
author | Jared Adams <jaxad0127@gmail.com> | 2009-02-22 19:00:56 -0700 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2009-02-22 19:00:56 -0700 |
commit | ebe59b84ab4c378bc0c203d7f22e1196058a15d2 (patch) | |
tree | cd479f35f8a7f106ec6f6582e378963c67be03a5 /src | |
parent | 0a2fb7484cf06f5645e176e543b423601bff7f3f (diff) | |
download | Mana-ebe59b84ab4c378bc0c203d7f22e1196058a15d2.tar.gz Mana-ebe59b84ab4c378bc0c203d7f22e1196058a15d2.tar.bz2 Mana-ebe59b84ab4c378bc0c203d7f22e1196058a15d2.tar.xz Mana-ebe59b84ab4c378bc0c203d7f22e1196058a15d2.zip |
Highlight unbuyable items in red
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/shoplistbox.cpp | 15 |
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)); |