diff options
Diffstat (limited to 'indra/newview/llwearableitemslist.h')
-rw-r--r-- | indra/newview/llwearableitemslist.h | 38 |
1 files changed, 34 insertions, 4 deletions
diff --git a/indra/newview/llwearableitemslist.h b/indra/newview/llwearableitemslist.h index 7ad1b5a3ad..2fdb8f0ab8 100644 --- a/indra/newview/llwearableitemslist.h +++ b/indra/newview/llwearableitemslist.h @@ -70,6 +70,29 @@ protected: LLPanelWearableListItem(LLViewerInventoryItem* item); }; +/** + * @class LLPanelWearableOutfitItem + * + * Outfit item for "My Outfits" list. + * Extends LLPanelInventoryListItemBase with handling + * double click to wear the item. + */ +class LLPanelWearableOutfitItem : public LLPanelInventoryListItemBase +{ + LOG_CLASS(LLPanelWearableOutfitItem); +public: + static LLPanelWearableOutfitItem* create(LLViewerInventoryItem* item); + + /** + * Puts item on if it is not worn by agent + * otherwise takes it off on double click. + */ + /*virtual*/ BOOL handleDoubleClick(S32 x, S32 y, MASK mask); + +protected: + + LLPanelWearableOutfitItem(LLViewerInventoryItem* item); +}; class LLPanelDeletableWearableListItem : public LLPanelWearableListItem { @@ -116,7 +139,7 @@ public: inline void setShowMoveDownButton(bool show) { setShowWidget("btn_move_down", show); } inline void setShowLockButton(bool show) { setShowWidget("btn_lock", show); } - inline void setShowEditButton(bool show) { setShowWidget("btn_edit", show); } + inline void setShowEditButton(bool show) { setShowWidget("btn_edit_panel", show); } protected: @@ -141,7 +164,7 @@ public: * Make button visible during mouse over event. */ inline void setShowLockButton(bool show) { setShowWidget("btn_lock", show); } - inline void setShowEditButton(bool show) { setShowWidget("btn_edit", show); } + inline void setShowEditButton(bool show) { setShowWidget("btn_edit_panel", show); } protected: LLPanelBodyPartsListItem(LLViewerInventoryItem* item); @@ -162,6 +185,7 @@ public: /*virtual*/ void updateItem(); /*virtual*/ BOOL postBuild(); + LLWearableType::EType getWearableType() const; protected: LLPanelDummyClothingListItem(LLWearableType::EType w_type); @@ -291,12 +315,16 @@ public: MASK_CLOTHING = 0x01, MASK_BODYPART = 0x02, MASK_ATTACHMENT = 0x04, + MASK_UNKNOWN = 0x08, }; /* virtual */ LLContextMenu* createMenu(); void updateItemsVisibility(LLContextMenu* menu); - void setMenuItemVisible(LLContextMenu* menu, const std::string& name, bool val); - void updateMask(U32& mask, LLAssetType::EType at); + void updateItemsLabels(LLContextMenu* menu); + static void setMenuItemVisible(LLContextMenu* menu, const std::string& name, bool val); + static void setMenuItemEnabled(LLContextMenu* menu, const std::string& name, bool val); + static void updateMask(U32& mask, LLAssetType::EType at); + static void createNewWearable(const LLUUID& item_id); }; struct Params : public LLInitParam::Block<Params, LLInventoryItemsList::Params> @@ -308,6 +336,8 @@ public: virtual ~LLWearableItemsList(); + /*virtual*/ void addNewItem(LLViewerInventoryItem* item, bool rearrange = true); + void updateList(const LLUUID& category_id); protected: |