aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llprefsadvanced.cpp32
-rw-r--r--linden/indra/newview/llprefsadvanced.h2
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/panel_preferences_advanced.xml10
3 files changed, 37 insertions, 7 deletions
diff --git a/linden/indra/newview/llprefsadvanced.cpp b/linden/indra/newview/llprefsadvanced.cpp
index 2ad8de2..ee90518 100644
--- a/linden/indra/newview/llprefsadvanced.cpp
+++ b/linden/indra/newview/llprefsadvanced.cpp
@@ -40,6 +40,7 @@
40LLPrefsAdvanced::LLPrefsAdvanced() 40LLPrefsAdvanced::LLPrefsAdvanced()
41{ 41{
42 LLUICtrlFactory::getInstance()->buildPanel(this, "panel_preferences_advanced.xml"); 42 LLUICtrlFactory::getInstance()->buildPanel(this, "panel_preferences_advanced.xml");
43 childSetCommitCallback("speed_rez_check", onCommitCheckBox, this);
43} 44}
44 45
45LLPrefsAdvanced::~LLPrefsAdvanced() 46LLPrefsAdvanced::~LLPrefsAdvanced()
@@ -54,10 +55,12 @@ BOOL LLPrefsAdvanced::postBuild()
54 childSetValue("client_name_tag_check", gSavedSettings.getBOOL("ShowClientNameTag")); 55 childSetValue("client_name_tag_check", gSavedSettings.getBOOL("ShowClientNameTag"));
55 childSetValue("client_name_tag_broadcast_check", gSavedSettings.getBOOL("ClothingLayerProtection")); 56 childSetValue("client_name_tag_broadcast_check", gSavedSettings.getBOOL("ClothingLayerProtection"));
56 childSetValue("http_texture_check", gSavedSettings.getBOOL("ImagePipelineUseHTTP")); 57 childSetValue("http_texture_check", gSavedSettings.getBOOL("ImagePipelineUseHTTP"));
57 childSetValue("speedrez_check", gSavedSettings.getBOOL("SpeedRez")); 58 childSetValue("speed_rez_check", gSavedSettings.getBOOL("SpeedRez"));
58 childSetValue("speedrez_spinner", (F32)gSavedSettings.getU32("SpeedRezInterval")); 59 childSetValue("speed_rez_interval_spinner", (F32)gSavedSettings.getU32("SpeedRezInterval"));
59 childSetValue("appearance_stand_check", gSavedSettings.getBOOL("AppearanceForceStand")); 60 childSetValue("appearance_stand_check", gSavedSettings.getBOOL("AppearanceForceStand"));
60 61
62 refresh();
63
61 return TRUE; 64 return TRUE;
62} 65}
63 66
@@ -67,8 +70,8 @@ void LLPrefsAdvanced::apply()
67 gSavedSettings.setBOOL("DisableTeleportScreens", childGetValue("disable_tp_screen_check")); 70 gSavedSettings.setBOOL("DisableTeleportScreens", childGetValue("disable_tp_screen_check"));
68 gSavedSettings.setBOOL("ShowClientNameTag", childGetValue("client_name_tag_check")); 71 gSavedSettings.setBOOL("ShowClientNameTag", childGetValue("client_name_tag_check"));
69 gSavedSettings.setBOOL("ImagePipelineUseHTTP", childGetValue("http_texture_check")); 72 gSavedSettings.setBOOL("ImagePipelineUseHTTP", childGetValue("http_texture_check"));
70 gSavedSettings.setBOOL("SpeedRez", childGetValue("speedrez_check")); 73 gSavedSettings.setBOOL("SpeedRez", childGetValue("speed_rez_check"));
71 gSavedSettings.setU32("SpeedRezInterval", childGetValue("speedrez_spinner").asReal()); 74 gSavedSettings.setU32("SpeedRezInterval", childGetValue("speed_rez_interval_spinner").asReal());
72 gSavedSettings.setBOOL("AppearanceForceStand", childGetValue("appearance_stand_check")); 75 gSavedSettings.setBOOL("AppearanceForceStand", childGetValue("appearance_stand_check"));
73 76
74 // Need to force a rebake when ClothingLayerProtection toggled for it take effect -- MC 77 // Need to force a rebake when ClothingLayerProtection toggled for it take effect -- MC
@@ -119,3 +122,24 @@ void LLPrefsAdvanced::apply()
119void LLPrefsAdvanced::cancel() 122void LLPrefsAdvanced::cancel()
120{ 123{
121} 124}
125
126void LLPrefsAdvanced::refresh()
127{
128 if (childGetValue("speed_rez_check").asBoolean())
129 {
130 childEnable("speed_rez_interval_spinner");
131 childEnable("speed_rez_seconds_text");
132 }
133 else
134 {
135 childDisable("speed_rez_interval_spinner");
136 childDisable("speed_rez_seconds_text");
137 }
138}
139
140//static
141void LLPrefsAdvanced::onCommitCheckBox(LLUICtrl* ctrl, void* user_data)
142{
143 LLPrefsAdvanced* self = (LLPrefsAdvanced*)user_data;
144 self->refresh();
145}
diff --git a/linden/indra/newview/llprefsadvanced.h b/linden/indra/newview/llprefsadvanced.h
index 382156e..37fd050 100644
--- a/linden/indra/newview/llprefsadvanced.h
+++ b/linden/indra/newview/llprefsadvanced.h
@@ -43,8 +43,10 @@ public:
43 43
44 void apply(); 44 void apply();
45 void cancel(); 45 void cancel();
46 void refresh();
46 47
47private: 48private:
49 static void onCommitCheckBox(LLUICtrl* ctrl, void* user_data);
48}; 50};
49 51
50#endif // LLPREFSADVANCED_H 52#endif // LLPREFSADVANCED_H
diff --git a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_advanced.xml b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_advanced.xml
index fa33055..9e19dfc 100644
--- a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_advanced.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_advanced.xml
@@ -33,12 +33,16 @@
33 <check_box bottom_delta="-18" enabled="true" follows="left|top" 33 <check_box bottom_delta="-18" enabled="true" follows="left|top"
34 font="SansSerifSmall" height="16" initial_value="false" 34 font="SansSerifSmall" height="16" initial_value="false"
35 label="Increase rez speed via draw distance stepping" left="12" mouse_opaque="true" 35 label="Increase rez speed via draw distance stepping" left="12" mouse_opaque="true"
36 name="speedrez_check" radio_style="false" width="217" /> 36 name="speed_rez_check" radio_style="false" width="217" />
37 <spinner bottom_delta="-18" decimal_digits="0" 37 <spinner bottom_delta="-18" decimal_digits="0"
38 tool_tip="Interval in seconds between each draw distance increment" 38 tool_tip="Interval in seconds between each draw distance increment"
39 follows="left|top" height="16" increment="1" initial_val="12" 39 follows="left|top" height="16" increment="1" initial_val="12"
40 label="Step interval (seconds)" label_width="130" left_delta="0" max_val="20" 40 label="Step interval every" label_width="105" left_delta="20" max_val="20"
41 min_val="1" mouse_opaque="true" name="spinner_decimal" width="170" /> 41 min_val="1" mouse_opaque="true" name="speed_rez_interval_spinner" width="145" />
42 <text bottom_delta="0" follows="top|left" height="15" left_delta="150"
43 name="speed_rez_seconds_text" width="115">
44 seconds
45 </text>
42 <check_box bottom_delta="-25" enabled="true" follows="left|top" 46 <check_box bottom_delta="-25" enabled="true" follows="left|top"
43 font="SansSerifSmall" height="16" initial_value="false" 47 font="SansSerifSmall" height="16" initial_value="false"
44 label="Stand when editing appearance" left="12" mouse_opaque="true" 48 label="Stand when editing appearance" left="12" mouse_opaque="true"