diff options
author | Jonathan Yap <jhwelch@gmail.com> | 2015-01-14 19:55:58 -0500 |
---|---|---|
committer | Jonathan Yap <jhwelch@gmail.com> | 2015-01-14 19:55:58 -0500 |
commit | d1bc2fe292edcea60b49ce8111a495974e9415a2 (patch) | |
tree | 130d327294f0ab9cab983b012f0bf9a456c1e0c7 /indra/newview | |
parent | f6a1980c256474b96d5fe7943bfe1bd582826860 (diff) |
STORM-2082 Assorted UI tweaks, better MaximumARC formula, pulldowns disappear faster
Diffstat (limited to 'indra/newview')
-rwxr-xr-x | indra/newview/llfloaterpreference.cpp | 54 | ||||
-rwxr-xr-x | indra/newview/llfloaterpreference.h | 1 | ||||
-rwxr-xr-x | indra/newview/llpanelnearbymedia.cpp | 6 | ||||
-rw-r--r-- | indra/newview/llpanelpresetspulldown.cpp | 8 | ||||
-rwxr-xr-x | indra/newview/llpanelvolumepulldown.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llpresetsmanager.cpp | 14 | ||||
-rw-r--r-- | indra/newview/llpresetsmanager.h | 1 | ||||
-rwxr-xr-x | indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml | 86 |
8 files changed, 97 insertions, 77 deletions
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 6e340864bc..4b83b104fd 100755 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -1475,7 +1475,7 @@ void LLFloaterPreference::refresh() updateSliderText(getChild<LLSliderCtrl>("RenderPostProcess", true), getChild<LLTextBox>("PostProcessText", true)); updateSliderText(getChild<LLSliderCtrl>("SkyMeshDetail", true), getChild<LLTextBox>("SkyMeshDetailText", true)); updateSliderText(getChild<LLSliderCtrl>("TerrainDetail", true), getChild<LLTextBox>("TerrainDetailText", true)); - updateSliderText(getChild<LLSliderCtrl>("MaximumARC", true), getChild<LLTextBox>("MaximumARCText", true)); + updateMaximumArcText(getChild<LLSliderCtrl>("MaximumARC", true), getChild<LLTextBox>("MaximumARCText", true)); } void LLFloaterPreference::onCommitWindowedMode() @@ -1731,8 +1731,6 @@ void LLFloaterPreference::updateSliderText(LLSliderCtrl* ctrl, LLTextBox* text_b { if (text_box == NULL || ctrl== NULL) return; - - std::string name = ctrl->getName(); // get range and points when text should change F32 value = (F32)ctrl->getValue().asReal(); @@ -1756,35 +1754,43 @@ void LLFloaterPreference::updateSliderText(LLSliderCtrl* ctrl, LLTextBox* text_b { text_box->setText(LLTrans::getString("GraphicsQualityHigh")); } +} + +void LLFloaterPreference::updateMaximumArcText(LLSliderCtrl* ctrl, LLTextBox* text_box) +{ + F32 min_result = 20000.0f; + F32 max_result = 300000.0f; - if ("MaximumARC" == name) + F32 value = (F32)ctrl->getValue().asReal(); + + if (0.0f == value) + { + text_box->setText(LLTrans::getString("Off")); + } + else { - F32 control_value = value; - if (0.0f == control_value) - { - text_box->setText(LLTrans::getString("Off")); - } - else - { - // 100 is the maximum value of this control set in panel_preferences_graphics1.xml - F32 minp = 0.0f; - F32 maxp = 100.0f; - // The result should be between 20,000 and 500,000 - F32 minv = log(20000.0f); - F32 maxv = log(500000.0f); + // Invert value because a higher value on the slider control needs a decreasing final + // value in order to obtain larger numbers of imposters + value = 100.0f - value; - // calculate adjustment factor - F32 scale = (maxv - minv) / (maxp - minp); + // 100 is the maximum value of this control set in panel_preferences_graphics1.xml + F32 minp = 0.0f; + F32 maxp = 99.0f; - control_value = exp(minv + scale * (control_value - minp)); + // The result should be between min_result and max_result + F32 minv = log(min_result); + F32 maxv = log(max_result); - // Invert result - control_value = 500000.0f - control_value; - } + // calculate adjustment factor + F32 scale = (maxv - minv) / (maxp - minp); - gSavedSettings.setU32("RenderAutoMuteRenderWeightLimit", (U32)control_value); + value = exp(minv + scale * (value - minp)); + + text_box->setText(llformat("%0.0f", value)); } + + gSavedSettings.setU32("RenderAutoMuteRenderWeightLimit", (U32)value); } void LLFloaterPreference::onChangeMaturity() diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h index f6b5f5229d..98b05cca03 100755 --- a/indra/newview/llfloaterpreference.h +++ b/indra/newview/llfloaterpreference.h @@ -157,6 +157,7 @@ public: void onChangeQuality(const LLSD& data); void updateSliderText(LLSliderCtrl* ctrl, LLTextBox* text_box); + void updateMaximumArcText(LLSliderCtrl* ctrl, LLTextBox* text_box); void refreshUI(); void onCommitParcelMediaAutoPlayEnable(); diff --git a/indra/newview/llpanelnearbymedia.cpp b/indra/newview/llpanelnearbymedia.cpp index 1cdd1b664e..737ae2e32d 100755 --- a/indra/newview/llpanelnearbymedia.cpp +++ b/indra/newview/llpanelnearbymedia.cpp @@ -65,6 +65,9 @@ extern LLControlGroup gSavedSettings; static const LLUUID PARCEL_MEDIA_LIST_ITEM_UUID = LLUUID("CAB5920F-E484-4233-8621-384CF373A321"); static const LLUUID PARCEL_AUDIO_LIST_ITEM_UUID = LLUUID("DF4B020D-8A24-4B95-AB5D-CA970D694822"); +const F32 AUTO_CLOSE_FADE_TIME_START= 2.0f; +const F32 AUTO_CLOSE_FADE_TIME_END = 3.0f; + // // LLPanelNearByMedia // @@ -227,9 +230,6 @@ void LLPanelNearByMedia::reshape(S32 width, S32 height, BOOL called_from_parent) } -const F32 AUTO_CLOSE_FADE_TIME_START= 4.0f; -const F32 AUTO_CLOSE_FADE_TIME_END = 5.0f; - /*virtual*/ void LLPanelNearByMedia::draw() { diff --git a/indra/newview/llpanelpresetspulldown.cpp b/indra/newview/llpanelpresetspulldown.cpp index 4756f3bd75..66f2f4c3f3 100644 --- a/indra/newview/llpanelpresetspulldown.cpp +++ b/indra/newview/llpanelpresetspulldown.cpp @@ -39,8 +39,8 @@ #include "llsliderctrl.h" #include "llscrolllistctrl.h" -/* static */ const F32 LLPanelPresetsPulldown::sAutoCloseFadeStartTimeSec = 4.0f; -/* static */ const F32 LLPanelPresetsPulldown::sAutoCloseTotalTimeSec = 5.0f; +/* static */ const F32 LLPanelPresetsPulldown::sAutoCloseFadeStartTimeSec = 2.0f; +/* static */ const F32 LLPanelPresetsPulldown::sAutoCloseTotalTimeSec = 3.0f; ///---------------------------------------------------------------------------- /// Class LLPanelPresetsPulldown @@ -71,7 +71,7 @@ BOOL LLPanelPresetsPulldown::postBuild() void LLPanelPresetsPulldown::populatePanel() { std::string presets_dir = LLPresetsManager::getInstance()->getPresetsDir(PRESETS_GRAPHIC); - LLPresetsManager::getInstance()->loadPresetNamesFromDir(presets_dir, mPresetNames, DEFAULT_SHOW); + LLPresetsManager::getInstance()->loadPresetNamesFromDir(presets_dir, mPresetNames, DEFAULT_TOP); LLScrollListCtrl* scroll = getChild<LLScrollListCtrl>("preset_list"); @@ -91,7 +91,7 @@ void LLPanelPresetsPulldown::populatePanel() { row["columns"][1]["column"] = "icon"; row["columns"][1]["type"] = "icon"; - row["columns"][1]["value"] = "Inv_Landmark"; + row["columns"][1]["value"] = "Checkbox_On"; } scroll->addElement(row); diff --git a/indra/newview/llpanelvolumepulldown.cpp b/indra/newview/llpanelvolumepulldown.cpp index cb00f742cc..6595da235c 100755 --- a/indra/newview/llpanelvolumepulldown.cpp +++ b/indra/newview/llpanelvolumepulldown.cpp @@ -40,8 +40,8 @@ #include "llfloaterpreference.h" #include "llsliderctrl.h" -/* static */ const F32 LLPanelVolumePulldown::sAutoCloseFadeStartTimeSec = 4.0f; -/* static */ const F32 LLPanelVolumePulldown::sAutoCloseTotalTimeSec = 5.0f; +/* static */ const F32 LLPanelVolumePulldown::sAutoCloseFadeStartTimeSec = 2.0f; +/* static */ const F32 LLPanelVolumePulldown::sAutoCloseTotalTimeSec = 3.0f; ///---------------------------------------------------------------------------- /// Class LLPanelVolumePulldown diff --git a/indra/newview/llpresetsmanager.cpp b/indra/newview/llpresetsmanager.cpp index 36a82db916..67d06ff5dd 100644 --- a/indra/newview/llpresetsmanager.cpp +++ b/indra/newview/llpresetsmanager.cpp @@ -106,14 +106,8 @@ void LLPresetsManager::loadPresetNamesFromDir(const std::string& dir, preset_nam // 2 - Possibly hide the default preset if (PRESETS_DEFAULT != name) { - if (name != gSavedSettings.getString("PresetGraphicActive")) - { - mPresetNames.push_back(name); - } - else - { - mPresetNames.insert(mPresetNames.begin(), name); - } + mPresetNames.push_back(name); + } else { @@ -123,6 +117,10 @@ void LLPresetsManager::loadPresetNamesFromDir(const std::string& dir, preset_nam mPresetNames.push_back(LLTrans::getString(PRESETS_DEFAULT)); break; + case DEFAULT_TOP: + mPresetNames.push_front(LLTrans::getString(PRESETS_DEFAULT)); + break; + case DEFAULT_HIDE: default: break; diff --git a/indra/newview/llpresetsmanager.h b/indra/newview/llpresetsmanager.h index bf6a531d48..e9ed164322 100644 --- a/indra/newview/llpresetsmanager.h +++ b/indra/newview/llpresetsmanager.h @@ -40,6 +40,7 @@ static const std::string PRESETS_CAMERA = "camera"; enum EDefaultOptions { DEFAULT_SHOW, + DEFAULT_TOP, DEFAULT_HIDE // Do not display "Default" in a list }; 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 40b359eb1d..c540000489 100755 --- a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml @@ -244,7 +244,6 @@ top_delta="25" width="517"> - <!-- This block shows Basic Settings --> <panel border="false" @@ -317,18 +316,33 @@ </text> <check_box + control_name="WindLightUseAtmosShaders" + height="16" + initial_value="true" + label="Atmospheric shaders" + layout="topleft" + left="30" + name="WindLightUseAtmosShaders" + top_delta="20" + width="280"> + <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="30" + left="50" name="UseLightShaders2" top_delta="20" width="256"> <check_box.commit_callback function="Pref.VertexShaderEnable" /> </check_box> + </panel> <!-- End of Basic Settings block --> @@ -457,40 +471,6 @@ Low </text> - <slider - control_name="RenderTerrainDetail" - follows="left|top" - height="16" - label="Terrain Detail:" - label_width="185" - layout="topleft" - left="30" - show_text="false" - initial_value="0" - increment="1" - min_val="0" - max_val="1" - name="TerrainDetail" - top_delta="16" - width="300" > - <slider.commit_callback - function="Pref.UpdateSliderText" - parameter="TerrainDetail" /> - </slider> - <text - type="string" - length="1" - follows="left|top" - height="16" - layout="topleft" - top_delta="0" - left_delta="304" - name="TerrainDetailText" - text_readonly_color="LabelDisabledColor" - width="128"> - Low - </text> - <text type="string" length="1" @@ -691,6 +671,40 @@ function="Pref.VertexShaderEnable" /> </check_box> + <slider + control_name="RenderTerrainDetail" + follows="left|top" + height="16" + label="Terrain Detail:" + label_width="165" + layout="topleft" + left="50" + show_text="false" + initial_value="0" + increment="1" + min_val="0" + max_val="1" + name="TerrainDetail" + top_delta="16" + width="280" > + <slider.commit_callback + function="Pref.UpdateSliderText" + parameter="TerrainDetail" /> + </slider> + <text + type="string" + length="1" + follows="left|top" + height="16" + layout="topleft" + top_delta="0" + left_delta="284" + name="TerrainDetailText" + text_readonly_color="LabelDisabledColor" + width="128"> + Low + </text> + <check_box control_name="RenderAvatarVP" height="16" |