From d27fa21ab9363eb22f5077e085c54332da05899f Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 7 Aug 2012 22:42:41 +0300 Subject: Fix background draw in buy/sell dialogs. --- src/gui/widgets/shoplistbox.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/gui/widgets/shoplistbox.cpp') diff --git a/src/gui/widgets/shoplistbox.cpp b/src/gui/widgets/shoplistbox.cpp index 6171e9f03..c7a3bdb1e 100644 --- a/src/gui/widgets/shoplistbox.cpp +++ b/src/gui/widgets/shoplistbox.cpp @@ -95,12 +95,14 @@ void ShopListBox::draw(gcn::Graphics *gcnGraphics) Graphics *graphics = static_cast(gcnGraphics); graphics->setFont(getFont()); + graphics->setColor(getForegroundColor()); // Draw the list elements for (int i = 0, y = 0; i < mListModel->getNumberOfElements(); ++i, y += mRowHeight) { +/* gcn::Color temp; gcn::Color* backgroundColor = &mBackgroundColor; mBackgroundColor.a = alpha; @@ -128,9 +130,9 @@ void ShopListBox::draw(gcn::Graphics *gcnGraphics) backgroundColor = &mHighlightColor; } - graphics->setColor(*backgroundColor); - graphics->fillRectangle(gcn::Rectangle(0, y, getWidth(), mRowHeight)); - +// graphics->setColor(*backgroundColor); +// graphics->fillRectangle(gcn::Rectangle(0, y, getWidth(), mRowHeight)); +*/ if (mShopItems) { Image *icon = mShopItems->at(i)->getImage(); @@ -140,7 +142,6 @@ void ShopListBox::draw(gcn::Graphics *gcnGraphics) graphics->drawImage(icon, 1, y); } } - graphics->setColor(getForegroundColor()); graphics->drawText(mListModel->getElementAt(i), ITEM_ICON_SIZE + 5, y + (ITEM_ICON_SIZE - getFont()->getHeight()) / 2); } -- cgit v1.2.3-60-g2f50