本文整理汇总了C++中LLFolderViewEventListener::getName方法的典型用法代码示例。如果您正苦于以下问题:C++ LLFolderViewEventListener::getName方法的具体用法?C++ LLFolderViewEventListener::getName怎么用?C++ LLFolderViewEventListener::getName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLFolderViewEventListener
的用法示例。
在下文中一共展示了LLFolderViewEventListener::getName方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: doCallingCardSelectionChange
// Callback for inventory picker (select from calling cards)
void LLFloaterAvatarPicker::doCallingCardSelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action, void* data)
{
bool panel_active = (childGetVisibleTab("ResidentChooserTabs") == getChild<LLPanel>("CallingCardsPanel"));
mSelectedInventoryAvatarIDs.clear();
mSelectedInventoryAvatarNames.clear();
if (panel_active)
{
childSetEnabled("Select", FALSE);
}
std::deque<LLFolderViewItem*>::const_iterator item_it;
for (item_it = items.begin(); item_it != items.end(); ++item_it)
{
LLFolderViewEventListener* listenerp = (*item_it)->getListener();
if (listenerp->getInventoryType() == LLInventoryType::IT_CALLINGCARD)
{
LLInventoryItem* item = gInventory.getItem(listenerp->getUUID());
if (item)
{
mSelectedInventoryAvatarIDs.push_back(item->getCreatorUUID());
mSelectedInventoryAvatarNames.push_back(listenerp->getName());
}
}
}
if (panel_active)
{
childSetEnabled("Select", visibleItemsSelected());
}
}
示例2: doSelectionChange
// Callback for inventory picker (select from calling cards)
void LLFloaterAvatarPicker::doSelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action, void* data)
{
if (!mListNames)
{
return;
}
std::vector<LLScrollListItem*> search_items = mListNames->getAllSelected();
if ( search_items.size() == 0 )
{ // Nothing selected in the search results
mAvatarIDs.clear();
mAvatarNames.clear();
childSetEnabled("Select", FALSE);
}
BOOL first_calling_card = TRUE;
std::deque<LLFolderViewItem*>::const_iterator item_it;
for (item_it = items.begin(); item_it != items.end(); ++item_it)
{
LLFolderViewEventListener* listenerp = (*item_it)->getListener();
if (listenerp->getInventoryType() == LLInventoryType::IT_CALLINGCARD)
{
LLInventoryItem* item = gInventory.getItem(listenerp->getUUID());
if (item)
{
if ( first_calling_card )
{ // Have a calling card selected, so clear anything from the search panel
first_calling_card = FALSE;
mAvatarIDs.clear();
mAvatarNames.clear();
mListNames->deselectAllItems();
}
// Add calling card info to the selected avatars
mAvatarIDs.push_back(item->getCreatorUUID());
mAvatarNames.push_back(listenerp->getName());
childSetEnabled("Select", TRUE);
}
}
}
}