// virtual void LLPanelSnapshotPostcard::updateControls(const LLSD& info) { getChild<LLUICtrl>("image_quality_slider")->setValue(gSavedSettings.getS32("SnapshotQuality")); updateImageQualityLevel(); const bool have_snapshot = info.has("have-snapshot") ? info["have-snapshot"].asBoolean() : true; getChild<LLUICtrl>("send_btn")->setEnabled(have_snapshot); }
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); }
// virtual void LLPanelSnapshotLocal::updateControls(const LLSD& info) { LLFloaterSnapshot::ESnapshotFormat fmt = (LLFloaterSnapshot::ESnapshotFormat) gSavedSettings.getS32("SnapshotFormat"); getChild<LLComboBox>("local_format_combo")->selectNthItem((S32) fmt); const bool show_quality_ctrls = (fmt == LLFloaterSnapshot::SNAPSHOT_FORMAT_JPEG); getChild<LLUICtrl>("image_quality_slider")->setVisible(show_quality_ctrls); getChild<LLUICtrl>("image_quality_level")->setVisible(show_quality_ctrls); getChild<LLUICtrl>("image_quality_slider")->setValue(gSavedSettings.getS32("SnapshotQuality")); updateImageQualityLevel(); const bool have_snapshot = info.has("have-snapshot") ? info["have-snapshot"].asBoolean() : true; getChild<LLUICtrl>("save_btn")->setEnabled(have_snapshot); }