本文整理汇总了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
}
}
}