From b829d239006538b2e669f4aab191ffa5ad37af68 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 23 May 2018 01:27:28 +0300 Subject: Add skin offsets for images and text in shortcut containers. --- src/gui/widgets/spellshortcutcontainer.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'src/gui/widgets/spellshortcutcontainer.cpp') diff --git a/src/gui/widgets/spellshortcutcontainer.cpp b/src/gui/widgets/spellshortcutcontainer.cpp index 4d53e8190..b2a80209e 100644 --- a/src/gui/widgets/spellshortcutcontainer.cpp +++ b/src/gui/widgets/spellshortcutcontainer.cpp @@ -109,7 +109,9 @@ void SpellShortcutContainer::draw(Graphics *const graphics) if (image != nullptr) { image->setAlpha(1.0F); - graphics->drawImage(image, itemX, itemY); + graphics->drawImage(image, + itemX + mImageOffsetX, + itemY + mImageOffsetY); } } @@ -117,7 +119,8 @@ void SpellShortcutContainer::draw(Graphics *const graphics) mForegroundColor, mForegroundColor2, spell->getSymbol(), - itemX + 2, itemY + mBoxHeight / 2); + itemX + mTextOffsetX, + itemY + mBoxHeight / 2); } } @@ -169,7 +172,9 @@ void SpellShortcutContainer::safeDraw(Graphics *const graphics) if (image != nullptr) { image->setAlpha(1.0F); - graphics->drawImage(image, itemX, itemY); + graphics->drawImage(image, + itemX + mImageOffsetX, + itemY + mImageOffsetY); } } @@ -177,7 +182,8 @@ void SpellShortcutContainer::safeDraw(Graphics *const graphics) mForegroundColor, mForegroundColor2, spell->getSymbol(), - itemX + 2, itemY + mBoxHeight / 2); + itemX + mTextOffsetX, + itemY + mBoxHeight / 2); } } -- cgit v1.2.3-60-g2f50