diff options
24 files changed, 814 insertions, 99 deletions
| diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 5586b3cd4d..e93e29ecde 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -1092,7 +1092,8 @@ void LLAppearanceMgr::updateAppearanceFromCOF()  	}  	//preparing the list of wearables in the correct order for LLAgentWearables -	std::sort(wear_items.begin(), wear_items.end(), sort_by_description); +	sortItemsByActualDescription(wear_items); +  	LLWearableHoldingPattern* holder = new LLWearableHoldingPattern; @@ -1910,6 +1911,13 @@ bool LLAppearanceMgr::moveWearable(LLViewerInventoryItem* item, bool closer_to_b  	return result;  } +//static +void LLAppearanceMgr::sortItemsByActualDescription(LLInventoryModel::item_array_t& items) +{ +	if (items.size() < 2) return; + +	std::sort(items.begin(), items.end(), sort_by_description); +}  //#define DUMP_CAT_VERBOSE diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h index a308a3efa9..516dada39d 100644 --- a/indra/newview/llappearancemgr.h +++ b/indra/newview/llappearancemgr.h @@ -48,6 +48,8 @@ class LLAppearanceMgr: public LLSingleton<LLAppearanceMgr>  	friend class LLSingleton<LLAppearanceMgr>;  public: +	typedef std::vector<LLInventoryModel::item_array_t> wearables_by_type_t; +  	void updateAppearanceFromCOF();  	bool needToSaveCOF();  	void updateCOF(const LLUUID& category, bool append = false); @@ -143,17 +145,17 @@ public:  	bool moveWearable(LLViewerInventoryItem* item, bool closer_to_body); +	static void sortItemsByActualDescription(LLInventoryModel::item_array_t& items); + +	//Divvy items into arrays by wearable type +	static void divvyWearablesByType(const LLInventoryModel::item_array_t& items, wearables_by_type_t& items_by_type); +  protected:  	LLAppearanceMgr();  	~LLAppearanceMgr();  private: -	typedef std::vector<LLInventoryModel::item_array_t> wearables_by_type_t; - -	//Divvy items into arrays by wearable type -	static void divvyWearablesByType(const LLInventoryModel::item_array_t& items, wearables_by_type_t& items_by_type); -  	//Check ordering information on wearables stored in links' descriptions and update if it is invalid  	void updateClothingOrderingInfo(); diff --git a/indra/newview/llcofwearables.cpp b/indra/newview/llcofwearables.cpp index f0442ee3f6..e21644e119 100644 --- a/indra/newview/llcofwearables.cpp +++ b/indra/newview/llcofwearables.cpp @@ -94,47 +94,139 @@ void LLCOFWearables::refresh()  	clear();  	LLInventoryModel::cat_array_t cats; -	LLInventoryModel::item_array_t items; +	LLInventoryModel::item_array_t cof_items; + +	gInventory.collectDescendents(LLAppearanceMgr::getInstance()->getCOF(), cats, cof_items, LLInventoryModel::EXCLUDE_TRASH); + +	populateAttachmentsAndBodypartsLists(cof_items); + + +	LLAppearanceMgr::wearables_by_type_t clothing_by_type(WT_COUNT); +	LLAppearanceMgr::getInstance()->divvyWearablesByType(cof_items, clothing_by_type); -	gInventory.collectDescendents(LLAppearanceMgr::getInstance()->getCOF(), cats, items, LLInventoryModel::EXCLUDE_TRASH); -	if (items.empty()) return; +	populateClothingList(clothing_by_type); +} + -	for (U32 i = 0; i < items.size(); ++i) +void LLCOFWearables::populateAttachmentsAndBodypartsLists(const LLInventoryModel::item_array_t& cof_items) +{ +	for (U32 i = 0; i < cof_items.size(); ++i)  	{ -		LLViewerInventoryItem* item = items.get(i); +		LLViewerInventoryItem* item = cof_items.get(i);  		if (!item) continue; +		const LLAssetType::EType item_type = item->getType(); +		if (item_type == LLAssetType::AT_CLOTHING) continue; +  		LLPanelInventoryListItem* item_panel = LLPanelInventoryListItem::createItemPanel(item);  		if (!item_panel) continue; -		switch (item->getType()) +		if (item_type == LLAssetType::AT_OBJECT)  		{ -			case LLAssetType::AT_OBJECT: -				mAttachments->addItem(item_panel, item->getUUID(), ADD_BOTTOM, false); -				break; +			mAttachments->addItem(item_panel, item->getUUID(), ADD_BOTTOM, false); +		} +		else if (item_type == LLAssetType::AT_BODYPART) +		{ +			mBodyParts->addItem(item_panel, item->getUUID(), ADD_BOTTOM, false); +			addWearableTypeSeparator(mBodyParts); +		} +	} + +	if (mAttachments->size()) +	{ +		mAttachments->sort(); //*TODO by Name +		mAttachments->notify(REARRANGE); //notifying the parent about the list's size change (cause items were added with rearrange=false) +	} -			case LLAssetType::AT_BODYPART: -				mBodyParts->addItem(item_panel, item->getUUID(), ADD_BOTTOM, false); -				break; +	if (mBodyParts->size()) +	{ +		mBodyParts->sort(); //*TODO by name +	} + +	addListButtonBar(mBodyParts, "panel_bodyparts_list_button_bar.xml"); +	mBodyParts->notify(REARRANGE); +} + + +void LLCOFWearables::populateClothingList(LLAppearanceMgr::wearables_by_type_t& clothing_by_type) +{ +	llassert(clothing_by_type.size() == WT_COUNT); + +	addListButtonBar(mClothing, "panel_clothing_list_button_bar.xml"); + +	for (U32 type = WT_SHIRT; type < WT_COUNT; ++type) +	{ +		U32 size = clothing_by_type[type].size(); +		if (!size) continue; + +		LLAppearanceMgr::sortItemsByActualDescription(clothing_by_type[type]); + +		for (U32 i = 0; i < size; i++) +		{ +			LLViewerInventoryItem* item = clothing_by_type[type][i]; -			case LLAssetType::AT_CLOTHING: -				mClothing->addItem(item_panel, item->getUUID(), ADD_BOTTOM, false); -				break; +			LLPanelInventoryListItem* item_panel = LLPanelInventoryListItem::createItemPanel(item); +			if (!item_panel) continue; -			default: break; +			mClothing->addItem(item_panel, item->getUUID(), ADD_BOTTOM, false);  		} + +		addWearableTypeSeparator(mClothing);  	} -	mAttachments->sort(); //*TODO by Name -	mAttachments->notify(REARRANGE); //notifying the parent about the list's size change (cause items were added with rearrange=false) -	 -	mClothing->sort(); //*TODO by actual inventory item description +	addClothingTypesDummies(clothing_by_type); +  	mClothing->notify(REARRANGE); +} + +void LLCOFWearables::addListButtonBar(LLFlatListView* list, std::string xml_filename) +{ +	llassert(list); +	llassert(xml_filename.length()); -	mBodyParts->sort(); //*TODO by name -	mBodyParts->notify(REARRANGE); +	LLPanel::Params params; +	LLPanel* button_bar = LLUICtrlFactory::create<LLPanel>(params); +	LLUICtrlFactory::instance().buildPanel(button_bar, xml_filename); + +	LLRect rc = button_bar->getRect(); +	button_bar->reshape(list->getItemsRect().getWidth(), rc.getHeight()); + +	list->addItem(button_bar, LLUUID::null, ADD_TOP, false);  } +//adding dummy items for missing wearable types +void LLCOFWearables::addClothingTypesDummies(const LLAppearanceMgr::wearables_by_type_t& clothing_by_type) +{ +	llassert(clothing_by_type.size() == WT_COUNT); +	 +	for (U32 type = WT_SHIRT; type < WT_COUNT; type++) +	{ +		U32 size = clothing_by_type[type].size(); +		if (size) continue; + +		//*TODO create dummy item panel +		 +		//*TODO add dummy item panel -> mClothing->addItem(dummy_item_panel, item->getUUID(), ADD_BOTTOM, false); + +		addWearableTypeSeparator(mClothing); +	} +} + +void LLCOFWearables::addWearableTypeSeparator(LLFlatListView* list) +{ +	llassert(list); +	 +	static LLXMLNodePtr separator_xml_node = getXMLNode("panel_wearable_type_separator.xml"); +	if (separator_xml_node->isNull()) return; + +	LLPanel* separator = LLUICtrlFactory::defaultBuilder<LLPanel>(separator_xml_node, NULL, NULL); + +	LLRect rc = separator->getRect(); +	rc.setOriginAndSize(0, 0, list->getItemsRect().getWidth(), rc.getHeight()); +	separator->setRect(rc); + +	list->addItem(separator, LLUUID::null, ADD_BOTTOM, false); +}  LLUUID LLCOFWearables::getSelectedUUID()  { @@ -150,4 +242,17 @@ void LLCOFWearables::clear()  	mBodyParts->clear();  } +LLXMLNodePtr LLCOFWearables::getXMLNode(std::string xml_filename) +{ +	LLXMLNodePtr xmlNode = NULL; +	bool success = LLUICtrlFactory::getLayeredXMLNode(xml_filename, xmlNode); +	if (!success) +	{ +		llwarning("Failed to read xml", 0); +		return NULL; +	} + +	return xmlNode; +} +  //EOF diff --git a/indra/newview/llcofwearables.h b/indra/newview/llcofwearables.h index 58d67ed32f..fec6d34db2 100644 --- a/indra/newview/llcofwearables.h +++ b/indra/newview/llcofwearables.h @@ -34,6 +34,8 @@  #define LL_LLCOFWEARABLES_H  #include "llpanel.h" +#include "llinventorymodel.h" +#include "llappearancemgr.h"  class LLFlatListView; @@ -52,8 +54,16 @@ public:  protected: +	void populateAttachmentsAndBodypartsLists(const LLInventoryModel::item_array_t& cof_items); +	void populateClothingList(LLAppearanceMgr::wearables_by_type_t& clothing_by_type); +	 +	void addListButtonBar(LLFlatListView* list, std::string xml_filename); +	void addClothingTypesDummies(const LLAppearanceMgr::wearables_by_type_t& clothing_by_type); +	void addWearableTypeSeparator(LLFlatListView* list);  	void onSelectionChange(LLFlatListView* selected_list); +	LLXMLNodePtr getXMLNode(std::string xml_filename); +  	LLFlatListView* mAttachments;  	LLFlatListView* mClothing;  	LLFlatListView* mBodyParts; diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index f03026715d..15dbc03f70 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -257,9 +257,8 @@ LLIMModel::LLIMSession::LLIMSession(const LLUUID& session_id, const std::string&  void LLIMModel::LLIMSession::onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state, const LLVoiceChannel::EDirection& direction)  { -	std::string you = LLTrans::getString("You"); -	std::string started_call = LLTrans::getString("started_call"); -	std::string joined_call = LLTrans::getString("joined_call"); +	std::string you_joined_call = LLTrans::getString("you_joined_call"); +	std::string you_started_call = LLTrans::getString("you_started_call");  	std::string other_avatar_name = "";  	std::string message; @@ -277,13 +276,15 @@ void LLIMModel::LLIMSession::onVoiceChannelStateChanged(const LLVoiceChannel::ES  			switch(new_state)  			{  			case LLVoiceChannel::STATE_CALL_STARTED : -				message = other_avatar_name + " " + started_call; -				LLIMModel::getInstance()->addMessage(mSessionID, SYSTEM_FROM, LLUUID::null, message); -				 -				break; +				{ +					LLStringUtil::format_map_t string_args; +					string_args["[NAME]"] = other_avatar_name; +					message = LLTrans::getString("name_started_call", string_args); +					LLIMModel::getInstance()->addMessage(mSessionID, SYSTEM_FROM, LLUUID::null, message);				 +					break; +				}  			case LLVoiceChannel::STATE_CONNECTED : -				message = you + " " + joined_call; -				LLIMModel::getInstance()->addMessage(mSessionID, SYSTEM_FROM, LLUUID::null, message); +				LLIMModel::getInstance()->addMessage(mSessionID, SYSTEM_FROM, LLUUID::null, you_joined_call);  			default:  				break;  			} @@ -293,8 +294,7 @@ void LLIMModel::LLIMSession::onVoiceChannelStateChanged(const LLVoiceChannel::ES  			switch(new_state)  			{  			case LLVoiceChannel::STATE_CALL_STARTED : -				message = you + " " + started_call; -				LLIMModel::getInstance()->addMessage(mSessionID, SYSTEM_FROM, LLUUID::null, message); +				LLIMModel::getInstance()->addMessage(mSessionID, SYSTEM_FROM, LLUUID::null, you_started_call);  				break;  			case LLVoiceChannel::STATE_CONNECTED :  				message = LLTrans::getString("answered_call"); @@ -312,8 +312,7 @@ void LLIMModel::LLIMSession::onVoiceChannelStateChanged(const LLVoiceChannel::ES  			switch(new_state)  			{  			case LLVoiceChannel::STATE_CONNECTED : -				message = you + " " + joined_call; -				LLIMModel::getInstance()->addMessage(mSessionID, SYSTEM_FROM, LLUUID::null, message); +				LLIMModel::getInstance()->addMessage(mSessionID, SYSTEM_FROM, LLUUID::null, you_joined_call);  			default:  				break;  			} @@ -323,8 +322,7 @@ void LLIMModel::LLIMSession::onVoiceChannelStateChanged(const LLVoiceChannel::ES  			switch(new_state)  			{  			case LLVoiceChannel::STATE_CALL_STARTED : -				message = you + " " + started_call; -				LLIMModel::getInstance()->addMessage(mSessionID, SYSTEM_FROM, LLUUID::null, message); +				LLIMModel::getInstance()->addMessage(mSessionID, SYSTEM_FROM, LLUUID::null, you_started_call);  				break;  			default:  				break; @@ -2069,8 +2067,9 @@ void LLIncomingCallDialog::processCallResponse(S32 response)  				// send notification message to the corresponding chat   				if (mPayload["notify_box_type"].asString() == "VoiceInviteGroup" || mPayload["notify_box_type"].asString() == "VoiceInviteAdHoc")  				{ -					std::string started_call = LLTrans::getString("started_call"); -					std::string message = mPayload["caller_name"].asString() + " " + started_call; +					LLStringUtil::format_map_t string_args; +					string_args["[NAME]"] = mPayload["caller_name"].asString(); +					std::string message = LLTrans::getString("name_started_call", string_args);  					LLIMModel::getInstance()->addMessageSilently(session_id, SYSTEM_FROM, LLUUID::null, message);  				}  			} diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp index da74295f9e..3c112b8b5e 100644 --- a/indra/newview/llpaneleditwearable.cpp +++ b/indra/newview/llpaneleditwearable.cpp @@ -51,6 +51,12 @@  #include "llagentwearables.h"  #include "llscrollingpanelparam.h" +#include "llcolorswatch.h" +#include "lltexturectrl.h" +#include "lltextureentry.h" +#include "llviewercontrol.h"	// gSavedSettings +#include "llviewertexturelist.h" +  // register panel with appropriate XML  static LLRegisterPanelClassWrapper<LLPanelEditWearable> t_edit_wearable("panel_edit_wearable"); @@ -88,6 +94,8 @@ enum ESubpart {  	SUBPART_TATTOO   }; +using namespace LLVOAvatarDefines; +  typedef std::vector<ESubpart> subpart_vec_t;  // Locally defined classes @@ -110,14 +118,17 @@ public:  		WearableEntry(EWearableType type,  					  const std::string &title,  					  const std::string &desc_title, -					  U8 num_subparts, ... ); // number of subparts followed by a list of ESubparts +					  U8 num_color_swatches,  // number of 'color_swatches' +					  U8 num_texture_pickers, // number of 'texture_pickers' +					  U8 num_subparts, ... ); // number of subparts followed by a list of ETextureIndex and ESubparts  		const EWearableType mWearableType;  		const std::string   mTitle;  		const std::string	mDescTitle;  		subpart_vec_t		mSubparts; - +		texture_vec_t		mColorSwatchCtrls; +		texture_vec_t		mTextureCtrls;  	};  	struct Wearables : public LLDictionary<EWearableType, WearableEntry> @@ -158,6 +169,35 @@ public:  	} mSubparts;  	const SubpartEntry*  getSubpart(ESubpart subpart) const { return mSubparts.lookup(subpart); } + +	//-------------------------------------------------------------------- +	// Picker Control Entries +	//-------------------------------------------------------------------- +public: +	struct PickerControlEntry : public LLDictionaryEntry +	{ +		PickerControlEntry(ETextureIndex tex_index, +						   const std::string name, +						   const LLUUID default_image_id = LLUUID::null, +						   const bool allow_no_texture = false); +		ETextureIndex		mTextureIndex; +		const std::string	mControlName; +		const LLUUID		mDefaultImageId; +		const bool			mAllowNoTexture; +	}; + +	struct ColorSwatchCtrls : public LLDictionary<ETextureIndex, PickerControlEntry> +	{ +		ColorSwatchCtrls(); +	} mColorSwatchCtrls; + +	struct TextureCtrls : public LLDictionary<ETextureIndex, PickerControlEntry> +	{ +		TextureCtrls(); +	} mTextureCtrls; + +	const PickerControlEntry* getTexturePicker(ETextureIndex index) const { return mTextureCtrls.lookup(index); } +	const PickerControlEntry* getColorSwatch(ETextureIndex index) const { return mColorSwatchCtrls.lookup(index); }  };  LLEditWearableDictionary::LLEditWearableDictionary() @@ -172,26 +212,28 @@ LLEditWearableDictionary::~LLEditWearableDictionary()  LLEditWearableDictionary::Wearables::Wearables()  { -	addEntry(WT_SHAPE, new WearableEntry(WT_SHAPE,"edit_shape_title","shape_desc_text",9,	SUBPART_SHAPE_HEAD,	SUBPART_SHAPE_EYES,	SUBPART_SHAPE_EARS,	SUBPART_SHAPE_NOSE,	SUBPART_SHAPE_MOUTH, SUBPART_SHAPE_CHIN, SUBPART_SHAPE_TORSO, SUBPART_SHAPE_LEGS, SUBPART_SHAPE_WHOLE)); -	addEntry(WT_SKIN, new WearableEntry(WT_SKIN,"edit_skin_title","skin_desc_text",4, SUBPART_SKIN_COLOR, SUBPART_SKIN_FACEDETAIL, SUBPART_SKIN_MAKEUP, SUBPART_SKIN_BODYDETAIL)); -	addEntry(WT_HAIR, new WearableEntry(WT_HAIR,"edit_hair_title","hair_desc_text",4, SUBPART_HAIR_COLOR,	SUBPART_HAIR_STYLE,	SUBPART_HAIR_EYEBROWS, SUBPART_HAIR_FACIAL)); -	addEntry(WT_EYES, new WearableEntry(WT_EYES,"edit_eyes_title","eyes_desc_text",1, SUBPART_EYES)); -	addEntry(WT_SHIRT, new WearableEntry(WT_SHIRT,"edit_shirt_title","shirt_desc_text",1, SUBPART_SHIRT)); -	addEntry(WT_PANTS, new WearableEntry(WT_PANTS,"edit_pants_title","pants_desc_text",1, SUBPART_PANTS)); -	addEntry(WT_SHOES, new WearableEntry(WT_SHOES,"edit_shoes_title","shoes_desc_text",1, SUBPART_SHOES)); -	addEntry(WT_SOCKS, new WearableEntry(WT_SOCKS,"edit_socks_title","socks_desc_text",1, SUBPART_SOCKS)); -	addEntry(WT_JACKET, new WearableEntry(WT_JACKET,"edit_jacket_title","jacket_desc_text",1, SUBPART_JACKET)); -	addEntry(WT_GLOVES, new WearableEntry(WT_GLOVES,"edit_gloves_title","gloves_desc_text",1, SUBPART_GLOVES)); -	addEntry(WT_UNDERSHIRT, new WearableEntry(WT_UNDERSHIRT,"edit_undershirt_title","undershirt_desc_text",1, SUBPART_UNDERSHIRT)); -	addEntry(WT_UNDERPANTS, new WearableEntry(WT_UNDERPANTS,"edit_underpants_title","underpants_desc_text",1, SUBPART_UNDERPANTS)); -	addEntry(WT_SKIRT, new WearableEntry(WT_SKIRT,"edit_skirt_title","skirt_desc_text",1, SUBPART_SKIRT)); -	addEntry(WT_ALPHA, new WearableEntry(WT_ALPHA,"edit_alpha_title","alpha_desc_text",1, SUBPART_ALPHA)); -	addEntry(WT_TATTOO, new WearableEntry(WT_TATTOO,"edit_tattoo_title","tattoo_desc_text",1, SUBPART_TATTOO)); +	addEntry(WT_SHAPE, new WearableEntry(WT_SHAPE,"edit_shape_title","shape_desc_text",0,0,9,	SUBPART_SHAPE_HEAD,	SUBPART_SHAPE_EYES,	SUBPART_SHAPE_EARS,	SUBPART_SHAPE_NOSE,	SUBPART_SHAPE_MOUTH, SUBPART_SHAPE_CHIN, SUBPART_SHAPE_TORSO, SUBPART_SHAPE_LEGS, SUBPART_SHAPE_WHOLE)); +	addEntry(WT_SKIN, new WearableEntry(WT_SKIN,"edit_skin_title","skin_desc_text",0,3,4, TEX_HEAD_BODYPAINT, TEX_UPPER_BODYPAINT, TEX_LOWER_BODYPAINT, SUBPART_SKIN_COLOR, SUBPART_SKIN_FACEDETAIL, SUBPART_SKIN_MAKEUP, SUBPART_SKIN_BODYDETAIL)); +	addEntry(WT_HAIR, new WearableEntry(WT_HAIR,"edit_hair_title","hair_desc_text",0,1,4, TEX_HAIR, SUBPART_HAIR_COLOR,	SUBPART_HAIR_STYLE,	SUBPART_HAIR_EYEBROWS, SUBPART_HAIR_FACIAL)); +	addEntry(WT_EYES, new WearableEntry(WT_EYES,"edit_eyes_title","eyes_desc_text",0,1,1, TEX_EYES_IRIS, SUBPART_EYES)); +	addEntry(WT_SHIRT, new WearableEntry(WT_SHIRT,"edit_shirt_title","shirt_desc_text",1,1,1, TEX_UPPER_SHIRT, TEX_UPPER_SHIRT, SUBPART_SHIRT)); +	addEntry(WT_PANTS, new WearableEntry(WT_PANTS,"edit_pants_title","pants_desc_text",1,1,1, TEX_LOWER_PANTS, TEX_LOWER_PANTS, SUBPART_PANTS)); +	addEntry(WT_SHOES, new WearableEntry(WT_SHOES,"edit_shoes_title","shoes_desc_text",1,1,1, TEX_LOWER_SHOES, TEX_LOWER_SHOES, SUBPART_SHOES)); +	addEntry(WT_SOCKS, new WearableEntry(WT_SOCKS,"edit_socks_title","socks_desc_text",1,1,1, TEX_LOWER_SOCKS, TEX_LOWER_SOCKS, SUBPART_SOCKS)); +	addEntry(WT_JACKET, new WearableEntry(WT_JACKET,"edit_jacket_title","jacket_desc_text",1,2,1, TEX_UPPER_JACKET, TEX_UPPER_JACKET, TEX_LOWER_JACKET, SUBPART_JACKET)); +	addEntry(WT_GLOVES, new WearableEntry(WT_GLOVES,"edit_gloves_title","gloves_desc_text",1,1,1, TEX_UPPER_GLOVES, TEX_UPPER_GLOVES, SUBPART_GLOVES)); +	addEntry(WT_UNDERSHIRT, new WearableEntry(WT_UNDERSHIRT,"edit_undershirt_title","undershirt_desc_text",1,1,1, TEX_UPPER_UNDERSHIRT, TEX_UPPER_UNDERSHIRT, SUBPART_UNDERSHIRT)); +	addEntry(WT_UNDERPANTS, new WearableEntry(WT_UNDERPANTS,"edit_underpants_title","underpants_desc_text",1,1,1, TEX_LOWER_UNDERPANTS, TEX_LOWER_UNDERPANTS, SUBPART_UNDERPANTS)); +	addEntry(WT_SKIRT, new WearableEntry(WT_SKIRT,"edit_skirt_title","skirt_desc_text",1,1,1, TEX_SKIRT, TEX_SKIRT, SUBPART_SKIRT)); +	addEntry(WT_ALPHA, new WearableEntry(WT_ALPHA,"edit_alpha_title","alpha_desc_text",0,5,1, TEX_LOWER_ALPHA, TEX_UPPER_ALPHA, TEX_HEAD_ALPHA, TEX_EYES_ALPHA, TEX_HAIR_ALPHA, SUBPART_ALPHA)); +	addEntry(WT_TATTOO, new WearableEntry(WT_TATTOO,"edit_tattoo_title","tattoo_desc_text",0,3,1, TEX_LOWER_TATTOO, TEX_UPPER_TATTOO, TEX_HEAD_TATTOO, SUBPART_TATTOO));  }  LLEditWearableDictionary::WearableEntry::WearableEntry(EWearableType type,  					  const std::string &title,  					  const std::string &desc_title, +					  U8 num_color_swatches, +					  U8 num_texture_pickers,  					  U8 num_subparts, ... ) :  	LLDictionaryEntry(title),  	mWearableType(type), @@ -201,6 +243,18 @@ LLEditWearableDictionary::WearableEntry::WearableEntry(EWearableType type,  	va_list argp;  	va_start(argp, num_subparts); +	for (U8 i = 0; i < num_color_swatches; ++i) +	{ +		ETextureIndex index = (ETextureIndex)va_arg(argp,int); +		mColorSwatchCtrls.push_back(index); +	} + +	for (U8 i = 0; i < num_texture_pickers; ++i) +	{ +		ETextureIndex index = (ETextureIndex)va_arg(argp,int); +		mTextureCtrls.push_back(index); +	} +  	for (U8 i = 0; i < num_subparts; ++i)  	{  		ESubpart part = (ESubpart)va_arg(argp,int); @@ -265,6 +319,268 @@ LLEditWearableDictionary::SubpartEntry::SubpartEntry(ESubpart part,  {  } +LLEditWearableDictionary::ColorSwatchCtrls::ColorSwatchCtrls() +{ +	addEntry ( TEX_UPPER_SHIRT,  new PickerControlEntry (TEX_UPPER_SHIRT, "Color/Tint" )); +	addEntry ( TEX_LOWER_PANTS,  new PickerControlEntry (TEX_LOWER_PANTS, "Color/Tint" )); +	addEntry ( TEX_LOWER_SHOES,  new PickerControlEntry (TEX_LOWER_SHOES, "Color/Tint" )); +	addEntry ( TEX_LOWER_SOCKS,  new PickerControlEntry (TEX_LOWER_SOCKS, "Color/Tint" )); +	addEntry ( TEX_UPPER_JACKET, new PickerControlEntry (TEX_UPPER_JACKET, "Color/Tint" )); +	addEntry ( TEX_SKIRT,  new PickerControlEntry (TEX_SKIRT, "Color/Tint" )); +	addEntry ( TEX_UPPER_GLOVES, new PickerControlEntry (TEX_UPPER_GLOVES, "Color/Tint" )); +	addEntry ( TEX_UPPER_UNDERSHIRT, new PickerControlEntry (TEX_UPPER_UNDERSHIRT, "Color/Tint" )); +	addEntry ( TEX_LOWER_UNDERPANTS, new PickerControlEntry (TEX_LOWER_UNDERPANTS, "Color/Tint" )); +} + +LLEditWearableDictionary::TextureCtrls::TextureCtrls() +{ +	addEntry ( TEX_HEAD_BODYPAINT,  new PickerControlEntry (TEX_HEAD_BODYPAINT,  "Head Tattoos", LLUUID::null, TRUE )); +	addEntry ( TEX_UPPER_BODYPAINT, new PickerControlEntry (TEX_UPPER_BODYPAINT, "Upper Tattoos", LLUUID::null, TRUE )); +	addEntry ( TEX_LOWER_BODYPAINT, new PickerControlEntry (TEX_LOWER_BODYPAINT, "Lower Tattoos", LLUUID::null, TRUE )); +	addEntry ( TEX_HAIR, new PickerControlEntry (TEX_HAIR, "Texture", LLUUID( gSavedSettings.getString( "UIImgDefaultHairUUID" ) ), FALSE )); +	addEntry ( TEX_EYES_IRIS, new PickerControlEntry (TEX_EYES_IRIS, "Iris", LLUUID( gSavedSettings.getString( "UIImgDefaultEyesUUID" ) ), FALSE )); +	addEntry ( TEX_UPPER_SHIRT, new PickerControlEntry (TEX_UPPER_SHIRT, "Fabric", LLUUID( gSavedSettings.getString( "UIImgDefaultShirtUUID" ) ), FALSE )); +	addEntry ( TEX_LOWER_PANTS, new PickerControlEntry (TEX_LOWER_PANTS, "Fabric", LLUUID( gSavedSettings.getString( "UIImgDefaultPantsUUID" ) ), FALSE )); +	addEntry ( TEX_LOWER_SHOES, new PickerControlEntry (TEX_LOWER_SHOES, "Fabric", LLUUID( gSavedSettings.getString( "UIImgDefaultShoesUUID" ) ), FALSE )); +	addEntry ( TEX_LOWER_SOCKS, new PickerControlEntry (TEX_LOWER_SOCKS, "Fabric", LLUUID( gSavedSettings.getString( "UIImgDefaultSocksUUID" ) ), FALSE )); +	addEntry ( TEX_UPPER_JACKET, new PickerControlEntry (TEX_UPPER_JACKET, "Upper Fabric", LLUUID( gSavedSettings.getString( "UIImgDefaultJacketUUID" ) ), FALSE )); +	addEntry ( TEX_LOWER_JACKET, new PickerControlEntry (TEX_LOWER_JACKET, "Lower Fabric", LLUUID( gSavedSettings.getString( "UIImgDefaultJacketUUID" ) ), FALSE )); +	addEntry ( TEX_SKIRT, new PickerControlEntry (TEX_SKIRT, "Fabric", LLUUID( gSavedSettings.getString( "UIImgDefaultSkirtUUID" ) ), FALSE )); +	addEntry ( TEX_UPPER_GLOVES, new PickerControlEntry (TEX_UPPER_GLOVES, "Fabric", LLUUID( gSavedSettings.getString( "UIImgDefaultGlovesUUID" ) ), FALSE )); +	addEntry ( TEX_UPPER_UNDERSHIRT, new PickerControlEntry (TEX_UPPER_UNDERSHIRT, "Fabric", LLUUID( gSavedSettings.getString( "UIImgDefaultUnderwearUUID" ) ), FALSE )); +	addEntry ( TEX_LOWER_UNDERPANTS, new PickerControlEntry (TEX_LOWER_UNDERPANTS, "Fabric", LLUUID( gSavedSettings.getString( "UIImgDefaultUnderwearUUID" ) ), FALSE )); +	addEntry ( TEX_LOWER_ALPHA, new PickerControlEntry (TEX_LOWER_ALPHA, "Lower Alpha", LLUUID( gSavedSettings.getString( "UIImgDefaultAlphaUUID" ) ), TRUE )); +	addEntry ( TEX_UPPER_ALPHA, new PickerControlEntry (TEX_UPPER_ALPHA, "Upper Alpha", LLUUID( gSavedSettings.getString( "UIImgDefaultAlphaUUID" ) ), TRUE )); +	addEntry ( TEX_HEAD_ALPHA, new PickerControlEntry (TEX_HEAD_ALPHA, "Head Alpha", LLUUID( gSavedSettings.getString( "UIImgDefaultAlphaUUID" ) ), TRUE )); +	addEntry ( TEX_EYES_ALPHA, new PickerControlEntry (TEX_EYES_ALPHA, "Eye Alpha", LLUUID( gSavedSettings.getString( "UIImgDefaultAlphaUUID" ) ), TRUE )); +	addEntry ( TEX_HAIR_ALPHA, new PickerControlEntry (TEX_HAIR_ALPHA, "Hair Alpha", LLUUID( gSavedSettings.getString( "UIImgDefaultAlphaUUID" ) ), TRUE )); +	addEntry ( TEX_LOWER_TATTOO, new PickerControlEntry (TEX_LOWER_TATTOO, "Lower Tattoo", LLUUID::null, TRUE )); +	addEntry ( TEX_UPPER_TATTOO, new PickerControlEntry (TEX_UPPER_TATTOO, "Upper Tattoo", LLUUID::null, TRUE )); +	addEntry ( TEX_HEAD_TATTOO, new PickerControlEntry (TEX_HEAD_TATTOO, "Head Tattoo", LLUUID::null, TRUE )); +} + +LLEditWearableDictionary::PickerControlEntry::PickerControlEntry(ETextureIndex tex_index, +					 const std::string name, +					 const LLUUID default_image_id, +					 const bool allow_no_texture) : +	LLDictionaryEntry(name), +	mTextureIndex(tex_index), +	mControlName(name), +	mDefaultImageId(default_image_id), +	mAllowNoTexture(allow_no_texture) +{ +} + +// Helper functions. +static const texture_vec_t null_texture_vec; + +// Specializations of this template function return a vector of texture indexes of particular control type +// (i.e. LLColorSwatchCtrl or LLTextureCtrl) which are contained in given WearableEntry. +template <typename T> +const texture_vec_t& +get_pickers_indexes(const LLEditWearableDictionary::WearableEntry *wearable_entry) { return null_texture_vec; } + +// Specializations of this template function return picker control entry for particular control type. +template <typename T> +const LLEditWearableDictionary::PickerControlEntry* +get_picker_entry (const ETextureIndex index) { return NULL; } + +typedef boost::function<void(LLPanel* panel, const LLEditWearableDictionary::PickerControlEntry*)> function_t; + +typedef struct PickerControlEntryNamePredicate +{ +	PickerControlEntryNamePredicate(const std::string name) : mName (name) {}; +	bool operator()(const LLEditWearableDictionary::PickerControlEntry* entry) const +	{ +		return (entry && entry->mName == mName); +	} +private: +	const std::string mName; +} PickerControlEntryNamePredicate; + +// A full specialization of get_pickers_indexes for LLColorSwatchCtrl +template <> +const texture_vec_t& +get_pickers_indexes<LLColorSwatchCtrl> (const LLEditWearableDictionary::WearableEntry *wearable_entry) +{ +	if (!wearable_entry) +	{ +		llwarns << "could not get LLColorSwatchCtrl indexes for null wearable entry." << llendl; +		return null_texture_vec; +	} +	return wearable_entry->mColorSwatchCtrls; +} + +// A full specialization of get_pickers_indexes for LLTextureCtrl +template <> +const texture_vec_t& +get_pickers_indexes<LLTextureCtrl> (const LLEditWearableDictionary::WearableEntry *wearable_entry) +{ +	if (!wearable_entry) +	{ +		llwarns << "could not get LLTextureCtrl indexes for null wearable entry." << llendl; +		return null_texture_vec; +	} +	return wearable_entry->mTextureCtrls; +} + +// A full specialization of get_picker_entry for LLColorSwatchCtrl +template <> +const LLEditWearableDictionary::PickerControlEntry* +get_picker_entry<LLColorSwatchCtrl> (const ETextureIndex index) +{ +	return LLEditWearableDictionary::getInstance()->getColorSwatch(index); +} + +// A full specialization of get_picker_entry for LLTextureCtrl +template <> +const LLEditWearableDictionary::PickerControlEntry* +get_picker_entry<LLTextureCtrl> (const ETextureIndex index) +{ +	return LLEditWearableDictionary::getInstance()->getTexturePicker(index); +} + +template <typename CtrlType, class Predicate> +const LLEditWearableDictionary::PickerControlEntry* +find_picker_ctrl_entry_if(EWearableType type, const Predicate pred) +{ +	const LLEditWearableDictionary::WearableEntry *wearable_entry +		= LLEditWearableDictionary::getInstance()->getWearable(type); +	if (!wearable_entry) +	{ +		llwarns << "could not get wearable dictionary entry for wearable of type: " << type << llendl; +		return NULL; +	} +	const texture_vec_t& indexes = get_pickers_indexes<CtrlType>(wearable_entry); +	for (texture_vec_t::const_iterator +			 iter = indexes.begin(), +			 iter_end = indexes.end(); +		 iter != iter_end; ++iter) +	{ +		const ETextureIndex te = *iter; +		const LLEditWearableDictionary::PickerControlEntry*	entry +			= get_picker_entry<CtrlType>(te); +		if (!entry) +		{ +			llwarns << "could not get picker dictionary entry (" << te << ") for wearable of type: " << type << llendl; +			continue; +		} +		if (pred(entry)) +		{ +			return entry; +		} +	} +	return NULL; +} + +template <typename CtrlType> +void +for_each_picker_ctrl_entry(LLPanel* panel, EWearableType type, function_t fun) +{ +	if (!panel) +	{ +		llwarns << "the panel wasn't passed for wearable of type: " << type << llendl; +		return; +	} +	const LLEditWearableDictionary::WearableEntry *wearable_entry +		= LLEditWearableDictionary::getInstance()->getWearable(type); +	if (!wearable_entry) +	{ +		llwarns << "could not get wearable dictionary entry for wearable of type: " << type << llendl; +		return; +	} +	const texture_vec_t& indexes = get_pickers_indexes<CtrlType>(wearable_entry); +	for (texture_vec_t::const_iterator +			 iter = indexes.begin(), +			 iter_end = indexes.end(); +		 iter != iter_end; ++iter) +	{ +		const ETextureIndex te = *iter; +		const LLEditWearableDictionary::PickerControlEntry*	entry +			= get_picker_entry<CtrlType>(te); +		if (!entry) +		{ +			llwarns << "could not get picker dictionary entry (" << te << ") for wearable of type: " << type << llendl; +			continue; +		} +		fun (panel, entry); +	} +} + +// The helper functions for pickers management +static void init_color_swatch_ctrl(LLPanelEditWearable* self, LLPanel* panel, const LLEditWearableDictionary::PickerControlEntry* entry) +{ +	LLColorSwatchCtrl* color_swatch_ctrl = panel->getChild<LLColorSwatchCtrl>(entry->mControlName); +	if (color_swatch_ctrl) +	{ +		color_swatch_ctrl->setOriginal(self->getWearable()->getClothesColor(entry->mTextureIndex)); +	} +} + +static void init_texture_ctrl(LLPanelEditWearable* self, LLPanel* panel, const LLEditWearableDictionary::PickerControlEntry* entry) +{ +	LLTextureCtrl* texture_ctrl = panel->getChild<LLTextureCtrl>(entry->mControlName); +	if (texture_ctrl) +	{ +		texture_ctrl->setDefaultImageAssetID(entry->mDefaultImageId); +		texture_ctrl->setAllowNoTexture(entry->mAllowNoTexture); +		// Don't allow (no copy) or (notransfer) textures to be selected. +		texture_ctrl->setImmediateFilterPermMask(PERM_NONE); +		texture_ctrl->setNonImmediateFilterPermMask(PERM_NONE); +	} +} + +static void update_color_swatch_ctrl(LLPanelEditWearable* self, LLPanel* panel, const LLEditWearableDictionary::PickerControlEntry* entry) +{ +	LLColorSwatchCtrl* color_swatch_ctrl = panel->getChild<LLColorSwatchCtrl>(entry->mControlName); +	if (color_swatch_ctrl) +	{ +		color_swatch_ctrl->set(self->getWearable()->getClothesColor(entry->mTextureIndex)); +	} +} + +static void update_texture_ctrl(LLPanelEditWearable* self, LLPanel* panel, const LLEditWearableDictionary::PickerControlEntry* entry) +{ +	LLTextureCtrl* texture_ctrl = panel->getChild<LLTextureCtrl>(entry->mControlName); +	if (texture_ctrl) +	{ +		LLUUID new_id; +		LLLocalTextureObject *lto = self->getWearable()->getLocalTextureObject(entry->mTextureIndex); +		if( lto && (lto->getID() != IMG_DEFAULT_AVATAR) ) +		{ +			new_id = lto->getID(); +		} +		else +		{ +			new_id = LLUUID::null; +		} +		LLUUID old_id = texture_ctrl->getImageAssetID(); +		if (old_id != new_id) +		{ +			// texture has changed, close the floater to avoid DEV-22461 +			texture_ctrl->closeDependentFloater(); +		} +		texture_ctrl->setImageAssetID(new_id); +	} +} + +static void set_enabled_color_swatch_ctrl(bool enabled, LLPanel* panel, const LLEditWearableDictionary::PickerControlEntry* entry) +{ +	LLColorSwatchCtrl* color_swatch_ctrl = panel->getChild<LLColorSwatchCtrl>(entry->mControlName); +	if (color_swatch_ctrl) +	{ +		color_swatch_ctrl->setEnabled(enabled); +	} +} + +static void set_enabled_texture_ctrl(bool enabled, LLPanel* panel, const LLEditWearableDictionary::PickerControlEntry* entry) +{ +	LLTextureCtrl* texture_ctrl = panel->getChild<LLTextureCtrl>(entry->mControlName); +	if (texture_ctrl) +	{ +		texture_ctrl->setEnabled(enabled); +	} +}  // LLPanelEditWearable @@ -273,6 +589,8 @@ LLPanelEditWearable::LLPanelEditWearable()  	, mWearablePtr(NULL)  	, mWearableItem(NULL)  { +	mCommitCallbackRegistrar.add("ColorSwatch.Commit", boost::bind(&LLPanelEditWearable::onColorSwatchCommit, this, _1)); +	mCommitCallbackRegistrar.add("TexturePicker.Commit", boost::bind(&LLPanelEditWearable::onTexturePickerCommit, this, _1));  }  //virtual @@ -341,6 +659,10 @@ BOOL LLPanelEditWearable::isDirty() const  void LLPanelEditWearable::draw()  {  	updateVerbs(); +	if (getWearable()) +	{ +		updatePanelPickerControls(getWearable()->getType()); +	}  	LLPanel::draw();  } @@ -361,6 +683,102 @@ void LLPanelEditWearable::onRevertButtonClicked(void* userdata)  	panel->revertChanges();  } +void LLPanelEditWearable::onTexturePickerCommit(const LLUICtrl* ctrl) +{ +	const LLTextureCtrl* texture_ctrl = dynamic_cast<const LLTextureCtrl*>(ctrl); +	if (!texture_ctrl) +	{ +		llwarns << "got commit signal from not LLTextureCtrl." << llendl; +		return; +	} + +	if (getWearable()) +	{ +		EWearableType type = getWearable()->getType(); +		const PickerControlEntryNamePredicate name_pred(texture_ctrl->getName()); +		const LLEditWearableDictionary::PickerControlEntry* entry +			= find_picker_ctrl_entry_if<LLTextureCtrl, PickerControlEntryNamePredicate>(type, name_pred); +		if (entry) +		{ +			// Set the new version +			LLViewerFetchedTexture* image = LLViewerTextureManager::getFetchedTexture(texture_ctrl->getImageAssetID()); +			if( image->getID().isNull() ) +			{ +				image = LLViewerTextureManager::getFetchedTexture(IMG_DEFAULT_AVATAR); +			} +			if (getWearable()) +			{ +				U32 index = gAgentWearables.getWearableIndex(getWearable()); +				gAgentAvatarp->setLocalTexture(entry->mTextureIndex, image, FALSE, index); +				LLVisualParamHint::requestHintUpdates(); +				gAgentAvatarp->wearableUpdated(type, FALSE); +			} +		} +		else +		{ +			llwarns << "could not get texture picker dictionary entry for wearable of type: " << type << llendl; +		} +	} +} + +void LLPanelEditWearable::onColorSwatchCommit(const LLUICtrl* ctrl) +{ +	if (getWearable()) +	{ +		EWearableType type = getWearable()->getType(); +		const PickerControlEntryNamePredicate name_pred(ctrl->getName()); +		const LLEditWearableDictionary::PickerControlEntry* entry +			= find_picker_ctrl_entry_if<LLColorSwatchCtrl, PickerControlEntryNamePredicate>(type, name_pred); +		if (entry) +		{ +			const LLColor4& old_color = getWearable()->getClothesColor(entry->mTextureIndex); +			const LLColor4& new_color = LLColor4(ctrl->getValue()); +			if( old_color != new_color ) +			{ +				getWearable()->setClothesColor(entry->mTextureIndex, new_color, TRUE); +				LLVisualParamHint::requestHintUpdates(); +				gAgentAvatarp->wearableUpdated(getWearable()->getType(), FALSE); +			} +		} +		else +		{ +			llwarns << "could not get color swatch dictionary entry for wearable of type: " << type << llendl; +		} +	} +} + +void LLPanelEditWearable::updatePanelPickerControls(EWearableType type) +{ +	LLPanel* panel = getPanel(type); +	if (!panel) +		return; + +	bool is_modifiable = false; +	bool is_complete   = false; +	bool is_copyable   = false; + +	if(mWearableItem) +	{ +		const LLPermissions& perm = mWearableItem->getPermissions(); +		is_modifiable = perm.allowModifyBy(gAgent.getID(), gAgent.getGroupID()); +		is_copyable = perm.allowCopyBy(gAgent.getID(), gAgent.getGroupID()); +		is_complete = mWearableItem->isFinished(); +	} + +	if (is_modifiable && is_complete) +	{ +		// Update picker controls +		for_each_picker_ctrl_entry <LLColorSwatchCtrl> (panel, type, boost::bind(update_color_swatch_ctrl, this, _1, _2)); +		for_each_picker_ctrl_entry <LLTextureCtrl>     (panel, type, boost::bind(update_texture_ctrl, this, _1, _2)); +	} + +	if (!is_modifiable || !is_complete || !is_copyable) +	{ +		// Disable controls +		for_each_picker_ctrl_entry <LLColorSwatchCtrl> (panel, type, boost::bind(set_enabled_color_swatch_ctrl, false, _1, _2)); +		for_each_picker_ctrl_entry <LLTextureCtrl>     (panel, type, boost::bind(set_enabled_texture_ctrl, false, _1, _2)); +	} +}  void LLPanelEditWearable::saveChanges()  { @@ -428,6 +846,9 @@ void LLPanelEditWearable::showWearable(LLWearable* wearable, BOOL show)  		mDescTitle->setText(description_title);  	} +	// Update picker controls state +	for_each_picker_ctrl_entry <LLColorSwatchCtrl> (targetPanel, type, boost::bind(set_enabled_color_swatch_ctrl, show, _1, _2)); +	for_each_picker_ctrl_entry <LLTextureCtrl>     (targetPanel, type, boost::bind(set_enabled_texture_ctrl, show, _1, _2));  }  void LLPanelEditWearable::initializePanel() @@ -493,6 +914,11 @@ void LLPanelEditWearable::initializePanel()  		updateScrollingPanelUI();  	} + +	// initialize texture and color picker controls +	for_each_picker_ctrl_entry <LLColorSwatchCtrl> (getPanel(type), type, boost::bind(init_color_swatch_ctrl, this, _1, _2)); +	for_each_picker_ctrl_entry <LLTextureCtrl>     (getPanel(type), type, boost::bind(init_texture_ctrl, this, _1, _2)); +  	updateVerbs();  } diff --git a/indra/newview/llpaneleditwearable.h b/indra/newview/llpaneleditwearable.h index 8b63685177..76b0ddb3cc 100644 --- a/indra/newview/llpaneleditwearable.h +++ b/indra/newview/llpaneleditwearable.h @@ -77,6 +77,10 @@ private:  	// update bottom bar buttons ("Save", "Revert", etc)  	void				updateVerbs(); +	void				onColorSwatchCommit(const LLUICtrl*); +	void				onTexturePickerCommit(const LLUICtrl*); +	void				updatePanelPickerControls(EWearableType type); +  	// the pointer to the wearable we're editing. NULL means we're not editing a wearable.  	LLWearable *mWearablePtr;  	LLViewerInventoryItem* mWearableItem; @@ -112,7 +116,6 @@ private:  	LLPanel *mPanelSkirt;  	LLPanel *mPanelAlpha;  	LLPanel *mPanelTattoo; -  };  #endif diff --git a/indra/newview/skins/default/xui/en/panel_bodyparts_list_button_bar.xml b/indra/newview/skins/default/xui/en/panel_bodyparts_list_button_bar.xml new file mode 100644 index 0000000000..9d19b89a61 --- /dev/null +++ b/indra/newview/skins/default/xui/en/panel_bodyparts_list_button_bar.xml @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> + +<panel + follows="left|right|top" + height="35" + layout="topleft" + left="0" + name="clothing_list_button_bar_panel" + top="0" + visible="true" + width="300"> +    <button +     follows="top|left" +     height="25" +     image_hover_unselected="Toolbar_Middle_Over" +     image_selected="Toolbar_Middle_Selected" +     image_unselected="Toolbar_Middle_Off" +     label="Switch" +     layout="topleft" +     left="5" +     name="switch_btn" +     top="5" +     width="45" /> +    <button +     follows="top|right" +     height="25" +     image_hover_unselected="Toolbar_Middle_Over" +     image_selected="Toolbar_Middle_Selected" +     image_unselected="Toolbar_Middle_Off" +     label="Shop >"  +     layout="topleft" +     right="-5" +     name="bodyparts_shop_btn" +     top="5" +     width="61" /> +</panel> diff --git a/indra/newview/skins/default/xui/en/panel_clothing_list_button_bar.xml b/indra/newview/skins/default/xui/en/panel_clothing_list_button_bar.xml new file mode 100644 index 0000000000..2359719c2a --- /dev/null +++ b/indra/newview/skins/default/xui/en/panel_clothing_list_button_bar.xml @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> + +<panel + follows="left|right|top" + height="35" + layout="topleft" + left="0" + name="clothing_list_button_bar_panel" + top="0" + visible="true" + width="500"> +    <button +     follows="top|left" +     height="25" +     image_hover_unselected="Toolbar_Middle_Over" +     image_selected="Toolbar_Middle_Selected" +     image_unselected="Toolbar_Middle_Off" +     is_toggle="true" +     label="Add +" +     layout="topleft" +     left="5" +     name="add_btn" +     top="5" +     width="45" /> +    <button +     follows="top|right" +     height="25" +     image_hover_unselected="Toolbar_Middle_Over" +     image_selected="Toolbar_Middle_Selected" +     image_unselected="Toolbar_Middle_Off" +     label="Shop >"  +     layout="topleft" +     right="-5" +     name="clothing_shop_btn" +     top="5" +     width="61" /> +</panel> diff --git a/indra/newview/skins/default/xui/en/panel_cof_wearables.xml b/indra/newview/skins/default/xui/en/panel_cof_wearables.xml index 01c7ae61d2..d8a8dbbea4 100644 --- a/indra/newview/skins/default/xui/en/panel_cof_wearables.xml +++ b/indra/newview/skins/default/xui/en/panel_cof_wearables.xml @@ -14,6 +14,7 @@       height="373"       layout="topleft"       left="3" +     single_expansion="true"       top="0"       name="cof_wearables_accordion"       background_visible="true" diff --git a/indra/newview/skins/default/xui/en/panel_edit_alpha.xml b/indra/newview/skins/default/xui/en/panel_edit_alpha.xml index 1d0c0a02b0..cfcdc25f81 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_alpha.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_alpha.xml @@ -32,7 +32,10 @@          name="Lower Alpha"          tool_tip="Click to choose a picture"          top="10" -        width="94" /> +        width="94" > +         <texture_picker.commit_callback +             function="TexturePicker.Commit" /> +       </texture_picker>         <check_box          control_name="LowerAlphaTextureInvisible"          follows="left" @@ -53,7 +56,10 @@          name="Upper Alpha"          tool_tip="Click to choose a picture"          top="10" -        width="94" /> +        width="94"> +         <texture_picker.commit_callback +             function="TexturePicker.Commit" /> +       </texture_picker>         <check_box          control_name="UpperAlphaTextureInvisible"          follows="left" @@ -74,7 +80,10 @@          name="Head Alpha"          tool_tip="Click to choose a picture"          top="120" -        width="94" /> +        width="94" > +         <texture_picker.commit_callback +             function="TexturePicker.Commit" /> +       </texture_picker>         <check_box          control_name="HeadAlphaTextureInvisible"          follows="left" @@ -95,7 +104,10 @@          name="Eye Alpha"          tool_tip="Click to choose a picture"          top="120" -        width="94" /> +        width="94" > +         <texture_picker.commit_callback +             function="TexturePicker.Commit" /> +       </texture_picker>         <check_box          control_name="Eye AlphaTextureInvisible"          follows="left" @@ -116,7 +128,10 @@          name="Hair Alpha"          tool_tip="Click to choose a picture"          top="230" -        width="94" /> +        width="94" > +         <texture_picker.commit_callback +             function="TexturePicker.Commit" /> +       </texture_picker>         <check_box          control_name="HairAlphaTextureInvisible"          follows="left" diff --git a/indra/newview/skins/default/xui/en/panel_edit_eyes.xml b/indra/newview/skins/default/xui/en/panel_edit_eyes.xml index f11ef43c76..4149a0b06f 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_eyes.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_eyes.xml @@ -32,8 +32,11 @@               name="Iris"               tool_tip="Click to choose a picture"               top="10" -             width="64" /> -	 </panel> +             width="64" > +         <texture_picker.commit_callback +             function="TexturePicker.Commit" /> +       </texture_picker> +     </panel>       <panel           border="false"           bg_alpha_color="DkGray2" diff --git a/indra/newview/skins/default/xui/en/panel_edit_gloves.xml b/indra/newview/skins/default/xui/en/panel_edit_gloves.xml index 7d8eed5085..94fd2f9080 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_gloves.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_gloves.xml @@ -32,7 +32,10 @@          name="Fabric"          tool_tip="Click to choose a picture"          top="10" -        width="64" /> +        width="64" > +         <texture_picker.commit_callback +             function="TexturePicker.Commit" /> +       </texture_picker>         <color_swatch          can_apply_immediately="true"          follows="left|top" @@ -43,9 +46,12 @@          name="Color/Tint"          tool_tip="Click to open color picker"          top="10" -        width="64" /> -	 </panel> -	 <panel +        width="64" > +         <color_swatch.commit_callback +             function="ColorSwatch.Commit" /> +       </color_swatch> +     </panel> +     <panel           border="false"           bg_alpha_color="DkGray2"           bg_opaque_color="DkGray2" diff --git a/indra/newview/skins/default/xui/en/panel_edit_hair.xml b/indra/newview/skins/default/xui/en/panel_edit_hair.xml index cd81aa2c4f..9b60e83387 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_hair.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_hair.xml @@ -32,8 +32,11 @@               name="Texture"               tool_tip="Click to choose a picture"               top="10" -             width="64" /> -	 </panel> +             width="64" > +              <texture_picker.commit_callback +                  function="TexturePicker.Commit" /> +            </texture_picker> +     </panel>     <panel           border="false"           bg_alpha_color="DkGray2" diff --git a/indra/newview/skins/default/xui/en/panel_edit_jacket.xml b/indra/newview/skins/default/xui/en/panel_edit_jacket.xml index ba03865937..248ae9fe04 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_jacket.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_jacket.xml @@ -32,7 +32,10 @@          name="Upper Fabric"          tool_tip="Click to choose a picture"          top="10" -        width="74" /> +        width="74" > +         <texture_picker.commit_callback +             function="TexturePicker.Commit" /> +       </texture_picker>         <texture_picker          can_apply_immediately="true"          default_image_name="Default" @@ -44,7 +47,10 @@          name="Lower Fabric"          tool_tip="Click to choose a picture"          top="10" -        width="74" /> +        width="74" > +         <texture_picker.commit_callback +             function="TexturePicker.Commit" /> +       </texture_picker>         <color_swatch          can_apply_immediately="true"          follows="left|top" @@ -55,7 +61,10 @@          name="Color/Tint"          tool_tip="Click to open color picker"          top="10" -        width="74" /> +        width="74" > +         <color_swatch.commit_callback +             function="ColorSwatch.Commit" /> +       </color_swatch>  	 </panel>  	 <panel           border="false" diff --git a/indra/newview/skins/default/xui/en/panel_edit_pants.xml b/indra/newview/skins/default/xui/en/panel_edit_pants.xml index 5b02d1f968..3ed1df2399 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_pants.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_pants.xml @@ -32,7 +32,10 @@          name="Fabric"          tool_tip="Click to choose a picture"          top="10" -        width="64" /> +        width="64" > +         <texture_picker.commit_callback +             function="TexturePicker.Commit" /> +       </texture_picker>         <color_swatch          can_apply_immediately="true"          follows="left|top" @@ -43,7 +46,10 @@          name="Color/Tint"          tool_tip="Click to open color picker"          top="10" -        width="64" /> +        width="64" > +         <color_swatch.commit_callback +             function="ColorSwatch.Commit" /> +       </color_swatch>  	 </panel>       <panel           border="false" diff --git a/indra/newview/skins/default/xui/en/panel_edit_shirt.xml b/indra/newview/skins/default/xui/en/panel_edit_shirt.xml index 7da8de4c0b..e088aa05ac 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_shirt.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_shirt.xml @@ -32,7 +32,10 @@          name="Fabric"          tool_tip="Click to choose a picture"          top="10" -        width="64" /> +        width="64" > +         <texture_picker.commit_callback +             function="TexturePicker.Commit" /> +       </texture_picker>         <color_swatch          can_apply_immediately="true"          follows="left|top" @@ -43,7 +46,10 @@          name="Color/Tint"          tool_tip="Click to open color picker"          top="10" -        width="64" /> +        width="64" > +         <color_swatch.commit_callback +             function="ColorSwatch.Commit" /> +       </color_swatch>  	 </panel>       <panel           border="false" diff --git a/indra/newview/skins/default/xui/en/panel_edit_shoes.xml b/indra/newview/skins/default/xui/en/panel_edit_shoes.xml index 84fe26f7f6..e079047a86 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_shoes.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_shoes.xml @@ -32,7 +32,10 @@          name="Fabric"          tool_tip="Click to choose a picture"          top="10" -        width="64" /> +        width="64" > +         <texture_picker.commit_callback +             function="TexturePicker.Commit" /> +       </texture_picker>         <color_swatch          can_apply_immediately="true"          follows="left|top" @@ -43,7 +46,10 @@          name="Color/Tint"          tool_tip="Click to open color picker"          top="10" -        width="64" /> +        width="64" > +         <color_swatch.commit_callback +             function="ColorSwatch.Commit" /> +       </color_swatch>  	 </panel>       <panel           border="false" diff --git a/indra/newview/skins/default/xui/en/panel_edit_skin.xml b/indra/newview/skins/default/xui/en/panel_edit_skin.xml index b5c8c95473..9158685c40 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_skin.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_skin.xml @@ -33,7 +33,10 @@          name="Head Tattoos"          tool_tip="Click to choose a picture"          top="10" -        width="74" /> +        width="74" > +         <texture_picker.commit_callback +             function="TexturePicker.Commit" /> +       </texture_picker>         <texture_picker          allow_no_texture="true"          can_apply_immediately="true" @@ -46,7 +49,10 @@          name="Upper Tattoos"          tool_tip="Click to choose a picture"          top="10" -        width="74" /> +        width="74" > +         <texture_picker.commit_callback +             function="TexturePicker.Commit" /> +       </texture_picker>         <texture_picker          allow_no_texture="true"          can_apply_immediately="true" @@ -59,8 +65,11 @@          name="Lower Tattoos"          tool_tip="Click to choose a picture"          top="10" -        width="74" /> -	 </panel> +        width="74" > +         <texture_picker.commit_callback +             function="TexturePicker.Commit" /> +       </texture_picker> +     </panel>       <panel           border="false"           bg_alpha_color="DkGray2" diff --git a/indra/newview/skins/default/xui/en/panel_edit_skirt.xml b/indra/newview/skins/default/xui/en/panel_edit_skirt.xml index 16f6950bd5..87f3270b31 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_skirt.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_skirt.xml @@ -32,7 +32,10 @@          name="Fabric"          tool_tip="Click to choose a picture"          top="10" -        width="64" /> +        width="64" > +         <texture_picker.commit_callback +             function="TexturePicker.Commit" /> +       </texture_picker>         <color_swatch          can_apply_immediately="true"          follows="left|top" @@ -43,7 +46,10 @@          name="Color/Tint"          tool_tip="Click to open color picker"          top="10" -        width="64" /> +        width="64" > +         <color_swatch.commit_callback +             function="ColorSwatch.Commit" /> +       </color_swatch>  	 </panel>  	 <panel           border="false" diff --git a/indra/newview/skins/default/xui/en/panel_edit_socks.xml b/indra/newview/skins/default/xui/en/panel_edit_socks.xml index e4f916703b..5bd99969a2 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_socks.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_socks.xml @@ -32,7 +32,10 @@          name="Fabric"          tool_tip="Click to choose a picture"          top="10" -        width="64" /> +        width="64" > +         <texture_picker.commit_callback +             function="TexturePicker.Commit" /> +       </texture_picker>         <color_swatch          can_apply_immediately="true"          follows="left|top" @@ -43,7 +46,10 @@          name="Color/Tint"          tool_tip="Click to open color picker"          top="10" -        width="64" /> +        width="64" > +         <color_swatch.commit_callback +             function="ColorSwatch.Commit" /> +       </color_swatch>  	 </panel>  	 <panel           border="false" diff --git a/indra/newview/skins/default/xui/en/panel_edit_underpants.xml b/indra/newview/skins/default/xui/en/panel_edit_underpants.xml index d43497c943..bbe5230341 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_underpants.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_underpants.xml @@ -32,7 +32,10 @@               name="Fabric"               tool_tip="Click to choose a picture"               top="10" -             width="64" /> +             width="64" > +              <texture_picker.commit_callback +                  function="TexturePicker.Commit" /> +            </texture_picker>              <color_swatch               can_apply_immediately="true"               follows="left|top" @@ -43,7 +46,10 @@               name="Color/Tint"               tool_tip="Click to open color picker"               top="10" -             width="64" /> +             width="64" > +              <color_swatch.commit_callback +                  function="ColorSwatch.Commit" /> +            </color_swatch>  	 </panel>  	 <panel           border="false" diff --git a/indra/newview/skins/default/xui/en/panel_edit_undershirt.xml b/indra/newview/skins/default/xui/en/panel_edit_undershirt.xml index 45c6ef4526..a79c1b9eaa 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_undershirt.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_undershirt.xml @@ -32,7 +32,10 @@          name="Fabric"          tool_tip="Click to choose a picture"          top="10" -        width="64" /> +        width="64" > +         <texture_picker.commit_callback +             function="TexturePicker.Commit" /> +       </texture_picker>         <color_swatch          can_apply_immediately="true"          follows="left|top" @@ -43,7 +46,10 @@          name="Color/Tint"          tool_tip="Click to open Color Picker"          top="10" -        width="64" /> +        width="64" > +         <color_swatch.commit_callback +             function="ColorSwatch.Commit" /> +       </color_swatch>         </panel>  	 <panel           border="false" diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index b0e43e72ed..3cba76cbfa 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -2951,8 +2951,9 @@ If you continue to receive this message, contact the [SUPPORT_SITE].  	<!-- voice calls -->  	<string name="answered_call">Your call has been answered</string> -	<string name="started_call">Started a voice call</string> -	<string name="joined_call">Joined the voice call</string> +	<string name="you_started_call">You started a voice call</string> +	<string name="you_joined_call">You joined the voice call</string> +	<string name="name_started_call">[NAME] started a voice call</string>    <string name="ringing-im">      Joining voice call... | 
