diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-08-02 22:53:35 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-08-03 01:01:11 +0300 |
commit | daa922db12d8387fefa0952dc06697614de0175f (patch) | |
tree | fc4fe51a5c534a5e8cdc13a56a4b1b5538a3c0c3 /src/gui/widgets/itemshortcutcontainer.cpp | |
parent | f886c62eee04a89c01d30322db1a9eb85f699ac3 (diff) | |
download | plus-daa922db12d8387fefa0952dc06697614de0175f.tar.gz plus-daa922db12d8387fefa0952dc06697614de0175f.tar.bz2 plus-daa922db12d8387fefa0952dc06697614de0175f.tar.xz plus-daa922db12d8387fefa0952dc06697614de0175f.zip |
Dont draw name in skill shortcuts if icon already present.
Diffstat (limited to 'src/gui/widgets/itemshortcutcontainer.cpp')
-rw-r--r-- | src/gui/widgets/itemshortcutcontainer.cpp | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/src/gui/widgets/itemshortcutcontainer.cpp b/src/gui/widgets/itemshortcutcontainer.cpp index 915923610..e99230216 100644 --- a/src/gui/widgets/itemshortcutcontainer.cpp +++ b/src/gui/widgets/itemshortcutcontainer.cpp @@ -208,13 +208,15 @@ void ItemShortcutContainer::draw(Graphics *const graphics) image->setAlpha(1.0F); graphics->drawImage(image, itemX, itemY); } - - font->drawString(graphics, - mForegroundColor, - mForegroundColor, - skill->data->shortName, - itemX + 2, - itemY + mBoxHeight / 2); + if (!skill->data->haveIcon) + { + font->drawString(graphics, + mForegroundColor, + mForegroundColor, + skill->data->shortName, + itemX + 2, + itemY + mBoxHeight / 2); + } } } } @@ -345,13 +347,15 @@ void ItemShortcutContainer::safeDraw(Graphics *const graphics) image->setAlpha(1.0F); graphics->drawImage(image, itemX, itemY); } - - font->drawString(graphics, - mForegroundColor, - mForegroundColor, - skill->data->shortName, - itemX + 2, - itemY + mBoxHeight / 2); + if (!skill->data->haveIcon) + { + font->drawString(graphics, + mForegroundColor, + mForegroundColor, + skill->data->shortName, + itemX + 2, + itemY + mBoxHeight / 2); + } } } } |