From daa922db12d8387fefa0952dc06697614de0175f Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 2 Aug 2017 22:53:35 +0300 Subject: Dont draw name in skill shortcuts if icon already present. --- src/gui/widgets/itemshortcutcontainer.cpp | 32 +++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) (limited to 'src/gui/widgets') 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); + } } } } -- cgit v1.2.3-70-g09d2