// 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 } } }