void LLPanelSnapshotLocal::onQualitySliderCommit(LLUICtrl* ctrl) { updateImageQualityLevel(); LLSliderCtrl* slider = (LLSliderCtrl*)ctrl; S32 quality_val = llfloor((F32)slider->getValue().asReal()); LLSD info; info["image-quality-change"] = quality_val; LLFloaterSnapshot::getInstance()->notify(info); }
// static void LLScrollingPanelParam::onSliderMoved(LLUICtrl* ctrl, void* userdata) { LLSliderCtrl* slider = (LLSliderCtrl*) ctrl; LLScrollingPanelParam* self = (LLScrollingPanelParam*) userdata; LLViewerVisualParam* param = self->mParam; F32 current_weight = self->mWearable->getVisualParamWeight( param->getID() ); F32 new_weight = self->percentToWeight( (F32)slider->getValue().asReal() ); if (current_weight != new_weight ) { self->mWearable->setVisualParamWeight( param->getID(), new_weight, FALSE ); self->mWearable->writeToAvatar(); gAgentAvatarp->updateVisualParams(); } }
void LLScrollingPanelParamBase::onSliderMoved(LLUICtrl* ctrl) { if(!mParam) { return; } if(!mWearable) { return; } LLSliderCtrl* slider = (LLSliderCtrl*) ctrl; F32 current_weight = mWearable->getVisualParamWeight(mParam->getID()); F32 new_weight = percentToWeight( (F32)slider->getValue().asReal() ); if (current_weight != new_weight ) { mWearable->setVisualParamWeight( mParam->getID(), new_weight, FALSE); mWearable->writeToAvatar(gAgentAvatarp); gAgentAvatarp->updateVisualParams(); } }
// Color Moved void LLFloaterPostProcess::onColorControlIMoved(LLUICtrl* ctrl, void* userData) { char const * floatVariableName = (char const *)userData; LLSliderCtrl* sldrCtrl = static_cast<LLSliderCtrl*>(ctrl); gPostProcess->tweaks[floatVariableName][3] = sldrCtrl->getValue(); }