summaryrefslogtreecommitdiff
path: root/src/gui/widgets/spellshortcutcontainer.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2018-05-23 01:27:28 +0300
committerAndrei Karas <akaras@inbox.ru>2018-05-23 01:27:28 +0300
commitb829d239006538b2e669f4aab191ffa5ad37af68 (patch)
treea492be3847f3e3b0704b60909313cfe55dba7ca5 /src/gui/widgets/spellshortcutcontainer.cpp
parent70bf45e429a649f59484968d0484a4326ed1a3e9 (diff)
downloadplus-b829d239006538b2e669f4aab191ffa5ad37af68.tar.gz
plus-b829d239006538b2e669f4aab191ffa5ad37af68.tar.bz2
plus-b829d239006538b2e669f4aab191ffa5ad37af68.tar.xz
plus-b829d239006538b2e669f4aab191ffa5ad37af68.zip
Add skin offsets for images and text in shortcut containers.
Diffstat (limited to 'src/gui/widgets/spellshortcutcontainer.cpp')
-rw-r--r--src/gui/widgets/spellshortcutcontainer.cpp14
1 files changed, 10 insertions, 4 deletions
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);
}
}