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


C++ LLViewerJointAttachment::getNumObjects方法代码示例

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


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

示例1: LLModalDialog

LLMakeOutfitDialog::LLMakeOutfitDialog(bool modal) : LLModalDialog(LLStringUtil::null, 515, 510, modal)
{
	LLUICtrlFactory::getInstance()->buildFloater(this, "floater_new_outfit_dialog.xml");

	setCanClose(!modal);
	setCanMinimize(!modal);

	// Build list of check boxes
	for (S32 i = 0; i < LLWearableType::WT_COUNT; i++)
	{
		std::string name = std::string("checkbox_") + LLWearableType::getTypeLabel((LLWearableType::EType)i);
		mCheckBoxList.push_back(std::make_pair(name, i));
		// Hide undergarments from teens
		if (gAgent.isTeen() && ((LLWearableType::WT_UNDERSHIRT == (LLWearableType::EType)i) || (LLWearableType::WT_UNDERPANTS == (LLWearableType::EType)i)))
		{
			childSetVisible(name, false); // Lest they know what's beyond their reach.
		}
		else
		{
			bool enabled = gAgentWearables.getWearableCount((LLWearableType::EType)i);	// TODO: MULTI-WEARABLE
			bool selected = enabled && (LLWearableType::WT_SHIRT <= i); // only select clothing by default
			childSetEnabled(name, enabled);
			childSetValue(name, selected);
		}
	}

	// NOTE: .xml needs to be updated if attachments are added or their names are changed!
	LLVOAvatar* avatar = gAgentAvatarp;
	if (avatar)
	{
		for (LLVOAvatar::attachment_map_t::iterator iter = avatar->mAttachmentPoints.begin(); iter != avatar->mAttachmentPoints.end();)
		{
			LLVOAvatar::attachment_map_t::iterator curiter = iter++;
			LLViewerJointAttachment* attachment = curiter->second;
			S32	attachment_pt = curiter->first;	
			bool object_attached = (attachment->getNumObjects() > 0);
			std::string name = std::string("checkbox_") + attachment->getName();
			mCheckBoxList.push_back(std::make_pair(name, attachment_pt));
			childSetEnabled(name, object_attached);
		}
	}

	if (!gHippoGridManager->getConnectedGrid()->supportsInvLinks())
	{
		childSetEnabled("checkbox_use_links", false);
		childSetValue("checkbox_use_links", false);
		childSetEnabled("checkbox_use_outfits", false);
		childSetValue("checkbox_use_outfits", false);
	}

	getChild<LLUICtrl>("Save")->setCommitCallback(boost::bind(&LLMakeOutfitDialog::onSave, this)); 
	getChild<LLUICtrl>("Cancel")->setCommitCallback(boost::bind(&LLMakeOutfitDialog::close, this, _1)); 
	getChild<LLUICtrl>("Check All")->setCommitCallback(boost::bind(&LLMakeOutfitDialog::onCheckAll, this, true));
	getChild<LLUICtrl>("Uncheck All")->setCommitCallback(boost::bind(&LLMakeOutfitDialog::onCheckAll, this, false));
	getChild<LLUICtrl>("checkbox_use_outfits")->setCommitCallback(boost::bind(&LLMakeOutfitDialog::refresh, this));
	startModal();
}
开发者ID:aragornarda,项目名称:SingularityViewer,代码行数:57,代码来源:llmakeoutfitdialog.cpp


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