aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra
diff options
context:
space:
mode:
authorMcCabe Maxsted2010-04-09 22:31:27 -0700
committerMcCabe Maxsted2010-04-09 22:32:37 -0700
commit0d853708bf1ae4d5162fc7826301820bdcf5cd0b (patch)
tree42763a4ea3116417bf21bcc84dee3b0350dd1b01 /linden/indra
parentAdded a first use notification to the AO (diff)
downloadmeta-impy-0d853708bf1ae4d5162fc7826301820bdcf5cd0b.zip
meta-impy-0d853708bf1ae4d5162fc7826301820bdcf5cd0b.tar.gz
meta-impy-0d853708bf1ae4d5162fc7826301820bdcf5cd0b.tar.bz2
meta-impy-0d853708bf1ae4d5162fc7826301820bdcf5cd0b.tar.xz
Added ugly checkbox to toggle shadows in Preferences > Advanced
Diffstat (limited to 'linden/indra')
-rw-r--r--linden/indra/newview/app_settings/settings.xml11
-rw-r--r--linden/indra/newview/llprefsadvanced.cpp31
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/notifications.xml7
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/panel_preferences_advanced.xml13
4 files changed, 59 insertions, 3 deletions
diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml
index 072a0f4..8984e04 100644
--- a/linden/indra/newview/app_settings/settings.xml
+++ b/linden/indra/newview/app_settings/settings.xml
@@ -37,6 +37,17 @@
37 <key>Value</key> 37 <key>Value</key>
38 <integer>0</integer> 38 <integer>0</integer>
39 </map> 39 </map>
40 <key>ShadowsEnabled</key>
41 <map>
42 <key>Comment</key>
43 <string>Whether or not shadows have been enabled (does not actually toggle them)</string>
44 <key>Persist</key>
45 <integer>1</integer>
46 <key>Type</key>
47 <string>Boolean</string>
48 <key>Value</key>
49 <integer>0</integer>
50 </map>
40 <key>ShowStatusBarInMouselook</key> 51 <key>ShowStatusBarInMouselook</key>
41 <map> 52 <map>
42 <key>Comment</key> 53 <key>Comment</key>
diff --git a/linden/indra/newview/llprefsadvanced.cpp b/linden/indra/newview/llprefsadvanced.cpp
index 1ecc0ec..88f066c 100644
--- a/linden/indra/newview/llprefsadvanced.cpp
+++ b/linden/indra/newview/llprefsadvanced.cpp
@@ -59,6 +59,37 @@ void LLPrefsAdvanced::apply()
59 gSavedSettings.setBOOL("DisableLoginLogoutScreens", childGetValue("disable_log_screen_check")); 59 gSavedSettings.setBOOL("DisableLoginLogoutScreens", childGetValue("disable_log_screen_check"));
60 gSavedSettings.setBOOL("DisableTeleportScreens", childGetValue("disable_tp_screen_check")); 60 gSavedSettings.setBOOL("DisableTeleportScreens", childGetValue("disable_tp_screen_check"));
61 gSavedSettings.setBOOL("ClothingLayerProtection", childGetValue("client_name_tag_check")); 61 gSavedSettings.setBOOL("ClothingLayerProtection", childGetValue("client_name_tag_check"));
62
63 // This is bad bad BAD UI from Emerald, I know.
64 // If anyone wants to do this better, please do -- MC
65 if ( childGetValue("shadows_check").asBoolean() )
66 {
67 if ( (gSavedSettings.getU32("RenderQualityPerformance") < 3) // Make sure we have everything enabled
68 || !gSavedSettings.getBOOL("WindLightUseAtmosShaders")
69 || !gSavedSettings.getBOOL("VertexShaderEnable") )
70 {
71 childSetValue("shadows_check", FALSE);
72 LLNotifications::instance().add("NoShadows");
73 llwarns << "Attempting to enable shadow rendering while graphics settings less than Ultra or shaders are missing!" << llendl;
74 }
75 else if ( (gSavedSettings.getBOOL("WindLightUseAtmosShaders") // If we do, toggle shadows in the correct order
76 && gSavedSettings.getBOOL("VertexShaderEnable")) )
77 {
78 gSavedSettings.setBOOL("RenderUseFBO", childGetValue("shadows_check").asBoolean());
79 gSavedSettings.setBOOL("RenderDeferred", childGetValue("shadows_check").asBoolean());
80 llinfos << "Shadow rendering enabled" << llendl;
81 }
82 }
83 else if (!childGetValue("shadows_check").asBoolean())
84 {
85 if (gSavedSettings.getBOOL("RenderDeferred"))
86 {
87 gSavedSettings.setBOOL("RenderDeferred", childGetValue("shadows_check").asBoolean());
88 gSavedSettings.setBOOL("RenderUseFBO", childGetValue("shadows_check").asBoolean());
89 llinfos << "Shadow rendering disabled" << llendl;
90 }
91 }
92 gSavedSettings.setBOOL("ShadowsEnabled", childGetValue("shadows_check").asBoolean());
62} 93}
63 94
64void LLPrefsAdvanced::cancel() 95void LLPrefsAdvanced::cancel()
diff --git a/linden/indra/newview/skins/default/xui/en-us/notifications.xml b/linden/indra/newview/skins/default/xui/en-us/notifications.xml
index 9e97930..b35ee4f 100644
--- a/linden/indra/newview/skins/default/xui/en-us/notifications.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/notifications.xml
@@ -6678,6 +6678,13 @@ Go to the Official Imprudence Forums to discuss the Imprudence Project.
6678 Use the toolbar to toggle the AO on/off. 6678 Use the toolbar to toggle the AO on/off.
6679 </notification> 6679 </notification>
6680 6680
6681 <notification
6682 icon="notifytip.tga"
6683 name="NoShadows"
6684 type="notifytip">
6685 Shadows cannot be enabled due to your graphics settings being set too low. Make sure your graphics settings are set to Ultra with Basic and Atmospheric Shaders enabled.
6686 </notification>
6687
6681 6688
6682 <!--End Imprudence notifications--> 6689 <!--End Imprudence notifications-->
6683 6690
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 417097d..39a3111 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
@@ -2,6 +2,9 @@
2<panel border="true" bottom="-409" enabled="true" follows="left|top|right|bottom" 2<panel border="true" bottom="-409" enabled="true" follows="left|top|right|bottom"
3 height="408" label="Advanced" left="102" mouse_opaque="true" 3 height="408" label="Advanced" left="102" mouse_opaque="true"
4 name="advanced_panel" width="517"> 4 name="advanced_panel" width="517">
5
6 <!-- Start organizing these when we get enough of 'em - MC -->
7
5 <check_box bottom="-20" enabled="true" 8 <check_box bottom="-20" enabled="true"
6 follows="left|top" font="SansSerifSmall" height="16" 9 follows="left|top" font="SansSerifSmall" height="16"
7 initial_value="false" label="Disable Login/Logout Screens" left="12" 10 initial_value="false" label="Disable Login/Logout Screens" left="12"
@@ -12,7 +15,11 @@
12 label="Disable Teleport Screens" left="12" mouse_opaque="true" 15 label="Disable Teleport Screens" left="12" mouse_opaque="true"
13 name="disable_tp_screen_check" radio_style="false" width="217" /> 16 name="disable_tp_screen_check" radio_style="false" width="217" />
14 <check_box bottom_delta="-25" enabled="true" follows="left|top" 17 <check_box bottom_delta="-25" enabled="true" follows="left|top"
15 font="SansSerifSmall" height="16" initial_value="false" 18 font="SansSerifSmall" height="16" initial_value="false"
16 label="Show Client Names in Name Tag" left="12" mouse_opaque="true" 19 label="Show Client Names in Name Tag" left="12" mouse_opaque="true"
17 name="client_name_tag_check" radio_style="false" width="217" /> 20 name="client_name_tag_check" radio_style="false" width="217" />
21 <check_box bottom_delta="-25" enabled="true" follows="left|top"
22 font="SansSerifSmall" height="16" initial_value="false"
23 label="Enable Shadows (WARNING: unstable and requires Ultra graphics)" left="12" mouse_opaque="true"
24 name="shadows_check" radio_style="false" width="217" />
18</panel> 25</panel>