summaryrefslogtreecommitdiff
path: root/src/gui/outfitwindow.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-08-22 21:16:34 +0300
committerAndrei Karas <akaras@inbox.ru>2011-08-22 21:16:34 +0300
commit2d17967845119a77aec6388bb27c47339052704a (patch)
tree965b636cf677ddf93a30e8606405594a79b7f105 /src/gui/outfitwindow.cpp
parent7bedfccf5982534a9cbcb2c18ca0d37df117bfc8 (diff)
downloadmanaplus-2d17967845119a77aec6388bb27c47339052704a.tar.gz
manaplus-2d17967845119a77aec6388bb27c47339052704a.tar.bz2
manaplus-2d17967845119a77aec6388bb27c47339052704a.tar.xz
manaplus-2d17967845119a77aec6388bb27c47339052704a.zip
Improve draw perfomance.
Add new theme color DROPDOWN_SHADOW.
Diffstat (limited to 'src/gui/outfitwindow.cpp')
-rw-r--r--src/gui/outfitwindow.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gui/outfitwindow.cpp b/src/gui/outfitwindow.cpp
index 79ac88d94..d3bc6a302 100644
--- a/src/gui/outfitwindow.cpp
+++ b/src/gui/outfitwindow.cpp
@@ -78,6 +78,9 @@ OutfitWindow::OutfitWindow():
addMouseListener(this);
+ mBorderColor = Theme::getThemeColor(Theme::BORDER, 64);
+ mBackgroundColor = Theme::getThemeColor(Theme::BACKGROUND, 32);
+
mPreviousButton = new Button(_("<"), "previous", this);
mNextButton = new Button(_(">"), "next", this);
mCurrentLabel = new Label(strprintf(_("Outfit: %d"), 1));
@@ -304,9 +307,9 @@ void OutfitWindow::draw(gcn::Graphics *graphics)
const int itemX = 10 + ((i % mGridWidth) * mBoxWidth);
const int itemY = 25 + ((i / mGridWidth) * mBoxHeight);
- graphics->setColor(Theme::getThemeColor(Theme::BORDER, 64));
+ graphics->setColor(mBorderColor);
graphics->drawRectangle(gcn::Rectangle(itemX, itemY, 32, 32));
- graphics->setColor(Theme::getThemeColor(Theme::BACKGROUND, 32));
+ graphics->setColor(mBackgroundColor);
graphics->fillRectangle(gcn::Rectangle(itemX, itemY, 32, 32));
if (mItems[mCurrentOutfit][i] < 0)