Skip to content
Snippets Groups Projects
Commit f0809019 authored by Mnikolenko Productengine's avatar Mnikolenko Productengine
Browse files

SL-18670 change limits of RenderVolumeLODFactor in Preference similar to...

SL-18670 change limits of RenderVolumeLODFactor in Preference similar to Distance detail ctrl; update slider text correctly
parent d2766f34
No related branches found
No related tags found
No related merge requests found
...@@ -58,6 +58,7 @@ LLFloaterPreferenceGraphicsAdvanced::LLFloaterPreferenceGraphicsAdvanced(const L ...@@ -58,6 +58,7 @@ LLFloaterPreferenceGraphicsAdvanced::LLFloaterPreferenceGraphicsAdvanced(const L
LLFloaterPreferenceGraphicsAdvanced::~LLFloaterPreferenceGraphicsAdvanced() LLFloaterPreferenceGraphicsAdvanced::~LLFloaterPreferenceGraphicsAdvanced()
{ {
mComplexityChangedSignal.disconnect(); mComplexityChangedSignal.disconnect();
mLODFactorChangedSignal.disconnect();
} }
BOOL LLFloaterPreferenceGraphicsAdvanced::postBuild() BOOL LLFloaterPreferenceGraphicsAdvanced::postBuild()
...@@ -77,8 +78,8 @@ BOOL LLFloaterPreferenceGraphicsAdvanced::postBuild() ...@@ -77,8 +78,8 @@ BOOL LLFloaterPreferenceGraphicsAdvanced::postBuild()
use_HiDPI->setVisible(FALSE); use_HiDPI->setVisible(FALSE);
#endif #endif
mComplexityChangedSignal = gSavedSettings.getControl("RenderAvatarMaxComplexity")->getCommitSignal()->connect(boost::bind(&LLFloaterPreferenceGraphicsAdvanced::updateComplexityText, this)); mComplexityChangedSignal = gSavedSettings.getControl("RenderAvatarMaxComplexity")->getCommitSignal()->connect(boost::bind(&LLFloaterPreferenceGraphicsAdvanced::updateComplexityText, this));
mLODFactorChangedSignal = gSavedSettings.getControl("RenderVolumeLODFactor")->getCommitSignal()->connect(boost::bind(&LLFloaterPreferenceGraphicsAdvanced::updateObjectMeshDetailText, this));
return TRUE; return TRUE;
} }
...@@ -164,6 +165,11 @@ void LLFloaterPreferenceGraphicsAdvanced::updateComplexityText() ...@@ -164,6 +165,11 @@ void LLFloaterPreferenceGraphicsAdvanced::updateComplexityText()
getChild<LLTextBox>("IndirectMaxComplexityText", true)); getChild<LLTextBox>("IndirectMaxComplexityText", true));
} }
void LLFloaterPreferenceGraphicsAdvanced::updateObjectMeshDetailText()
{
updateSliderText(getChild<LLSliderCtrl>("ObjectMeshDetail", true), getChild<LLTextBox>("ObjectMeshDetailText", true));
}
void LLFloaterPreferenceGraphicsAdvanced::updateSliderText(LLSliderCtrl* ctrl, LLTextBox* text_box) void LLFloaterPreferenceGraphicsAdvanced::updateSliderText(LLSliderCtrl* ctrl, LLTextBox* text_box)
{ {
if (text_box == NULL || ctrl== NULL) if (text_box == NULL || ctrl== NULL)
......
...@@ -49,6 +49,7 @@ class LLFloaterPreferenceGraphicsAdvanced : public LLFloater ...@@ -49,6 +49,7 @@ class LLFloaterPreferenceGraphicsAdvanced : public LLFloater
void setMaxNonImpostorsText(U32 value, LLTextBox* text_box); void setMaxNonImpostorsText(U32 value, LLTextBox* text_box);
void updateMaxComplexity(); void updateMaxComplexity();
void updateComplexityText(); void updateComplexityText();
void updateObjectMeshDetailText();
void refresh(); void refresh();
// callback for when client modifies a render option // callback for when client modifies a render option
void onRenderOptionEnable(); void onRenderOptionEnable();
...@@ -60,6 +61,7 @@ class LLFloaterPreferenceGraphicsAdvanced : public LLFloater ...@@ -60,6 +61,7 @@ class LLFloaterPreferenceGraphicsAdvanced : public LLFloater
void onBtnCancel(const LLSD& userdata); void onBtnCancel(const LLSD& userdata);
boost::signals2::connection mComplexityChangedSignal; boost::signals2::connection mComplexityChangedSignal;
boost::signals2::connection mLODFactorChangedSignal;
}; };
#endif //LLFLOATERPREFERENCEGRAPHICSADVANCED_H #endif //LLFLOATERPREFERENCEGRAPHICSADVANCED_H
......
...@@ -522,8 +522,8 @@ ...@@ -522,8 +522,8 @@
label_width="185" label_width="185"
layout="topleft" layout="topleft"
left="420" left="420"
min_val="1" min_val="0"
max_val="2" max_val="4"
name="ObjectMeshDetail" name="ObjectMeshDetail"
show_text="false" show_text="false"
top_delta="16" top_delta="16"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment