mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-03 13:45:34 +00:00
Add drop shadow to ItemWidget (Fixes #3545)
This commit is contained in:
parent
15046c961b
commit
612c3e995f
3 changed files with 11 additions and 0 deletions
|
@ -28,6 +28,7 @@ namespace MWGui
|
|||
|
||||
ItemWidget::ItemWidget()
|
||||
: mItem(NULL)
|
||||
, mItemShadow(NULL)
|
||||
, mFrame(NULL)
|
||||
, mText(NULL)
|
||||
{
|
||||
|
@ -44,6 +45,9 @@ namespace MWGui
|
|||
assignWidget(mItem, "Item");
|
||||
if (mItem)
|
||||
mItem->setNeedMouseFocus(false);
|
||||
assignWidget(mItemShadow, "ItemShadow");
|
||||
if (mItemShadow)
|
||||
mItemShadow->setNeedMouseFocus(false);
|
||||
assignWidget(mFrame, "Frame");
|
||||
if (mFrame)
|
||||
mFrame->setNeedMouseFocus(false);
|
||||
|
@ -63,6 +67,8 @@ namespace MWGui
|
|||
|
||||
void ItemWidget::setIcon(const std::string &icon)
|
||||
{
|
||||
if (mItemShadow)
|
||||
mItemShadow->setImageTexture(icon);
|
||||
if (mItem)
|
||||
mItem->setImageTexture(icon);
|
||||
}
|
||||
|
|
|
@ -44,6 +44,7 @@ namespace MWGui
|
|||
virtual void initialiseOverride();
|
||||
|
||||
MyGUI::ImageBox* mItem;
|
||||
MyGUI::ImageBox* mItemShadow;
|
||||
MyGUI::ImageBox* mFrame;
|
||||
MyGUI::TextBox* mText;
|
||||
};
|
||||
|
|
|
@ -120,6 +120,10 @@
|
|||
<Property key="TextShadow" value="true"/>
|
||||
</Widget>
|
||||
<Widget type="ImageBox" skin="ImageBox" position="5 5 32 32" align="Stretch" name="Item"/>
|
||||
<Widget type="ImageBox" skin="ImageBox" position="9 9 32 32" align="Stretch" name="ItemShadow">
|
||||
<Property key="Colour" value="0 0 0"/>
|
||||
<Property key="Alpha" value="0.5"/>
|
||||
</Widget>
|
||||
</Widget>
|
||||
</Widget>
|
||||
</Resource>
|
||||
|
|
Loading…
Reference in a new issue