diff options
author | Andrei Karas <akaras@inbox.ru> | 2018-05-23 01:27:28 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2018-05-23 01:27:28 +0300 |
commit | b829d239006538b2e669f4aab191ffa5ad37af68 (patch) | |
tree | a492be3847f3e3b0704b60909313cfe55dba7ca5 /src/gui/widgets/itemshortcutcontainer.cpp | |
parent | 70bf45e429a649f59484968d0484a4326ed1a3e9 (diff) | |
download | manaverse-b829d239006538b2e669f4aab191ffa5ad37af68.tar.gz manaverse-b829d239006538b2e669f4aab191ffa5ad37af68.tar.bz2 manaverse-b829d239006538b2e669f4aab191ffa5ad37af68.tar.xz manaverse-b829d239006538b2e669f4aab191ffa5ad37af68.zip |
Add skin offsets for images and text in shortcut containers.
Diffstat (limited to 'src/gui/widgets/itemshortcutcontainer.cpp')
-rw-r--r-- | src/gui/widgets/itemshortcutcontainer.cpp | 40 |
1 files changed, 28 insertions, 12 deletions
diff --git a/src/gui/widgets/itemshortcutcontainer.cpp b/src/gui/widgets/itemshortcutcontainer.cpp index 81ccf4ab5..6a2480bae 100644 --- a/src/gui/widgets/itemshortcutcontainer.cpp +++ b/src/gui/widgets/itemshortcutcontainer.cpp @@ -124,7 +124,8 @@ void ItemShortcutContainer::draw(Graphics *const graphics) mForegroundColor, mForegroundColor, key, - itemX + 2, itemY + 2); + itemX + mTextOffsetX, + itemY + mTextOffsetY); const int itemId = selShortcut->getItem(i); const ItemColor itemColor = selShortcut->getItemColor(i); @@ -149,7 +150,9 @@ void ItemShortcutContainer::draw(Graphics *const graphics) caption = "Eq."; image->setAlpha(1.0F); - graphics->drawImage(image, itemX, itemY); + graphics->drawImage(image, + itemX + mImageOffsetX, + itemY + mImageOffsetY); if (item->isEquipped() == Equipped_true) { font->drawString(graphics, @@ -184,7 +187,9 @@ void ItemShortcutContainer::draw(Graphics *const graphics) if (image != nullptr) { image->setAlpha(1.0F); - graphics->drawImage(image, itemX, itemY); + graphics->drawImage(image, + itemX + mImageOffsetX, + itemY + mImageOffsetY); } } @@ -192,7 +197,8 @@ void ItemShortcutContainer::draw(Graphics *const graphics) mForegroundColor, mForegroundColor, spell->getSymbol(), - itemX + 2, itemY + mBoxHeight / 2); + itemX + mTextOffsetX, + itemY + mBoxHeight / 2); } } else if (skillDialog != nullptr) @@ -206,7 +212,9 @@ void ItemShortcutContainer::draw(Graphics *const graphics) if (image != nullptr) { image->setAlpha(1.0F); - graphics->drawImage(image, itemX, itemY); + graphics->drawImage(image, + itemX + mImageOffsetX, + itemY + mImageOffsetY); } if (!skill->data->haveIcon) { @@ -214,7 +222,7 @@ void ItemShortcutContainer::draw(Graphics *const graphics) mForegroundColor, mForegroundColor, skill->data->shortName, - itemX + 2, + itemX + mTextOffsetX, itemY + mBoxHeight / 2); } } @@ -263,7 +271,8 @@ void ItemShortcutContainer::safeDraw(Graphics *const graphics) mForegroundColor, mForegroundColor, key, - itemX + 2, itemY + 2); + itemX + mTextOffsetX, + itemY + mTextOffsetY); const int itemId = selShortcut->getItem(i); const ItemColor itemColor = selShortcut->getItemColor(i); @@ -288,7 +297,9 @@ void ItemShortcutContainer::safeDraw(Graphics *const graphics) caption = "Eq."; image->setAlpha(1.0F); - graphics->drawImage(image, itemX, itemY); + graphics->drawImage(image, + itemX + mImageOffsetX, + itemY + mImageOffsetY); if (item->isEquipped() == Equipped_true) { font->drawString(graphics, @@ -323,7 +334,9 @@ void ItemShortcutContainer::safeDraw(Graphics *const graphics) if (image != nullptr) { image->setAlpha(1.0F); - graphics->drawImage(image, itemX, itemY); + graphics->drawImage(image, + itemX + mImageOffsetX, + itemY + mImageOffsetY); } } @@ -331,7 +344,8 @@ void ItemShortcutContainer::safeDraw(Graphics *const graphics) mForegroundColor, mForegroundColor, spell->getSymbol(), - itemX + 2, itemY + mBoxHeight / 2); + itemX + mTextOffsetX, + itemY + mBoxHeight / 2); } } else if (skillDialog != nullptr) @@ -345,7 +359,9 @@ void ItemShortcutContainer::safeDraw(Graphics *const graphics) if (image != nullptr) { image->setAlpha(1.0F); - graphics->drawImage(image, itemX, itemY); + graphics->drawImage(image, + itemX + mImageOffsetX, + itemY + mImageOffsetY); } if (!skill->data->haveIcon) { @@ -353,7 +369,7 @@ void ItemShortcutContainer::safeDraw(Graphics *const graphics) mForegroundColor, mForegroundColor, skill->data->shortName, - itemX + 2, + itemX + mTextOffsetX, itemY + mBoxHeight / 2); } } |