Skip to content
Snippets Groups Projects
Commit e1cf84c9 authored by Dmitry Zaporozhan's avatar Dmitry Zaporozhan
Browse files

Fixed EXT-6550(major) - Edit Outfit: Fix alignment of in-line edit button and put proper icon on it

Replaced LLPanelInventoryListItem with LLPanelInventoryListItem. This class is capable of showing widgets on left and right sides of panel.
Implemented LLPanelClothingListItem and LLPanelBodyPartListItem - makes use of new LLPanelInventoryListItem and is able to show buttons specified in tickets. Buttons are
shown on mouse_enter event and hidden on mouse_leave event. Buttons are - delete, move up, move down, lock, edit. It's item's user responsibility
to control buttons visibility.
Made LLInventoryItemsList::addNewItem virtual to allow inheritors create specific(non-default) items.

Reviewed by Mike Antipov - https://codereview.productengine.com/secondlife/r/325/

--HG--
branch : product-engine
parent 0dc32550
Branches
Tags
No related merge requests found
...@@ -89,6 +89,7 @@ void LLCOFWearables::onSelectionChange(LLFlatListView* selected_list) ...@@ -89,6 +89,7 @@ void LLCOFWearables::onSelectionChange(LLFlatListView* selected_list)
onCommit(); onCommit();
} }
#include "llwearableitemslist.h"
void LLCOFWearables::refresh() void LLCOFWearables::refresh()
{ {
clear(); clear();
...@@ -117,16 +118,15 @@ void LLCOFWearables::populateAttachmentsAndBodypartsLists(const LLInventoryModel ...@@ -117,16 +118,15 @@ void LLCOFWearables::populateAttachmentsAndBodypartsLists(const LLInventoryModel
const LLAssetType::EType item_type = item->getType(); const LLAssetType::EType item_type = item->getType();
if (item_type == LLAssetType::AT_CLOTHING) continue; if (item_type == LLAssetType::AT_CLOTHING) continue;
LLPanelInventoryListItem* item_panel = NULL;
LLPanelInventoryListItem* item_panel = LLPanelInventoryListItem::createItemPanel(item);
if (!item_panel) continue;
if (item_type == LLAssetType::AT_OBJECT) if (item_type == LLAssetType::AT_OBJECT)
{ {
item_panel = LLPanelInventoryListItemBase::create(item);
mAttachments->addItem(item_panel, item->getUUID(), ADD_BOTTOM, false); mAttachments->addItem(item_panel, item->getUUID(), ADD_BOTTOM, false);
} }
else if (item_type == LLAssetType::AT_BODYPART) else if (item_type == LLAssetType::AT_BODYPART)
{ {
item_panel = LLPanelBodyPartsListItem::create(item);
mBodyParts->addItem(item_panel, item->getUUID(), ADD_BOTTOM, false); mBodyParts->addItem(item_panel, item->getUUID(), ADD_BOTTOM, false);
addWearableTypeSeparator(mBodyParts); addWearableTypeSeparator(mBodyParts);
} }
...@@ -165,7 +165,7 @@ void LLCOFWearables::populateClothingList(LLAppearanceMgr::wearables_by_type_t& ...@@ -165,7 +165,7 @@ void LLCOFWearables::populateClothingList(LLAppearanceMgr::wearables_by_type_t&
{ {
LLViewerInventoryItem* item = clothing_by_type[type][i]; LLViewerInventoryItem* item = clothing_by_type[type][i];
LLPanelInventoryListItem* item_panel = LLPanelInventoryListItem::createItemPanel(item); LLPanelInventoryListItem* item_panel = LLPanelClothingListItem::create(item);
if (!item_panel) continue; if (!item_panel) continue;
mClothing->addItem(item_panel, item->getUUID(), ADD_BOTTOM, false); mClothing->addItem(item_panel, item->getUUID(), ADD_BOTTOM, false);
......
...@@ -50,78 +50,214 @@ ...@@ -50,78 +50,214 @@
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// static static const S32 WIDGET_SPACING = 3;
LLPanelInventoryListItem* LLPanelInventoryListItem::createItemPanel(const LLViewerInventoryItem* item)
LLPanelInventoryListItemBase* LLPanelInventoryListItemBase::create(LLViewerInventoryItem* item)
{ {
LLPanelInventoryListItemBase* list_item = NULL;
if (item) if (item)
{ {
return new LLPanelInventoryListItem(item); list_item = new LLPanelInventoryListItemBase(item);
list_item->init();
}
return list_item;
} }
else
void LLPanelInventoryListItemBase::updateItem()
{ {
return NULL; if (mItemIcon.notNull())
mIcon->setImage(mItemIcon);
LLTextUtil::textboxSetHighlightedVal(
mTitle,
LLStyle::Params(),
mItem->getName(),
mHighlightedText);
}
void LLPanelInventoryListItemBase::addWidgetToLeftSide(const std::string& name, bool show_widget/* = true*/)
{
LLUICtrl* ctrl = findChild<LLUICtrl>(name);
if(ctrl)
{
addWidgetToLeftSide(ctrl, show_widget);
} }
} }
LLPanelInventoryListItem::~LLPanelInventoryListItem() void LLPanelInventoryListItemBase::addWidgetToLeftSide(LLUICtrl* ctrl, bool show_widget/* = true*/)
{} {
mLeftSideWidgets.push_back(ctrl);
setShowWidget(ctrl, show_widget);
}
//virtual void LLPanelInventoryListItemBase::addWidgetToRightSide(const std::string& name, bool show_widget/* = true*/)
BOOL LLPanelInventoryListItem::postBuild() {
LLUICtrl* ctrl = findChild<LLUICtrl>(name);
if(ctrl)
{ {
addWidgetToRightSide(ctrl, show_widget);
}
}
void LLPanelInventoryListItemBase::addWidgetToRightSide(LLUICtrl* ctrl, bool show_widget/* = true*/)
{
mRightSideWidgets.push_back(ctrl);
setShowWidget(ctrl, show_widget);
}
void LLPanelInventoryListItemBase::setShowWidget(const std::string& name, bool show)
{
LLUICtrl* widget = findChild<LLUICtrl>(name);
if(widget)
{
setShowWidget(widget, show);
}
}
void LLPanelInventoryListItemBase::setShowWidget(LLUICtrl* ctrl, bool show)
{
// Enable state determines whether widget may become visible in setWidgetsVisible()
ctrl->setEnabled(show);
}
BOOL LLPanelInventoryListItemBase::postBuild()
{
// Inheritors need to call base implementation
mIcon = getChild<LLIconCtrl>("item_icon"); mIcon = getChild<LLIconCtrl>("item_icon");
mTitle = getChild<LLTextBox>("item_name"); mTitle = getChild<LLTextBox>("item_name");
updateItem(); updateItem();
setWidgetsVisible(false);
reshapeWidgets();
return TRUE; return TRUE;
} }
//virtual void LLPanelInventoryListItemBase::setValue(const LLSD& value)
void LLPanelInventoryListItem::setValue(const LLSD& value)
{ {
if (!value.isMap()) return; if (!value.isMap()) return;
if (!value.has("selected")) return; if (!value.has("selected")) return;
childSetVisible("selected_icon", value["selected"]); childSetVisible("selected_icon", value["selected"]);
} }
void LLPanelInventoryListItem::updateItem() void LLPanelInventoryListItemBase::onMouseEnter(S32 x, S32 y, MASK mask)
{
if (mItemIcon.notNull())
mIcon->setImage(mItemIcon);
LLTextUtil::textboxSetHighlightedVal(
mTitle,
LLStyle::Params(),
mItemName,
mHighlightedText);
}
void LLPanelInventoryListItem::onMouseEnter(S32 x, S32 y, MASK mask)
{ {
childSetVisible("hovered_icon", true); childSetVisible("hovered_icon", true);
LLPanel::onMouseEnter(x, y, mask); LLPanel::onMouseEnter(x, y, mask);
} }
void LLPanelInventoryListItem::onMouseLeave(S32 x, S32 y, MASK mask) void LLPanelInventoryListItemBase::onMouseLeave(S32 x, S32 y, MASK mask)
{ {
childSetVisible("hovered_icon", false); childSetVisible("hovered_icon", false);
LLPanel::onMouseLeave(x, y, mask); LLPanel::onMouseLeave(x, y, mask);
} }
LLPanelInventoryListItem::LLPanelInventoryListItem(const LLViewerInventoryItem* item) LLPanelInventoryListItemBase::LLPanelInventoryListItemBase(LLViewerInventoryItem* item)
: LLPanel() : LLPanel()
, mItem(item)
, mIcon(NULL) , mIcon(NULL)
, mTitle(NULL) , mTitle(NULL)
, mWidgetSpacing(WIDGET_SPACING)
, mLeftWidgetsWidth(0)
, mRightWidgetsWidth(0)
{ {
mItemName = item->getName(); mItemIcon = get_item_icon(mItem->getType(), mItem->getInventoryType(), mItem->getFlags(), FALSE);
mItemIcon = get_item_icon(item->getType(), item->getInventoryType(), item->getFlags(), FALSE); }
void LLPanelInventoryListItemBase::init()
{
LLUICtrlFactory::getInstance()->buildPanel(this, "panel_inventory_item.xml"); LLUICtrlFactory::getInstance()->buildPanel(this, "panel_inventory_item.xml");
} }
class WidgetVisibilityChanger
{
public:
WidgetVisibilityChanger(bool visible) : mVisible(visible){}
void operator()(LLUICtrl* widget)
{
// Disabled widgets never become visible. see LLPanelInventoryListItemBase::setShowWidget()
widget->setVisible(mVisible && widget->getEnabled());
}
private:
bool mVisible;
};
void LLPanelInventoryListItemBase::setWidgetsVisible(bool visible)
{
std::for_each(mLeftSideWidgets.begin(), mLeftSideWidgets.end(), WidgetVisibilityChanger(visible));
std::for_each(mRightSideWidgets.begin(), mRightSideWidgets.end(), WidgetVisibilityChanger(visible));
}
void LLPanelInventoryListItemBase::reshapeWidgets()
{
// disabled reshape left for now to reserve space for 'delete' button in LLPanelClothingListItem
/*reshapeLeftWidgets();*/
reshapeRightWidgets();
reshapeMiddleWidgets();
}
void LLPanelInventoryListItemBase::reshapeLeftWidgets()
{
S32 widget_left = 0;
mLeftWidgetsWidth = 0;
widget_array_t::const_iterator it = mLeftSideWidgets.begin();
const widget_array_t::const_iterator it_end = mLeftSideWidgets.end();
for( ; it_end != it; ++it)
{
LLUICtrl* widget = *it;
if(!widget->getVisible())
{
continue;
}
LLRect widget_rect(widget->getRect());
widget_rect.setLeftTopAndSize(widget_left, widget_rect.mTop, widget_rect.getWidth(), widget_rect.getHeight());
widget->setShape(widget_rect);
widget_left += widget_rect.getWidth() + getWidgetSpacing();
mLeftWidgetsWidth = widget_rect.mRight;
}
}
void LLPanelInventoryListItemBase::reshapeRightWidgets()
{
S32 widget_right = getLocalRect().getWidth();
S32 widget_left = widget_right;
widget_array_t::const_reverse_iterator it = mRightSideWidgets.rbegin();
const widget_array_t::const_reverse_iterator it_end = mRightSideWidgets.rend();
for( ; it_end != it; ++it)
{
LLUICtrl* widget = *it;
if(!widget->getVisible())
{
continue;
}
LLRect widget_rect(widget->getRect());
widget_left = widget_right - widget_rect.getWidth();
widget_rect.setLeftTopAndSize(widget_left, widget_rect.mTop, widget_rect.getWidth(), widget_rect.getHeight());
widget->setShape(widget_rect);
widget_right = widget_left - getWidgetSpacing();
}
mRightWidgetsWidth = getLocalRect().getWidth() - widget_left;
}
void LLPanelInventoryListItemBase::reshapeMiddleWidgets()
{
LLRect icon_rect(mIcon->getRect());
icon_rect.setLeftTopAndSize(mLeftWidgetsWidth + getWidgetSpacing(), icon_rect.mTop,
icon_rect.getWidth(), icon_rect.getHeight());
mIcon->setShape(icon_rect);
S32 name_left = icon_rect.mRight + getWidgetSpacing();
S32 name_right = getLocalRect().getWidth() - mRightWidgetsWidth - getWidgetSpacing();
LLRect name_rect(mTitle->getRect());
name_rect.set(name_left, name_rect.mTop, name_right, name_rect.mBottom);
mTitle->setShape(name_rect);
}
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
...@@ -223,7 +359,7 @@ void LLInventoryItemsList::addNewItem(LLViewerInventoryItem* item) ...@@ -223,7 +359,7 @@ void LLInventoryItemsList::addNewItem(LLViewerInventoryItem* item)
llassert(!"No inventory item. Couldn't create flat list item."); llassert(!"No inventory item. Couldn't create flat list item.");
} }
LLPanelInventoryListItem *list_item = LLPanelInventoryListItem::createItemPanel(item); LLPanelInventoryListItemBase *list_item = LLPanelInventoryListItemBase::create(item);
if (!list_item) if (!list_item)
return; return;
......
...@@ -47,33 +47,130 @@ class LLIconCtrl; ...@@ -47,33 +47,130 @@ class LLIconCtrl;
class LLTextBox; class LLTextBox;
class LLViewerInventoryItem; class LLViewerInventoryItem;
class LLPanelInventoryListItem : public LLPanel /**
* @class LLPanelInventoryListItemBase
*
* Base class for Inventory flat list item. Panel consists of inventory icon
* and inventory item name.
* This class is able to display widgets(buttons) on left(before icon) and right(after text-box) sides
* of panel.
*
* How to use (see LLPanelClothingListItem for example):
* - implement init() to build panel from xml
* - create new xml file, fill it with widgets you want to dynamically show/hide/reshape on left/right sides
* - redefine postBuild()(call base implementation) and add needed widgets to needed sides,
*
*/
class LLPanelInventoryListItemBase : public LLPanel
{ {
public: public:
static LLPanelInventoryListItem* createItemPanel(const LLViewerInventoryItem* item);
virtual ~LLPanelInventoryListItem(); static LLPanelInventoryListItemBase* create(LLViewerInventoryItem* item);
/**
* Called after inventory item was updated, update panel widgets to reflect inventory changes.
*/
virtual void updateItem();
/**
* Add widget to left side
*/
void addWidgetToLeftSide(const std::string& name, bool show_widget = true);
void addWidgetToLeftSide(LLUICtrl* ctrl, bool show_widget = true);
/**
* Add widget to right side, widget is supposed to be child of calling panel
*/
void addWidgetToRightSide(const std::string& name, bool show_widget = true);
void addWidgetToRightSide(LLUICtrl* ctrl, bool show_widget = true);
/**
* Mark widgets as visible. Only visible widgets take part in reshaping children
*/
void setShowWidget(const std::string& name, bool show);
void setShowWidget(LLUICtrl* ctrl, bool show);
/**
* Set spacing between widgets during reshape
*/
void setWidgetSpacing(S32 spacing) { mWidgetSpacing = spacing; }
S32 getWidgetSpacing() { return mWidgetSpacing; }
/**
* Inheritors need to call base implementation of postBuild()
*/
/*virtual*/ BOOL postBuild(); /*virtual*/ BOOL postBuild();
/**
* Handles item selection
*/
/*virtual*/ void setValue(const LLSD& value); /*virtual*/ void setValue(const LLSD& value);
void updateItem(); /* Highlights item */
/*virtual*/ void onMouseEnter(S32 x, S32 y, MASK mask);
/* Removes item highlight */
/*virtual*/ void onMouseLeave(S32 x, S32 y, MASK mask);
void onMouseEnter(S32 x, S32 y, MASK mask); virtual ~LLPanelInventoryListItemBase(){}
void onMouseLeave(S32 x, S32 y, MASK mask);
protected: protected:
LLPanelInventoryListItem(const LLViewerInventoryItem* item);
LLPanelInventoryListItemBase(LLViewerInventoryItem* item);
typedef std::vector<LLUICtrl*> widget_array_t;
/**
* Use it from a factory function to build panel, do not build panel in constructor
*/
virtual void init();
void setLeftWidgetsWidth(S32 width) { mLeftWidgetsWidth = width; }
void setRightWidgetsWidth(S32 width) { mRightWidgetsWidth = width; }
/**
* Set all widgets from both side visible/invisible. Only enabled widgets
* (see setShowWidget()) can become visible
*/
virtual void setWidgetsVisible(bool visible);
/**
* Reshape all child widgets - icon, text-box and side widgets
*/
virtual void reshapeWidgets();
private: private:
/** reshape left side widgets
* Deprecated for now. Disabled reshape left for now to reserve space for 'delete'
* button in LLPanelClothingListItem according to Neal's comment (https://codereview.productengine.com/secondlife/r/325/)
*/
void reshapeLeftWidgets();
/** reshape right side widgets */
void reshapeRightWidgets();
/** reshape remaining widgets */
void reshapeMiddleWidgets();
LLViewerInventoryItem* mItem;
LLIconCtrl* mIcon; LLIconCtrl* mIcon;
LLTextBox* mTitle; LLTextBox* mTitle;
LLUIImagePtr mItemIcon; LLUIImagePtr mItemIcon;
std::string mItemName;
std::string mHighlightedText; std::string mHighlightedText;
widget_array_t mLeftSideWidgets;
widget_array_t mRightSideWidgets;
S32 mWidgetSpacing;
S32 mLeftWidgetsWidth;
S32 mRightWidgetsWidth;
}; };
//////////////////////////////////////////////////////////////////////////
class LLInventoryItemsList : public LLFlatListView class LLInventoryItemsList : public LLFlatListView
{ {
public: public:
...@@ -117,7 +214,7 @@ class LLInventoryItemsList : public LLFlatListView ...@@ -117,7 +214,7 @@ class LLInventoryItemsList : public LLFlatListView
/** /**
* Add an item to the list * Add an item to the list
*/ */
void addNewItem(LLViewerInventoryItem* item); virtual void addNewItem(LLViewerInventoryItem* item);
private: private:
uuid_vec_t mIDs; // IDs of items that were added in refreshList(). uuid_vec_t mIDs; // IDs of items that were added in refreshList().
......
...@@ -60,6 +60,158 @@ bool LLFindOutfitItems::operator()(LLInventoryCategory* cat, ...@@ -60,6 +60,158 @@ bool LLFindOutfitItems::operator()(LLInventoryCategory* cat,
return FALSE; return FALSE;
} }
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
void LLPanelWearableListItem::onMouseEnter(S32 x, S32 y, MASK mask)
{
LLPanelInventoryListItemBase::onMouseEnter(x, y, mask);
setWidgetsVisible(true);
reshapeWidgets();
}
void LLPanelWearableListItem::onMouseLeave(S32 x, S32 y, MASK mask)
{
LLPanelInventoryListItemBase::onMouseLeave(x, y, mask);
setWidgetsVisible(false);
reshapeWidgets();
}
LLPanelWearableListItem::LLPanelWearableListItem(LLViewerInventoryItem* item)
: LLPanelInventoryListItemBase(item)
{
}
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
// static
LLPanelClothingListItem* LLPanelClothingListItem::create(LLViewerInventoryItem* item)
{
LLPanelClothingListItem* list_item = NULL;
if(item)
{
list_item = new LLPanelClothingListItem(item);
list_item->init();
}
return list_item;
}
LLPanelClothingListItem::LLPanelClothingListItem(LLViewerInventoryItem* item)
: LLPanelWearableListItem(item)
{
}
LLPanelClothingListItem::~LLPanelClothingListItem()
{
}
void LLPanelClothingListItem::init()
{
LLUICtrlFactory::getInstance()->buildPanel(this, "panel_clothing_list_item.xml");
}
BOOL LLPanelClothingListItem::postBuild()
{
LLPanelInventoryListItemBase::postBuild();
addWidgetToLeftSide("btn_delete");
addWidgetToRightSide("btn_move_up");
addWidgetToRightSide("btn_move_down");
addWidgetToRightSide("btn_lock");
addWidgetToRightSide("btn_edit");
LLButton* delete_btn = getChild<LLButton>("btn_delete");
// Reserve space for 'delete' button event if it is invisible.
setLeftWidgetsWidth(delete_btn->getRect().mRight);
setWidgetsVisible(false);
reshapeWidgets();
return TRUE;
}
void LLPanelClothingListItem::setShowDeleteButton(bool show)
{
setShowWidget("btn_delete", show);
}
void LLPanelClothingListItem::setShowMoveUpButton(bool show)
{
setShowWidget("btn_move_up", show);
}
void LLPanelClothingListItem::setShowMoveDownButton(bool show)
{
setShowWidget("btn_move_down", show);
}
void LLPanelClothingListItem::setShowLockButton(bool show)
{
setShowWidget("btn_lock", show);
}
void LLPanelClothingListItem::setShowEditButton(bool show)
{
setShowWidget("btn_edit", show);
}
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
// static
LLPanelBodyPartsListItem* LLPanelBodyPartsListItem::create(LLViewerInventoryItem* item)
{
LLPanelBodyPartsListItem* list_item = NULL;
if(item)
{
list_item = new LLPanelBodyPartsListItem(item);
list_item->init();
}
return list_item;
}
LLPanelBodyPartsListItem::LLPanelBodyPartsListItem(LLViewerInventoryItem* item)
: LLPanelWearableListItem(item)
{
}
LLPanelBodyPartsListItem::~LLPanelBodyPartsListItem()
{
}
void LLPanelBodyPartsListItem::init()
{
LLUICtrlFactory::getInstance()->buildPanel(this, "panel_body_parts_list_item.xml");
}
BOOL LLPanelBodyPartsListItem::postBuild()
{
LLPanelInventoryListItemBase::postBuild();
addWidgetToRightSide("btn_lock");
addWidgetToRightSide("btn_edit");
return TRUE;
}
void LLPanelBodyPartsListItem::setShowLockButton(bool show)
{
setShowWidget("btn_lock", show);
}
void LLPanelBodyPartsListItem::setShowEditButton(bool show)
{
setShowWidget("btn_edit", show);
}
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
static const LLDefaultChildRegistry::Register<LLWearableItemsList> r("wearable_items_list"); static const LLDefaultChildRegistry::Register<LLWearableItemsList> r("wearable_items_list");
LLWearableItemsList::Params::Params() LLWearableItemsList::Params::Params()
...@@ -89,3 +241,5 @@ void LLWearableItemsList::updateList(const LLUUID& category_id) ...@@ -89,3 +241,5 @@ void LLWearableItemsList::updateList(const LLUUID& category_id)
refreshList(item_array); refreshList(item_array);
} }
// EOF
...@@ -36,6 +36,89 @@ ...@@ -36,6 +36,89 @@
// newview // newview
#include "llinventoryitemslist.h" #include "llinventoryitemslist.h"
#include "llinventorymodel.h"
#include "llwearabledictionary.h"
/**
* @class LLPanelWearableListItem
*
* Extends LLPanelInventoryListItemBase:
* - makes side widgets show on mouse_enter and hide on
* mouse_leave events.
* - provides callback for button clicks
*/
class LLPanelWearableListItem : public LLPanelInventoryListItemBase
{
LOG_CLASS(LLPanelWearableListItem);
public:
/**
* Shows buttons when mouse is over
*/
/*virtual*/ void onMouseEnter(S32 x, S32 y, MASK mask);
/**
* Hides buttons when mouse is out
*/
/*virtual*/ void onMouseLeave(S32 x, S32 y, MASK mask);
protected:
LLPanelWearableListItem(LLViewerInventoryItem* item);
};
/**
* @class LLPanelClothingListItem
*
* Provides buttons for editing, moving, deleting a wearable.
*/
class LLPanelClothingListItem : public LLPanelWearableListItem
{
LOG_CLASS(LLPanelClothingListItem);
public:
static LLPanelClothingListItem* create(LLViewerInventoryItem* item);
virtual ~LLPanelClothingListItem();
/*virtual*/ void init();
/*virtual*/ BOOL postBuild();
/**
* Make button visible during mouse over event.
*/
inline void setShowDeleteButton(bool show);
inline void setShowMoveUpButton(bool show);
inline void setShowMoveDownButton(bool show);
inline void setShowLockButton(bool show);
inline void setShowEditButton(bool show);
protected:
LLPanelClothingListItem(LLViewerInventoryItem* item);
};
class LLPanelBodyPartsListItem : public LLPanelWearableListItem
{
LOG_CLASS(LLPanelBodyPartsListItem);
public:
static LLPanelBodyPartsListItem* create(LLViewerInventoryItem* item);
virtual ~LLPanelBodyPartsListItem();
/*virtual*/ void init();
/*virtual*/ BOOL postBuild();
/**
* Make button visible during mouse over event.
*/
inline void setShowLockButton(bool show);
inline void setShowEditButton(bool show);
protected:
LLPanelBodyPartsListItem(LLViewerInventoryItem* item);
};
/** /**
* @class LLWearableItemsList * @class LLWearableItemsList
......
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<panel
follows="top|right|left"
height="20"
layout="topleft"
left="0"
name="wearable_item"
top="0"
width="380">
<icon
follows="top|right|left"
height="20"
image_name="ListItem_Over"
layout="topleft"
left="0"
name="hovered_icon"
top="0"
visible="false"
width="380" />
<icon
height="20"
follows="top|right|left"
image_name="ListItem_Select"
layout="topleft"
left="0"
name="selected_icon"
top="0"
visible="false"
width="380" />
<icon
height="16"
follows="top|left"
image_name="Inv_Object"
layout="topleft"
left="0"
name="item_icon"
top="2"
width="16" />
<text
follows="left|right"
height="16"
layout="topleft"
left_pad="5"
allow_html="false"
use_ellipses="true"
name="item_name"
text_color="white"
top="4"
value="..."
width="359" />
<button
name="btn_lock"
layout="topleft"
follows="top|right"
image_unselected="Lock2"
image_selected="Lock2"
top="0"
left_pad="3"
height="20"
width="20"
tab_stop="false" />
<button
name="btn_edit"
layout="topleft"
follows="top|right"
image_unselected="Icon_Gear_Background"
image_selected="Icon_Gear_Background"
top="0"
left_pad="3"
height="20"
width="20"
tab_stop="false" />
</panel>
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<panel
follows="top|right|left"
height="20"
layout="topleft"
left="0"
name="wearable_item"
top="0"
width="380">
<icon
follows="top|right|left"
height="20"
image_name="ListItem_Over"
layout="topleft"
left="0"
name="hovered_icon"
top="0"
visible="false"
width="380" />
<icon
height="20"
follows="top|right|left"
image_name="ListItem_Select"
layout="topleft"
left="0"
name="selected_icon"
top="0"
visible="false"
width="380" />
<button
name="btn_delete"
layout="topleft"
follows="top|left"
image_unselected="Toast_CloseBtn"
image_selected="Toast_CloseBtn"
top="0"
left="0"
height="20"
width="20"
tab_stop="false" />
<icon
height="16"
follows="top|left"
image_name="Inv_Object"
layout="topleft"
left_pad="3"
name="item_icon"
top="2"
width="16" />
<text
follows="left|right"
height="16"
layout="topleft"
left_pad="5"
allow_html="false"
use_ellipses="true"
name="item_name"
text_color="white"
top="4"
value="..."
width="359" />
<button
name="btn_move_up"
layout="topleft"
follows="top|right"
image_unselected="Movement_Up_Off"
image_selected="Movement_Up_Off"
top="0"
left="0"
height="20"
width="20"
tab_stop="false" />
<button
name="btn_move_down"
layout="topleft"
follows="top|right"
image_unselected="Movement_Down_Off"
image_selected="Movement_Down_Off"
top="0"
left_pad="3"
height="20"
width="20"
tab_stop="false" />
<button
name="btn_lock"
layout="topleft"
follows="top|right"
image_unselected="Lock2"
image_selected="Lock2"
top="0"
left_pad="3"
height="20"
width="20"
tab_stop="false" />
<button
name="btn_edit"
layout="topleft"
follows="top|right"
image_unselected="Icon_Gear_Background"
image_selected="Icon_Gear_Background"
top="0"
left_pad="3"
height="20"
width="20"
tab_stop="false" />
</panel>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment