本文整理汇总了C++中LLViewerInventoryItem::isWearableType方法的典型用法代码示例。如果您正苦于以下问题:C++ LLViewerInventoryItem::isWearableType方法的具体用法?C++ LLViewerInventoryItem::isWearableType怎么用?C++ LLViewerInventoryItem::isWearableType使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLViewerInventoryItem
的用法示例。
在下文中一共展示了LLViewerInventoryItem::isWearableType方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
// static
void LLWearableItemsList::ContextMenu::createNewWearable(const LLUUID& item_id)
{
LLViewerInventoryItem* item = gInventory.getLinkedItem(item_id);
if (!item || !item->isWearableType()) return;
LLAgentWearables::createWearable(item->getWearableType(), true);
}
示例2: getIncludedItems
void LLMakeOutfitDialog::getIncludedItems(LLInventoryModel::item_array_t& item_list)
{
LLInventoryModel::cat_array_t *cats;
LLInventoryModel::item_array_t *items;
gInventory.getDirectDescendentsOf(LLAppearanceMgr::instance().getCOF(), cats, items);
for (LLInventoryModel::item_array_t::const_iterator iter = items->begin(); iter != items->end(); ++iter)
{
LLViewerInventoryItem* item = (*iter);
if (!item)
continue;
if (item->isWearableType())
{
LLWearableType::EType type = item->getWearableType();
if (type < LLWearableType::WT_COUNT && childGetValue(mCheckBoxList[type].first).asBoolean())
{
item_list.push_back(item);
}
}
else
{
LLViewerJointAttachment* attachment = gAgentAvatarp->getWornAttachmentPoint(item->getLinkedUUID());
if (attachment && childGetValue(std::string("checkbox_")+attachment->getName()).asBoolean())
{
item_list.push_back(item);
}
}
}
}
示例3: llassert
void LLWearableItemsList::ContextMenu::updateItemsLabels(LLContextMenu* menu)
{
llassert(menu);
if (!menu) return;
// Set proper label for the "Create new <WEARABLE_TYPE>" menu item.
LLViewerInventoryItem* item = gInventory.getLinkedItem(mUUIDs.back());
if (!item || !item->isWearableType()) return;
LLWearableType::EType w_type = item->getWearableType();
std::string new_label = LLTrans::getString("create_new_" + LLWearableType::getTypeName(w_type));
LLMenuItemGL* menu_item = menu->getChild<LLMenuItemGL>("create_new");
menu_item->setLabel(new_label);
}
示例4: filterWearablesBySelectedItem
//.........这里部分代码省略.........
LLUUID selected_item_id = mWearableItemsList->getSelectedUUID();
LLViewerInventoryItem* item = gInventory.getLinkedItem(selected_item_id);
if(item)
{
showFilteredWearablesListView(item->getWearableType());
return;
}
// when no accordion selected and no selected items in flat list view
// determine filtering according to expanded accordion
type = mCOFWearables->getExpandedAccordionAssetType();
}
switch (type)
{
case LLAssetType::AT_OBJECT:
applyListViewFilter(LVIT_ATTACHMENT);
break;
case LLAssetType::AT_BODYPART:
applyListViewFilter(LVIT_BODYPART);
break;
case LLAssetType::AT_CLOTHING:
default:
applyListViewFilter(LVIT_CLOTHING);
break;
}
return;
}
//resetting selection if more than one item is selected
if (more_than_one_selected)
{
if (mInventoryItemsPanel->getVisible())
{
applyFolderViewFilter(FVIT_ALL);
return;
}
showWearablesListView();
applyListViewFilter(LVIT_ALL);
return;
}
//filter wearables by a type represented by a dummy item
if (one_selected && is_dummy_item)
{
if (mInventoryItemsPanel->getVisible())
{
applyFolderViewFilter(FVIT_WEARABLE);
return;
}
onAddWearableClicked();
return;
}
LLViewerInventoryItem* item = gInventory.getItem(ids[0]);
if (!item && ids[0].notNull())
{
if (mInventoryItemsPanel->getVisible())
{
applyFolderViewFilter(FVIT_ALL);
return;
}
//Inventory misses an item with non-zero id
showWearablesListView();
applyListViewFilter(LVIT_ALL);
return;
}
if (item && one_selected && !is_dummy_item)
{
if (item->isWearableType())
{
if (mInventoryItemsPanel->getVisible())
{
applyFolderViewFilter(FVIT_WEARABLE);
return;
}
//single clothing or bodypart item is selected
showFilteredWearablesListView(item->getWearableType());
return;
}
else
{
if (mInventoryItemsPanel->getVisible())
{
applyFolderViewFilter(FVIT_ATTACHMENT);
return;
}
//attachment is selected
showWearablesListView();
applyListViewFilter(LVIT_ATTACHMENT);
return;
}
}
}