|
|
@ -28,6 +28,7 @@ namespace MWGui
|
|
|
|
|
|
|
|
|
|
|
|
ItemWidget::ItemWidget()
|
|
|
|
ItemWidget::ItemWidget()
|
|
|
|
: mItem(NULL)
|
|
|
|
: mItem(NULL)
|
|
|
|
|
|
|
|
, mItemShadow(NULL)
|
|
|
|
, mFrame(NULL)
|
|
|
|
, mFrame(NULL)
|
|
|
|
, mText(NULL)
|
|
|
|
, mText(NULL)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -44,6 +45,9 @@ namespace MWGui
|
|
|
|
assignWidget(mItem, "Item");
|
|
|
|
assignWidget(mItem, "Item");
|
|
|
|
if (mItem)
|
|
|
|
if (mItem)
|
|
|
|
mItem->setNeedMouseFocus(false);
|
|
|
|
mItem->setNeedMouseFocus(false);
|
|
|
|
|
|
|
|
assignWidget(mItemShadow, "ItemShadow");
|
|
|
|
|
|
|
|
if (mItemShadow)
|
|
|
|
|
|
|
|
mItemShadow->setNeedMouseFocus(false);
|
|
|
|
assignWidget(mFrame, "Frame");
|
|
|
|
assignWidget(mFrame, "Frame");
|
|
|
|
if (mFrame)
|
|
|
|
if (mFrame)
|
|
|
|
mFrame->setNeedMouseFocus(false);
|
|
|
|
mFrame->setNeedMouseFocus(false);
|
|
|
@ -63,6 +67,8 @@ namespace MWGui
|
|
|
|
|
|
|
|
|
|
|
|
void ItemWidget::setIcon(const std::string &icon)
|
|
|
|
void ItemWidget::setIcon(const std::string &icon)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
if (mItemShadow)
|
|
|
|
|
|
|
|
mItemShadow->setImageTexture(icon);
|
|
|
|
if (mItem)
|
|
|
|
if (mItem)
|
|
|
|
mItem->setImageTexture(icon);
|
|
|
|
mItem->setImageTexture(icon);
|
|
|
|
}
|
|
|
|
}
|
|
|
|