summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorJonathan Yap <jhwelch@gmail.com>2014-12-13 20:53:27 -0500
committerJonathan Yap <jhwelch@gmail.com>2014-12-13 20:53:27 -0500
commitc655ae00a1e9d3540a9280181766bd4f646e1cce (patch)
tree4babae71d915eed49e439b97dd5867301e24fd03 /indra
parente713ef765f268af1cba0f7b04f1e331332630e97 (diff)
STORM-2082 When a control is greyed out make sure it's associated text is greyed out.
Sky: has two dependencies; grey it out when either one is not available. Remove Basic Shaders from Basic tab
Diffstat (limited to 'indra')
-rwxr-xr-xindra/newview/llfloaterpreference.cpp35
-rwxr-xr-xindra/newview/skins/default/xui/en/panel_preferences_graphics1.xml26
2 files changed, 39 insertions, 22 deletions
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index 6e5b75e80b..814e552027 100755
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -1088,12 +1088,14 @@ void LLFloaterPreference::buildPopupLists()
void LLFloaterPreference::refreshEnabledState()
{
LLUICtrl* ctrl_reflections = getChild<LLUICtrl>("Reflections");
+ LLTextBox* reflections_text = getChild<LLTextBox>("ReflectionsText");
// Reflections
BOOL reflections = gSavedSettings.getBOOL("VertexShaderEnable")
&& gGLManager.mHasCubeMap
&& LLCubeMap::sUseCubeMaps;
ctrl_reflections->setEnabled(reflections);
+ reflections_text->setEnabled(reflections);
// Bump & Shiny
LLCheckBoxCtrl* bumpshiny_ctrl = getChild<LLCheckBoxCtrl>("BumpShiny");
@@ -1129,6 +1131,7 @@ void LLFloaterPreference::refreshEnabledState()
// Global Shader Enable
LLCheckBoxCtrl* ctrl_shader_enable = getChild<LLCheckBoxCtrl>("BasicShaders");
LLSliderCtrl* terrain_detail = getChild<LLSliderCtrl>("TerrainDetail"); // can be linked with control var
+ LLTextBox* terrain_text = getChild<LLTextBox>("TerrainDetailText");
ctrl_shader_enable->setEnabled(LLFeatureManager::getInstance()->isFeatureAvailable("VertexShaderEnable"));
@@ -1137,19 +1140,26 @@ void LLFloaterPreference::refreshEnabledState()
{
terrain_detail->setValue(1);
terrain_detail->setEnabled(FALSE);
+ terrain_text->setEnabled(false);
}
else
{
- terrain_detail->setEnabled(TRUE);
+ terrain_detail->setEnabled(TRUE);
+ terrain_text->setEnabled(true);
}
// WindLight
LLCheckBoxCtrl* ctrl_wind_light = getChild<LLCheckBoxCtrl>("WindLightUseAtmosShaders");
-
+ LLSliderCtrl* sky = getChild<LLSliderCtrl>("SkyMeshDetail");
+ LLTextBox* sky_text = getChild<LLTextBox>("SkyMeshDetailText");
+
// *HACK just checks to see if we can use shaders...
// maybe some cards that use shaders, but don't support windlight
ctrl_wind_light->setEnabled(ctrl_shader_enable->getEnabled() && shaders);
+ sky->setEnabled(ctrl_wind_light->get() && shaders);
+ sky_text->setEnabled(ctrl_wind_light->get() && shaders);
+
//Deferred/SSAO/Shadows
LLCheckBoxCtrl* ctrl_deferred = getChild<LLCheckBoxCtrl>("UseLightShaders");
LLCheckBoxCtrl* ctrl_deferred2 = getChild<LLCheckBoxCtrl>("UseLightShaders2");
@@ -1168,6 +1178,7 @@ void LLFloaterPreference::refreshEnabledState()
LLCheckBoxCtrl* ctrl_ssao = getChild<LLCheckBoxCtrl>("UseSSAO");
LLCheckBoxCtrl* ctrl_dof = getChild<LLCheckBoxCtrl>("UseDoF");
LLUICtrl* ctrl_shadow = getChild<LLUICtrl>("ShadowDetail");
+ LLTextBox* shadow_text = getChild<LLTextBox>("RenderShadowDetailText");
// note, okay here to get from ctrl_deferred as it's twin, ctrl_deferred2 will alway match it
enabled = enabled && LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferredSSAO") && (ctrl_deferred->get() ? TRUE : FALSE);
@@ -1180,6 +1191,7 @@ void LLFloaterPreference::refreshEnabledState()
enabled = enabled && LLFeatureManager::getInstance()->isFeatureAvailable("RenderShadowDetail");
ctrl_shadow->setEnabled(enabled);
+ shadow_text->setEnabled(enabled);
// Hardware settings
F32 mem_multiplier = gSavedSettings.getF32("RenderTextureMemoryMultiple");
@@ -1249,6 +1261,7 @@ void LLFloaterPreference::refreshEnabledState()
void LLFloaterPreference::disableUnavailableSettings()
{
LLUICtrl* ctrl_reflections = getChild<LLUICtrl>("Reflections");
+ LLTextBox* reflections_text = getChild<LLTextBox>("ReflectionsText");
LLCheckBoxCtrl* ctrl_avatar_vp = getChild<LLCheckBoxCtrl>("AvatarVertexProgram");
LLCheckBoxCtrl* ctrl_avatar_cloth = getChild<LLCheckBoxCtrl>("AvatarCloth");
LLCheckBoxCtrl* ctrl_shader_enable = getChild<LLCheckBoxCtrl>("BasicShaders");
@@ -1257,8 +1270,11 @@ void LLFloaterPreference::disableUnavailableSettings()
LLCheckBoxCtrl* ctrl_deferred = getChild<LLCheckBoxCtrl>("UseLightShaders");
LLCheckBoxCtrl* ctrl_deferred2 = getChild<LLCheckBoxCtrl>("UseLightShaders2");
LLUICtrl* ctrl_shadows = getChild<LLUICtrl>("ShadowDetail");
+ LLTextBox* shadows_text = getChild<LLTextBox>("RenderShadowDetailText");
LLCheckBoxCtrl* ctrl_ssao = getChild<LLCheckBoxCtrl>("UseSSAO");
LLCheckBoxCtrl* ctrl_dof = getChild<LLCheckBoxCtrl>("UseDoF");
+ LLSliderCtrl* sky = getChild<LLSliderCtrl>("SkyMeshDetail");
+ LLTextBox* sky_text = getChild<LLTextBox>("SkyMeshDetailText");
// if vertex shaders off, disable all shader related products
if (!LLFeatureManager::getInstance()->isFeatureAvailable("VertexShaderEnable"))
@@ -1268,9 +1284,13 @@ void LLFloaterPreference::disableUnavailableSettings()
ctrl_wind_light->setEnabled(FALSE);
ctrl_wind_light->setValue(FALSE);
-
+
+ sky->setEnabled(false);
+ sky_text->setEnabled(false);
+
ctrl_reflections->setEnabled(FALSE);
ctrl_reflections->setValue(0);
+ reflections_text->setEnabled(false);
ctrl_avatar_vp->setEnabled(FALSE);
ctrl_avatar_vp->setValue(FALSE);
@@ -1280,6 +1300,7 @@ void LLFloaterPreference::disableUnavailableSettings()
ctrl_shadows->setEnabled(FALSE);
ctrl_shadows->setValue(0);
+ shadows_text->setEnabled(false);
ctrl_ssao->setEnabled(FALSE);
ctrl_ssao->setValue(FALSE);
@@ -1299,9 +1320,13 @@ void LLFloaterPreference::disableUnavailableSettings()
ctrl_wind_light->setEnabled(FALSE);
ctrl_wind_light->setValue(FALSE);
+ sky->setEnabled(false);
+ sky_text->setEnabled(false);
+
//deferred needs windlight, disable deferred
ctrl_shadows->setEnabled(FALSE);
ctrl_shadows->setValue(0);
+ shadows_text->setEnabled(false);
ctrl_ssao->setEnabled(FALSE);
ctrl_ssao->setValue(FALSE);
@@ -1321,6 +1346,7 @@ void LLFloaterPreference::disableUnavailableSettings()
{
ctrl_shadows->setEnabled(FALSE);
ctrl_shadows->setValue(0);
+ shadows_text->setEnabled(false);
ctrl_ssao->setEnabled(FALSE);
ctrl_ssao->setValue(FALSE);
@@ -1346,6 +1372,7 @@ void LLFloaterPreference::disableUnavailableSettings()
{
ctrl_shadows->setEnabled(FALSE);
ctrl_shadows->setValue(0);
+ shadows_text->setEnabled(false);
}
// disabled reflections
@@ -1353,6 +1380,7 @@ void LLFloaterPreference::disableUnavailableSettings()
{
ctrl_reflections->setEnabled(FALSE);
ctrl_reflections->setValue(FALSE);
+ reflections_text->setEnabled(false);
}
// disabled av
@@ -1367,6 +1395,7 @@ void LLFloaterPreference::disableUnavailableSettings()
//deferred needs AvatarVP, disable deferred
ctrl_shadows->setEnabled(FALSE);
ctrl_shadows->setValue(0);
+ shadows_text->setEnabled(false);
ctrl_ssao->setEnabled(FALSE);
ctrl_ssao->setValue(FALSE);
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml
index 4636313f94..a53097a117 100755
--- a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml
@@ -265,27 +265,12 @@
</text>
<check_box
- control_name="VertexShaderEnable"
- height="16"
- initial_value="true"
- label="Basic shaders"
- layout="topleft"
- left="30"
- name="BasicShaders"
- tool_tip="Disabling this option may prevent some graphics card drivers from crashing"
- top_delta="30"
- width="300">
- <check_box.commit_callback
- function="Pref.VertexShaderEnable" />
- </check_box>
-
- <check_box
control_name="RenderDeferred"
height="16"
initial_value="true"
label="Advanced Lighting Model"
layout="topleft"
- left="50"
+ left="30"
name="UseLightShaders2"
top_delta="20"
width="256">
@@ -438,7 +423,7 @@
width="300" >
<slider.commit_callback
function="Pref.UpdateSliderText"
- parameter="TerrainDetailText" />
+ parameter="TerrainDetail" />
</slider>
<text
type="string"
@@ -449,6 +434,7 @@
top_delta="0"
left_delta="304"
name="TerrainDetailText"
+ text_readonly_color="LabelDisabledColor"
width="128">
Low
</text>
@@ -629,6 +615,7 @@
height="16"
layout="topleft"
name="TerrainMeshDetailText"
+ text_readonly_color="LabelDisabledColor"
top_delta="0"
left_delta="304"
width="128">
@@ -844,6 +831,7 @@
height="16"
layout="topleft"
name="ReflectionsText"
+ text_readonly_color="LabelDisabledColor"
top_delta="0"
left_delta="284"
width="128">
@@ -866,7 +854,6 @@
<slider
control_name="WLSkyDetail"
- enabled_control="WindLightUseAtmosShaders"
decimal_digits="0"
follows="left|top"
height="16"
@@ -887,7 +874,6 @@
parameter="SkyMeshDetailText" />
</slider>
<text
- enabled_control="WindLightUseAtmosShaders"
type="string"
length="1"
follows="left|top"
@@ -895,6 +881,7 @@
layout="topleft"
left_delta="264"
name="SkyMeshDetailText"
+ text_readonly_color="LabelDisabledColor"
top_delta="0"
width="128">
Low
@@ -970,6 +957,7 @@
layout="topleft"
left_delta="264"
name="RenderShadowDetailText"
+ text_readonly_color="LabelDisabledColor"
top_delta="0"
width="128">
None