summaryrefslogtreecommitdiff
path: root/src/gui/widgets/itemcontainer.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-10-22 00:07:52 +0300
committerAndrei Karas <akaras@inbox.ru>2012-10-22 00:07:52 +0300
commit8c8fa7cb1755696684fac4ae343621b912ed9419 (patch)
tree27e8012b6c717b03bd4b0a0ea6203da3d14bc64e /src/gui/widgets/itemcontainer.cpp
parentd03dcbba2674854cac2d94c259a7ffb20026d188 (diff)
downloadmanaplus-8c8fa7cb1755696684fac4ae343621b912ed9419.tar.gz
manaplus-8c8fa7cb1755696684fac4ae343621b912ed9419.tar.bz2
manaplus-8c8fa7cb1755696684fac4ae343621b912ed9419.tar.xz
manaplus-8c8fa7cb1755696684fac4ae343621b912ed9419.zip
Extend item container theming.
New theme parameters: paddingItemX - padding for item icon from left paddingItemY - padding for item icon from top
Diffstat (limited to 'src/gui/widgets/itemcontainer.cpp')
-rw-r--r--src/gui/widgets/itemcontainer.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gui/widgets/itemcontainer.cpp b/src/gui/widgets/itemcontainer.cpp
index d5fc81686..616c5caa2 100644
--- a/src/gui/widgets/itemcontainer.cpp
+++ b/src/gui/widgets/itemcontainer.cpp
@@ -180,6 +180,8 @@ ItemContainer::ItemContainer(const Widget2 *const widget,
mBoxHeight(mSkin ? mSkin->getOption("boxHeight", 43) : 43),
mEquippedTextPadding(mSkin ? mSkin->getOption(
"equippedTextPadding", 29) : 29),
+ mPaddingItemX(mSkin ? mSkin->getOption("paddingItemX", 0) : 0),
+ mPaddingItemY(mSkin ? mSkin->getOption("paddingItemY", 0) : 0),
mEquipedColor(getThemeColor(Theme::ITEM_EQUIPPED)),
mUnEquipedColor(getThemeColor(Theme::ITEM_NOT_EQUIPPED))
{
@@ -266,7 +268,8 @@ void ItemContainer::draw(gcn::Graphics *graphics)
}
}
image->setAlpha(1.0f); // ensure the image if fully drawn...
- g->drawImage(image, itemX, itemY);
+ g->drawImage(image, itemX + mPaddingItemX,
+ itemY + mPaddingItemY);
}
}
}