当前位置: 首页>>代码示例>>C++>>正文


C++ LLFloaterAvatarPicker::mCallback方法代码示例

本文整理汇总了C++中LLFloaterAvatarPicker::mCallback方法的典型用法代码示例。如果您正苦于以下问题:C++ LLFloaterAvatarPicker::mCallback方法的具体用法?C++ LLFloaterAvatarPicker::mCallback怎么用?C++ LLFloaterAvatarPicker::mCallback使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在LLFloaterAvatarPicker的用法示例。


在下文中一共展示了LLFloaterAvatarPicker::mCallback方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: onBtnSelect

void LLFloaterAvatarPicker::onBtnSelect(void* userdata)
{
	LLFloaterAvatarPicker* self = (LLFloaterAvatarPicker*)userdata;

	if(self->mCallback)
	{
		LLPanel* active_panel = self->childGetVisibleTab("ResidentChooserTabs");

		if(active_panel == self->getChild<LLPanel>("CallingCardsPanel"))
		{
			self->mCallback(self->mSelectedInventoryAvatarNames, self->mSelectedInventoryAvatarIDs, self->mCallbackUserdata);
		}
		else if(active_panel == self->getChild<LLPanel>("SearchPanel"))
		{
			std::vector<std::string>	avatar_names;
			std::vector<LLUUID>			avatar_ids;
			getSelectedAvatarData(self->getChild<LLScrollListCtrl>("SearchResults"), avatar_names, avatar_ids);
			self->mCallback(avatar_names, avatar_ids, self->mCallbackUserdata);
		}
		else if(active_panel == self->getChild<LLPanel>("NearMePanel"))
		{
			std::vector<std::string>	avatar_names;
			std::vector<LLUUID>			avatar_ids;
			getSelectedAvatarData(self->getChild<LLScrollListCtrl>("NearMe"), avatar_names, avatar_ids);
			self->mCallback(avatar_names, avatar_ids, self->mCallbackUserdata);
		}
		else if(active_panel == self->getChild<LLPanel>("KeyPanel"))
		{
			LLUUID specified = self->getChild<LLLineEditor>("EditUUID")->getValue().asUUID();
			if(specified.isNull())
				return;
			std::vector<std::string>	avatar_names;
			std::vector<LLUUID>			avatar_ids;
			avatar_ids.push_back(specified);
			avatar_names.push_back(specified.asString());
			self->mCallback(avatar_names, avatar_ids, self->mCallbackUserdata);
		}
	}
	self->getChild<LLInventoryPanel>("InventoryPanel")->setSelection(LLUUID::null, FALSE);
	self->getChild<LLScrollListCtrl>("SearchResults")->deselectAllItems(TRUE);
	self->getChild<LLScrollListCtrl>("NearMe")->deselectAllItems(TRUE);
	if(self->mCloseOnSelect)
	{
		self->mCloseOnSelect = FALSE;
		self->close();		
	}
}
开发者ID:BillBarnhill,项目名称:SingularityViewer,代码行数:47,代码来源:llfloateravatarpicker.cpp

示例2: onBtnSelect

void LLFloaterAvatarPicker::onBtnSelect(void* userdata)
{
	LLFloaterAvatarPicker* self = (LLFloaterAvatarPicker*)userdata;

	if(self->mCallback)
	{
		LLPanel* active_panel = self->childGetVisibleTab("ResidentChooserTabs");

		if(active_panel == self->getChild<LLPanel>("CallingCardsPanel"))
		{
			self->mCallback(self->mSelectedInventoryAvatarNames, self->mSelectedInventoryAvatarIDs, self->mCallbackUserdata);
		}
		else if(active_panel == self->getChild<LLPanel>("SearchPanel"))
		{
			std::vector<std::string>	avatar_names;
			std::vector<LLUUID>			avatar_ids;
			getSelectedAvatarData(self->getChild<LLScrollListCtrl>("SearchResults"), avatar_names, avatar_ids);
			self->mCallback(avatar_names, avatar_ids, self->mCallbackUserdata);
		}
		else if(active_panel == self->getChild<LLPanel>("NearMePanel"))
		{
			std::vector<std::string>	avatar_names;
			std::vector<LLUUID>			avatar_ids;
			getSelectedAvatarData(self->getChild<LLScrollListCtrl>("NearMe"), avatar_names, avatar_ids);
			self->mCallback(avatar_names, avatar_ids, self->mCallbackUserdata);
		}
	}
	if(self->init_cards)self->getChild<LLInventoryPanel>("InventoryPanel")->setSelection(LLUUID::null, FALSE);
	self->getChild<LLScrollListCtrl>("SearchResults")->deselectAllItems(TRUE);
	self->getChild<LLScrollListCtrl>("NearMe")->deselectAllItems(TRUE);
	if(self->mCloseOnSelect)
	{
		self->mCloseOnSelect = FALSE;
		self->close();		
	}
}
开发者ID:Xara,项目名称:Luna-Viewer,代码行数:36,代码来源:llfloateravatarpicker.cpp

示例3: onBtnAdd

void LLFloaterAvatarPicker::onBtnAdd(void* userdata)
{
	LLFloaterAvatarPicker* self = (LLFloaterAvatarPicker*)userdata;

	if(self->mCallback)
	{
		self->mCallback(self->mAvatarNames, self->mAvatarIDs, self->mCallbackUserdata);
	}
	if (self->mInventoryPanel)
	{
		self->mInventoryPanel->setSelection(LLUUID::null, FALSE);
	}
	if (self->mListNames)
	{
		self->mListNames->deselectAllItems(TRUE);
	}
	if(self->mCloseOnSelect)
	{
		self->mCloseOnSelect = FALSE;
		self->close();		
	}
}
开发者ID:Nora28,项目名称:imprudence,代码行数:22,代码来源:llfloateravatarpicker.cpp


注:本文中的LLFloaterAvatarPicker::mCallback方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。