|
|
|
@ -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);
|
|
|
|
|
}
|
|
|
|
|