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); }
void LLOutfitsList::wearSelectedItems() { uuid_vec_t selected_uuids; getSelectedItemsUUIDs(selected_uuids); if(selected_uuids.empty()) { return; } wear_multiple(selected_uuids, false); }
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; }
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; }
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); }