diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-08-07 22:42:41 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-08-07 22:42:41 +0300 |
commit | d27fa21ab9363eb22f5077e085c54332da05899f (patch) | |
tree | 2e13bfabf6a5292ca6cfe31944a739a722dcd066 | |
parent | f09e2fdbbf85c6f4c02c9f2fc294b867a94fcacd (diff) | |
download | plus-d27fa21ab9363eb22f5077e085c54332da05899f.tar.gz plus-d27fa21ab9363eb22f5077e085c54332da05899f.tar.bz2 plus-d27fa21ab9363eb22f5077e085c54332da05899f.tar.xz plus-d27fa21ab9363eb22f5077e085c54332da05899f.zip |
Fix background draw in buy/sell dialogs.
-rw-r--r-- | src/gui/buydialog.cpp | 2 | ||||
-rw-r--r-- | src/gui/widgets/shoplistbox.cpp | 9 |
2 files changed, 6 insertions, 5 deletions
diff --git a/src/gui/buydialog.cpp b/src/gui/buydialog.cpp index da2e6cd7a..2d13837c6 100644 --- a/src/gui/buydialog.cpp +++ b/src/gui/buydialog.cpp @@ -86,7 +86,7 @@ void BuyDialog::init() mShopItemList = new ShopListBox(mShopItems, mShopItems); mScrollArea = new ScrollArea(mShopItemList, - getOptionBool("showBackground"), "buy_background.xml"); + getOptionBool("showbackground"), "buy_background.xml"); mScrollArea->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_NEVER); mSlider = new Slider(1.0); 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<Graphics*>(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); } |