Пример #1
0
void LLOutfitsList::onWearableItemsListRightClick(LLUICtrl* ctrl, S32 x, S32 y)
{
	LLWearableItemsList* list = dynamic_cast<LLWearableItemsList*>(ctrl);
	if (!list) return;

	uuid_vec_t selected_uuids;

	getSelectedItemsUUIDs(selected_uuids);

	LLWearableItemsList::ContextMenu::instance().show(list, selected_uuids, x, y);
}
Пример #2
0
void LLOutfitsList::wearSelectedItems()
{
	uuid_vec_t selected_uuids;
	getSelectedItemsUUIDs(selected_uuids);

	if(selected_uuids.empty())
	{
		return;
	}

	wear_multiple(selected_uuids, false);
}
Пример #3
0
bool LLOutfitsList::canTakeOffSelected()
{
	uuid_vec_t selected_uuids;
	getSelectedItemsUUIDs(selected_uuids);

	LLFindWearablesEx is_worn(/*is_worn=*/ true, /*include_body_parts=*/ false);

	for (uuid_vec_t::const_iterator it=selected_uuids.begin(); it != selected_uuids.end(); ++it)
	{
		LLViewerInventoryItem* item = gInventory.getItem(*it);
		if (!item) continue;

		if (is_worn(NULL, item)) return true;
	}
	return false;
}
Пример #4
0
bool LLOutfitsList::canWearSelected()
{
	uuid_vec_t selected_items;
	getSelectedItemsUUIDs(selected_items);

	for (uuid_vec_t::const_iterator it = selected_items.begin(); it != selected_items.end(); ++it)
	{
		const LLUUID& id = *it;

		// Check whether the item is worn.
		if (!get_can_item_be_worn(id))
		{
			return false;
		}
	}

	// All selected items can be worn.
	return true;
}
Пример #5
0
void LLOutfitsList::wearSelectedItems()
{
	uuid_vec_t selected_uuids;
	getSelectedItemsUUIDs(selected_uuids);

	if(selected_uuids.empty())
	{
		return;
	}

	uuid_vec_t::const_iterator it;
	// Wear items from all selected lists(if possible- add, else replace)
	for (it = selected_uuids.begin(); it != selected_uuids.end()-1; ++it)
	{
		LLAppearanceMgr::getInstance()->wearItemOnAvatar(*it, false, false);
	}
	// call update only when wearing last item
	LLAppearanceMgr::getInstance()->wearItemOnAvatar(*it, true, false);
}