From 70da0bae8b4f11bf4d2fcf12c2f1aa770fe1d4d1 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 1 Dec 2012 21:37:21 +0300 Subject: Add batch drawing to shortcuts windows. --- src/gui/widgets/emoteshortcutcontainer.cpp | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'src/gui/widgets/emoteshortcutcontainer.cpp') diff --git a/src/gui/widgets/emoteshortcutcontainer.cpp b/src/gui/widgets/emoteshortcutcontainer.cpp index 1d1a5a60b..dcd4fa08e 100644 --- a/src/gui/widgets/emoteshortcutcontainer.cpp +++ b/src/gui/widgets/emoteshortcutcontainer.cpp @@ -110,17 +110,8 @@ void EmoteShortcutContainer::draw(gcn::Graphics *graphics) mBackgroundImg->setAlpha(mAlpha); Graphics *const g = static_cast(graphics); - graphics->setFont(getFont()); - - if (mBackgroundImg) - { - for (unsigned i = 0; i < mMaxItems; i++) - { - g->drawImage(mBackgroundImg, (i % mGridWidth) * mBoxWidth, - (i / mGridWidth) * mBoxHeight); - } - } + drawBackground(g); graphics->setColor(mForegroundColor); for (unsigned i = 0; i < mMaxItems; i++) -- cgit v1.2.3-70-g09d2