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


C++ LLCheckBoxCtrl::getName方法代码示例

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


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

示例1: onClickUICheck

// Callback attached to each check box control to both affect their main purpose
// and to implement the couple screwy interdependency rules that some have.
//static 
void LLFloaterBeacons::onClickUICheck(LLUICtrl *ctrl, void* data)
{
	LLCheckBoxCtrl *check = (LLCheckBoxCtrl *)ctrl;
	std::string name = check->getName();
	LLFloaterBeacons* view = (LLFloaterBeacons*)data;
	if(     name == "touch_only")
	{
		LLPipeline::toggleRenderScriptedTouchBeacons(NULL);
		// Don't allow both to be ON at the same time. Toggle the other one off if both now on.
		if (
			LLPipeline::getRenderScriptedTouchBeacons(NULL) &&
			LLPipeline::getRenderScriptedBeacons(NULL) )
		{
			LLPipeline::setRenderScriptedBeacons(FALSE);
			view->getChild<LLCheckBoxCtrl>("scripted")->setControlValue(LLSD(FALSE));
			view->getChild<LLCheckBoxCtrl>("touch_only")->setControlValue(LLSD(TRUE)); // just to be sure it's in sync with llpipeline
		}
	}
	else if(name == "scripted")
	{
		LLPipeline::toggleRenderScriptedBeacons(NULL);
		// Don't allow both to be ON at the same time. Toggle the other one off if both now on.
		if (
			LLPipeline::getRenderScriptedTouchBeacons(NULL) &&
			LLPipeline::getRenderScriptedBeacons(NULL) )
		{
			LLPipeline::setRenderScriptedTouchBeacons(FALSE);
			view->getChild<LLCheckBoxCtrl>("touch_only")->setControlValue(LLSD(FALSE));
			view->getChild<LLCheckBoxCtrl>("scripted")->setControlValue(LLSD(TRUE)); // just to be sure it's in sync with llpipeline
		}
	}
	else if(name == "physical")       LLPipeline::setRenderPhysicalBeacons(check->get());
	else if(name == "sounds")         LLPipeline::setRenderSoundBeacons(check->get());
	else if(name == "particles")      LLPipeline::setRenderParticleBeacons(check->get());
	else if(name == "highlights")
	{
		LLPipeline::toggleRenderHighlights(NULL);
		// Don't allow both to be OFF at the same time. Toggle the other one on if both now off.
		if (
			!LLPipeline::getRenderBeacons(NULL) &&
			!LLPipeline::getRenderHighlights(NULL) )
		{
			LLPipeline::setRenderBeacons(TRUE);
			view->getChild<LLCheckBoxCtrl>("beacons")->setControlValue(LLSD(TRUE));
			view->getChild<LLCheckBoxCtrl>("highlights")->setControlValue(LLSD(FALSE)); // just to be sure it's in sync with llpipeline
		}
	}
	else if(name == "beacons")
	{
		LLPipeline::toggleRenderBeacons(NULL);
		// Don't allow both to be OFF at the same time. Toggle the other one on if both now off.
		if (
			!LLPipeline::getRenderBeacons(NULL) &&
			!LLPipeline::getRenderHighlights(NULL) )
		{
			LLPipeline::setRenderHighlights(TRUE);
			view->getChild<LLCheckBoxCtrl>("highlights")->setControlValue(LLSD(TRUE));
			view->getChild<LLCheckBoxCtrl>("beacons")->setControlValue(LLSD(FALSE)); // just to be sure it's in sync with llpipeline
		}
	}
}
开发者ID:AlexRa,项目名称:Kirstens-clone,代码行数:64,代码来源:llfloaterbeacons.cpp


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