summaryrefslogtreecommitdiff
path: root/indra/newview/llwearableitemslist.cpp
diff options
context:
space:
mode:
authorIgor Borovkov <iborovkov@productengine.com>2010-05-13 13:25:02 +0300
committerIgor Borovkov <iborovkov@productengine.com>2010-05-13 13:25:02 +0300
commit2ab9fbf019b579e0130b75769bd3c862040480a8 (patch)
treeb54618df93c674652583c8bcef9de4db65737821 /indra/newview/llwearableitemslist.cpp
parent1b41e68636a43e2efc88faae29496895e882e0d0 (diff)
EXT-7218 FIXED added a delete button for attachment items (panel outfit edit)
added a deletable wearable item, predecessor of a clothing item, which is used for attachment items Reviewed by Neal Orman and Mike Antipov at https://codereview.productengine.com/secondlife/r/377 --HG-- branch : product-engine
Diffstat (limited to 'indra/newview/llwearableitemslist.cpp')
-rw-r--r--indra/newview/llwearableitemslist.cpp49
1 files changed, 42 insertions, 7 deletions
diff --git a/indra/newview/llwearableitemslist.cpp b/indra/newview/llwearableitemslist.cpp
index 26f6bc47cd..bac66d966a 100644
--- a/indra/newview/llwearableitemslist.cpp
+++ b/indra/newview/llwearableitemslist.cpp
@@ -103,7 +103,7 @@ LLPanelClothingListItem* LLPanelClothingListItem::create(LLViewerInventoryItem*
}
LLPanelClothingListItem::LLPanelClothingListItem(LLViewerInventoryItem* item)
- : LLPanelWearableListItem(item)
+ : LLPanelDeletableWearableListItem(item)
{
}
@@ -118,18 +118,13 @@ void LLPanelClothingListItem::init()
BOOL LLPanelClothingListItem::postBuild()
{
- LLPanelInventoryListItemBase::postBuild();
+ LLPanelDeletableWearableListItem::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();
@@ -176,6 +171,46 @@ BOOL LLPanelBodyPartsListItem::postBuild()
return TRUE;
}
+
+// static
+LLPanelDeletableWearableListItem* LLPanelDeletableWearableListItem::create(LLViewerInventoryItem* item)
+{
+ LLPanelDeletableWearableListItem* list_item = NULL;
+ if(item)
+ {
+ list_item = new LLPanelDeletableWearableListItem(item);
+ list_item->init();
+ }
+ return list_item;
+}
+
+LLPanelDeletableWearableListItem::LLPanelDeletableWearableListItem(LLViewerInventoryItem* item)
+: LLPanelWearableListItem(item)
+{
+}
+
+void LLPanelDeletableWearableListItem::init()
+{
+ LLUICtrlFactory::getInstance()->buildPanel(this, "panel_deletable_wearable_list_item.xml");
+}
+
+BOOL LLPanelDeletableWearableListItem::postBuild()
+{
+ LLPanelWearableListItem::postBuild();
+
+ addWidgetToLeftSide("btn_delete");
+
+ 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;
+}
+
+
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////