summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Yap <jhwelch@gmail.com>2015-02-03 08:37:31 -0500
committerJonathan Yap <jhwelch@gmail.com>2015-02-03 08:37:31 -0500
commit45b59881ebcc19510c7e36398232f057366eb41d (patch)
treee7b5384118bb21b19e55de52fa45a1dfe2da0b63
parenta8c91370926174e7205067ee1567eff715784d78 (diff)
STORM-2082 Reformat preset floaters.
Remove Impostor checkbox. That control is now merged into the right side of the impostors slider. Maximum ARC still depends on impostors being enabled. Once that dependency is removed in llvoavatar then it will be necessary to reflect that change in the UI code.
-rwxr-xr-xindra/newview/llfloaterpreference.cpp32
-rwxr-xr-xindra/newview/llfloaterpreference.h4
-rw-r--r--indra/newview/skins/default/xui/en/floater_delete_pref_preset.xml24
-rw-r--r--indra/newview/skins/default/xui/en/floater_load_pref_preset.xml26
-rw-r--r--indra/newview/skins/default/xui/en/floater_save_pref_preset.xml27
-rwxr-xr-xindra/newview/skins/default/xui/en/panel_preferences_graphics1.xml50
-rwxr-xr-xindra/newview/skins/default/xui/en/strings.xml2
7 files changed, 93 insertions, 72 deletions
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index 17c93d792e..cbd9867107 100755
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -1229,7 +1229,6 @@ void LLFloaterPreference::refreshEnabledState()
enabled = LLFeatureManager::getInstance()->isFeatureAvailable("RenderUseImpostors") && gSavedSettings.getBOOL("RenderUseImpostors");
getChildView("MaximumARC")->setEnabled(enabled);
maximum_arc_text->setEnabled(enabled);
- getChildView("MaxNumberAvatarDrawn")->setEnabled(enabled);
// Hardware settings
F32 mem_multiplier = gSavedSettings.getF32("RenderTextureMemoryMultiple");
@@ -1304,10 +1303,8 @@ void LLFloaterPreference::disableUnavailableSettings()
LLCheckBoxCtrl* ctrl_avatar_cloth = getChild<LLCheckBoxCtrl>("AvatarCloth");
LLCheckBoxCtrl* ctrl_shader_enable = getChild<LLCheckBoxCtrl>("BasicShaders");
LLCheckBoxCtrl* ctrl_wind_light = getChild<LLCheckBoxCtrl>("WindLightUseAtmosShaders");
- LLCheckBoxCtrl* ctrl_avatar_impostors = getChild<LLCheckBoxCtrl>("AvatarImpostors");
LLSliderCtrl* ctrl_maximum_arc = getChild<LLSliderCtrl>("MaximumARC");
LLTextBox* maximum_arc_text = getChild<LLTextBox>("MaximumARCText");
- LLSliderCtrl* ctrl_max_visible = getChild<LLSliderCtrl>("MaxNumberAvatarDrawn");
LLCheckBoxCtrl* ctrl_deferred = getChild<LLCheckBoxCtrl>("UseLightShaders");
LLCheckBoxCtrl* ctrl_deferred2 = getChild<LLCheckBoxCtrl>("UseLightShaders2");
LLComboBox* ctrl_shadows = getChild<LLComboBox>("ShadowDetail");
@@ -1460,11 +1457,8 @@ void LLFloaterPreference::disableUnavailableSettings()
// disabled impostors
if (!LLFeatureManager::getInstance()->isFeatureAvailable("RenderUseImpostors"))
{
- ctrl_avatar_impostors->setEnabled(FALSE);
- ctrl_avatar_impostors->setValue(FALSE);
ctrl_maximum_arc->setEnabled(FALSE);
maximum_arc_text->setEnabled(FALSE);
- ctrl_max_visible->setEnabled(FALSE);
}
}
@@ -1474,8 +1468,6 @@ void LLFloaterPreference::refresh()
getChild<LLUICtrl>("fsaa")->setValue((LLSD::Integer) gSavedSettings.getU32("RenderFSAASamples"));
- refreshEnabledState();
-
// sliders and their text boxes
// mPostProcess = gSavedSettings.getS32("RenderGlowResolutionPow");
// slider text boxes
@@ -1488,7 +1480,10 @@ 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));
+ updateImpostorsText(getChild<LLSliderCtrl>("MaxNumberAvatarDrawn", true), getChild<LLTextBox>("ImpostorsText", true));
updateMaximumArcText(getChild<LLSliderCtrl>("MaximumARC", true), getChild<LLTextBox>("MaximumARCText", true));
+
+ refreshEnabledState();
}
void LLFloaterPreference::onCommitWindowedMode()
@@ -1769,6 +1764,25 @@ void LLFloaterPreference::updateSliderText(LLSliderCtrl* ctrl, LLTextBox* text_b
}
}
+void LLFloaterPreference::updateImpostorsText(LLSliderCtrl* ctrl, LLTextBox* text_box)
+{
+ F32 value = (F32)ctrl->getValue().asReal();
+
+ if (value < IMPOSTORS_OFF)
+ {
+ text_box->setText(llformat("%0.0f", value));
+ if (!gSavedSettings.getBOOL("RenderUseImpostors"))
+ {
+ gSavedSettings.setBOOL("RenderUseImpostors", true);
+ }
+ }
+ else
+ {
+ text_box->setText(LLTrans::getString("no_limit"));
+ gSavedSettings.setBOOL("RenderUseImpostors", false);
+ }
+}
+
void LLFloaterPreference::updateMaximumArcText(LLSliderCtrl* ctrl, LLTextBox* text_box)
{
F32 min_result = 20000.0f;
@@ -1781,7 +1795,7 @@ void LLFloaterPreference::updateMaximumArcText(LLSliderCtrl* ctrl, LLTextBox* te
// It has been decided that having the slider all the way to the right will be the off position, which
// is a value of 101, so it is necessary to change value to 0 disable impostor generation.
value = 0.0f;
- text_box->setText(LLTrans::getString("Off"));
+ text_box->setText(LLTrans::getString("no_limit"));
}
else
{
diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h
index 2810a1008b..10087f8aa3 100755
--- a/indra/newview/llfloaterpreference.h
+++ b/indra/newview/llfloaterpreference.h
@@ -58,6 +58,9 @@ typedef enum
} EGraphicsSettings;
+// 65 is the maximum value for impostors set in the xml file. When the slider reaches this
+// value impostors are turned off.
+const U32 IMPOSTORS_OFF = 66;
// Floater to control preferences (display, audio, bandwidth, general.
class LLFloaterPreference : public LLFloater, public LLAvatarPropertiesObserver, public LLConversationLogObserver
@@ -159,6 +162,7 @@ public:
void onChangeQuality(const LLSD& data);
void updateSliderText(LLSliderCtrl* ctrl, LLTextBox* text_box);
+ void updateImpostorsText(LLSliderCtrl* ctrl, LLTextBox* text_box);
void updateMaximumArcText(LLSliderCtrl* ctrl, LLTextBox* text_box);
void refreshUI();
diff --git a/indra/newview/skins/default/xui/en/floater_delete_pref_preset.xml b/indra/newview/skins/default/xui/en/floater_delete_pref_preset.xml
index cc3f9c5842..0688fdb42c 100644
--- a/indra/newview/skins/default/xui/en/floater_delete_pref_preset.xml
+++ b/indra/newview/skins/default/xui/en/floater_delete_pref_preset.xml
@@ -7,43 +7,43 @@
name="Delete Pref Preset"
save_rect="true"
title="DELETE PREF PRESET"
- width="550">
+ width="300">
<string name="title_graphic">Delete Graphic Preset</string>
<string name="title_camera">Delete Camera Preset</string>
<text
follows="top|left|right"
- font="SansSerif"
height="10"
layout="topleft"
- left="50"
+ left="20"
name="Preset"
- top="60"
- width="60">
- Preset:
+ top="30"
+ width="200">
+ Select a preset
</text>
<combo_box
follows="top|left"
layout="topleft"
- left_pad="10"
+ left="20"
name="preset_combo"
- top_delta="-5"
+ top_delta="20"
width="200"/>
<button
- follows="bottom|right"
+ follows="top|left"
height="23"
label="Delete"
layout="topleft"
- left_pad="15"
+ top_delta="40"
+ left="20"
name="delete"
width="70"/>
<button
- follows="bottom|right"
+ follows="top|left"
height="23"
label="Cancel"
layout="topleft"
- left_pad="5"
+ left_pad="20"
name="cancel"
width="70"/>
</floater>
diff --git a/indra/newview/skins/default/xui/en/floater_load_pref_preset.xml b/indra/newview/skins/default/xui/en/floater_load_pref_preset.xml
index fbca7bbe37..5f2eb770e2 100644
--- a/indra/newview/skins/default/xui/en/floater_load_pref_preset.xml
+++ b/indra/newview/skins/default/xui/en/floater_load_pref_preset.xml
@@ -7,43 +7,43 @@
name="Load Pref Preset"
save_rect="true"
title="LOAD PREF PRESET"
- width="550">
+ width="300">
<string name="title_graphic">Load Graphic Preset</string>
<string name="title_camera">Load Camera Preset</string>
<text
follows="top|left|right"
- font="SansSerif"
- height="10"
+ height="16"
layout="topleft"
- left="50"
+ left="20"
name="Preset"
- top="60"
- width="60">
- Preset:
+ top="30"
+ width="200">
+ Select a preset
</text>
<combo_box
follows="top|left"
layout="topleft"
- left_pad="10"
+ left="20"
name="preset_combo"
- top_delta="-5"
+ top_delta="20"
width="200"/>
<button
- follows="bottom|right"
+ follows="top|left"
height="23"
label="OK"
layout="topleft"
- left_pad="15"
+ top_delta="40"
+ left="20"
name="ok"
width="70"/>
<button
- follows="bottom|right"
+ follows="top|left"
height="23"
label="Cancel"
layout="topleft"
- left_pad="5"
+ left_pad="20"
name="cancel"
width="70"/>
</floater>
diff --git a/indra/newview/skins/default/xui/en/floater_save_pref_preset.xml b/indra/newview/skins/default/xui/en/floater_save_pref_preset.xml
index 0180d2f821..7dee28eff3 100644
--- a/indra/newview/skins/default/xui/en/floater_save_pref_preset.xml
+++ b/indra/newview/skins/default/xui/en/floater_save_pref_preset.xml
@@ -1,42 +1,43 @@
<?xml version="1.0" encoding="UTF-8"?>
<floater
legacy_header_height="18"
- height="130"
+ height="145"
help_topic="floater_save_preset"
layout="topleft"
name="Save Pref Preset"
save_rect="true"
title="SAVE PREF PRESET"
- width="550">
+ width="300">
<string name="title_graphic">Save Graphic Preset</string>
<string name="title_camera">Save Camera Preset</string>
<text
follows="top|left|right"
- font="SansSerif"
- height="10"
+ height="32"
layout="topleft"
- left="50"
+ word_wrap="true"
+ left="20"
name="Preset"
- top="60"
- width="60">
- Preset:
+ top="30"
+ width="200">
+ Type a name for the preset or choose an existing preset.
</text>
<combo_box
follows="top|left"
layout="topleft"
- left_pad="10"
+ left="20"
name="preset_combo"
- top_delta="-5"
+ top_delta="35"
allow_text_entry="true"
width="200"/>
<button
- follows="bottom|right"
+ follows="top|left"
height="23"
label="Save"
layout="topleft"
- left_pad="15"
+ top_delta="40"
+ left="20"
name="save"
width="70"/>
<button
@@ -44,7 +45,7 @@
height="23"
label="Cancel"
layout="topleft"
- left_pad="5"
+ left_pad="20"
name="cancel"
width="70"/>
</floater>
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 13e0593221..756c765bbd 100755
--- a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml
@@ -13,7 +13,6 @@
<!-- This block is always displayed -->
<text
follows="top|left|right"
- font="SansSerif"
height="16"
layout="topleft"
left="5"
@@ -24,7 +23,6 @@
<text
follows="top|left|right"
- font="SansSerif"
height="16"
layout="topleft"
left_delta="110"
@@ -482,20 +480,6 @@
Avatar
</text>
- <check_box
- control_name="RenderUseImpostors"
- height="16"
- initial_value="true"
- label="Impostors"
- layout="topleft"
- left="30"
- name="AvatarImpostors"
- top_delta="20"
- width="300">
- <check_box.commit_callback
- function="Pref.AvatarImpostorsEnable" />
- </check_box>
-
<slider
control_name="MaximumARC"
follows="left|top"
@@ -503,15 +487,15 @@
initial_value="101"
increment="1"
label="Maximum ARC:"
- label_width="165"
+ label_width="185"
layout="topleft"
- left="50"
+ left="30"
min_val="1"
max_val="101"
name="MaximumARC"
show_text="false"
top_delta="16"
- width="280">
+ width="300">
<slider.commit_callback
function="Pref.UpdateSliderText"
parameter="MaximumARCText" />
@@ -523,7 +507,7 @@
height="16"
layout="topleft"
top_delta="0"
- left_delta="284"
+ left_delta="304"
text_readonly_color="LabelDisabledColor"
name="MaximumARCText"
width="128">
@@ -538,14 +522,32 @@
increment="1"
initial_value="12"
label="Max. # of non-impostors:"
- label_width="165"
+ label_width="185"
layout="topleft"
- left="50"
+ left="30"
min_val="1"
- max_val="65"
+ max_val="66"
name="MaxNumberAvatarDrawn"
+ show_text="false"
top_delta="16"
- width="305" />
+ width="300">
+ <slider.commit_callback
+ function="Pref.UpdateSliderText"
+ parameter="ImpostorsText" />
+ </slider>
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="16"
+ layout="topleft"
+ top_delta="0"
+ left_delta="304"
+ text_readonly_color="LabelDisabledColor"
+ name="ImpostorsText"
+ width="128">
+ 0
+ </text>
<slider
control_name="RenderAvatarLODFactor"
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index c09129c867..c0a8866549 100755
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -4045,6 +4045,6 @@ Try enclosing path to the editor with double quotes.
<!-- Presets graphic/camera -->
<string name="preset_combo_label">-Empty list-</string>
<string name="Default">Default</string>
- <string name="Off">Off</string>
<string name="none_paren_cap">(None)</string>
+ <string name="no_limit">No Limit</string>
</strings>