aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llcontroldef.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:45:04 -0500
committerJacek Antonelli2008-08-15 23:45:04 -0500
commit117e22047c5752352342d64e3fb7ce00a4eb8113 (patch)
treee32de2cfba0dda8705ae528fcd1fbe23ba075685 /linden/indra/newview/llcontroldef.cpp
parentSecond Life viewer sources 1.18.0.6 (diff)
downloadmeta-impy-117e22047c5752352342d64e3fb7ce00a4eb8113.zip
meta-impy-117e22047c5752352342d64e3fb7ce00a4eb8113.tar.gz
meta-impy-117e22047c5752352342d64e3fb7ce00a4eb8113.tar.bz2
meta-impy-117e22047c5752352342d64e3fb7ce00a4eb8113.tar.xz
Second Life viewer sources 1.18.1.2
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llcontroldef.cpp604
1 files changed, 589 insertions, 15 deletions
diff --git a/linden/indra/newview/llcontroldef.cpp b/linden/indra/newview/llcontroldef.cpp
index 7481d99..dffaa36 100644
--- a/linden/indra/newview/llcontroldef.cpp
+++ b/linden/indra/newview/llcontroldef.cpp
@@ -43,6 +43,33 @@
43#include "v3color.h" 43#include "v3color.h"
44#include "llfirstuse.h" 44#include "llfirstuse.h"
45 45
46// For Listeners
47#include "audioengine.h"
48#include "llagent.h"
49#include "llconsole.h"
50#include "lldrawpoolterrain.h"
51#include "llflexibleobject.h"
52#include "llglslshader.h"
53#include "llmediaengine.h"
54#include "llpanelgeneral.h"
55#include "llpanelinput.h"
56#include "llsky.h"
57#include "llviewerimagelist.h"
58#include "llviewerthrottle.h"
59#include "llviewerwindow.h"
60#include "llvoavatar.h"
61#include "llvosky.h"
62#include "llvotree.h"
63#include "llvovolume.h"
64#include "llworld.h"
65#include "pipeline.h"
66#include "viewer.h"
67#include "llviewerjoystick.h"
68#include "llviewerparcelmgr.h"
69#include "llparcel.h"
70#include "llnotify.h"
71#include "llkeyboard.h"
72
46void declare_settings() 73void declare_settings()
47{ 74{
48 // Somewhat under 1024 by 768 75 // Somewhat under 1024 by 768
@@ -61,7 +88,7 @@ void declare_settings()
61 gSavedSettings.declareColor4("SystemChatColor", LLColor4(0.8f, 1.f, 1.f, 1.f), "Color of chat messages from SL System"); 88 gSavedSettings.declareColor4("SystemChatColor", LLColor4(0.8f, 1.f, 1.f, 1.f), "Color of chat messages from SL System");
62 gSavedSettings.declareColor4("AgentChatColor", LLColor4(1.0f, 1.0f, 1.0f, 1.0f), "Color of chat messages from other residents"); 89 gSavedSettings.declareColor4("AgentChatColor", LLColor4(1.0f, 1.0f, 1.0f, 1.0f), "Color of chat messages from other residents");
63 gSavedSettings.declareColor4("ObjectChatColor", LLColor4(0.7f, 0.9f, 0.7f, 1.0f), "Color of chat messages from objects"); 90 gSavedSettings.declareColor4("ObjectChatColor", LLColor4(0.7f, 0.9f, 0.7f, 1.0f), "Color of chat messages from objects");
64 gSavedSettings.declareColor4("llOwnerSayChatColor", LLColor4(0.7f, 0.0f, 0.7f, 1.0f), "Color of chat messages from objects only visible to the owner"); 91 gSavedSettings.declareColor4("llOwnerSayChatColor", LLColor4(0.99f, 0.99f, 0.69f, 1.0f), "Color of chat messages from objects only visible to the owner");
65 gSavedSettings.declareColor4("BackgroundChatColor", LLColor4(0.f, 0.f, 0.f, 1.0f), "Color of chat bubble background"); 92 gSavedSettings.declareColor4("BackgroundChatColor", LLColor4(0.f, 0.f, 0.f, 1.0f), "Color of chat bubble background");
66 gSavedSettings.declareColor4("ScriptErrorColor", LLColor4(0.82f, 0.82f, 0.99f, 1.0f), "Color of script error messages"); 93 gSavedSettings.declareColor4("ScriptErrorColor", LLColor4(0.82f, 0.82f, 0.99f, 1.0f), "Color of script error messages");
67 gSavedSettings.declareColor4("HTMLLinkColor", LLColor4(0.6f, 0.6f, 1.0f, 1.0f), "Color of hyperlinks"); 94 gSavedSettings.declareColor4("HTMLLinkColor", LLColor4(0.6f, 0.6f, 1.0f, 1.0f), "Color of hyperlinks");
@@ -237,6 +264,75 @@ void declare_settings()
237 264
238 gSavedSettings.declareBOOL("ChatShowTimestamps", TRUE, "Show timestamps in chat"); 265 gSavedSettings.declareBOOL("ChatShowTimestamps", TRUE, "Show timestamps in chat");
239 266
267 gSavedSettings.declareBOOL("EnableVoiceChat", FALSE, "Enable talking to other residents with a microphone");
268 gSavedSettings.declareBOOL("VoiceCallsFriendsOnly", FALSE, "Only accept voice calls from residents on your friends list");
269 gSavedSettings.declareBOOL("PTTCurrentlyEnabled", TRUE, "", NO_PERSIST);
270 gSavedSettings.declareBOOL("EnablePushToTalk", TRUE, "Must hold down a key or moouse button when talking into your microphone");
271 gSavedSettings.declareString("PushToTalkButton", "MiddleMouse", "Which button or keyboard key is used for push-to-talk");
272 gSavedSettings.declareBOOL("PushToTalkToggle", FALSE, "Should the push-to-talk button behave as a toggle");
273 gSavedSettings.declareS32("VoiceEarLocation", 0, "Location of the virtual ear for voice");
274 gSavedSettings.declareString("VivoxDebugServerName", "bhd.vivox.com", "Hostname of the vivox account server to use for voice when not connected to Agni.");
275 gSavedSettings.declareColor4("SpeakingColor", LLColor4(0.f, 1.f, 0.f, 1.f), "Color of various indicators when resident is speaking on a voice channel.");
276 gSavedSettings.declareColor4("OverdrivenColor", LLColor4(1.f, 0.f, 0.f, 1.f), "Color of various indicators when resident is speaking too loud.");
277 gSavedSettings.declareString("VoiceInputAudioDevice", "Default", "Audio input device to use for voice");
278 gSavedSettings.declareString("VoiceOutputAudioDevice", "Default", "Audio output device to use for voice");
279 gSavedSettings.declareString("VivoxDebugLevel", "-1", "Logging level to use when launching the vivox daemon");
280
281 //voice amplitude images;
282
283 /*
284 gSavedSettings.declareString("VoiceImageLevel0", "5b41b4c3-eb70-0f0f-17d9-1765cbd07d39", "Texture UUID for voice image level 0");
285 gSavedSettings.declareString("VoiceImageLevel1", "b06ffd0a-7bfe-0449-0bbc-df291f1857c4", "Texture UUID for voice image level 1");
286 gSavedSettings.declareString("VoiceImageLevel2", "bfa16494-b731-5b59-3260-9e4fd29d63f7", "Texture UUID for voice image level 2");
287 gSavedSettings.declareString("VoiceImageLevel3", "6951074f-de1d-3c55-cb2f-e972877f7f81", "Texture UUID for voice image level 3");
288 gSavedSettings.declareString("VoiceImageLevel4", "ce3df80a-f0c5-a7cb-f5bc-d3bb38949d0d", "Texture UUID for voice image level 4");
289 gSavedSettings.declareString("VoiceImageLevel5", "8d0e359c-5cea-bdf5-b6b0-32d2fea6355c", "Texture UUID for voice image level 5");
290 gSavedSettings.declareString("VoiceImageLevel6", "ad9e64e0-a763-5d8c-f2e8-7b5dfdb7f20f", "Texture UUID for voice image level 6");
291 */
292
293 /*
294 // Jeffrey's first version
295 gSavedSettings.declareString("VoiceImageLevel0", "5b41b4c3-eb70-0f0f-17d9-1765cbd07d39", "Texture UUID for voice image level 0");
296 gSavedSettings.declareString("VoiceImageLevel1", "cde76ae8-0044-d575-8e2c-65fb0a14cbde", "Texture UUID for voice image level 1");
297 gSavedSettings.declareString("VoiceImageLevel2", "cde76ae8-0044-d575-8e2c-65fb0a14cbde", "Texture UUID for voice image level 2");
298 gSavedSettings.declareString("VoiceImageLevel3", "cde76ae8-0044-d575-8e2c-65fb0a14cbde", "Texture UUID for voice image level 3");
299 gSavedSettings.declareString("VoiceImageLevel4", "cde76ae8-0044-d575-8e2c-65fb0a14cbde", "Texture UUID for voice image level 4");
300 gSavedSettings.declareString("VoiceImageLevel5", "cde76ae8-0044-d575-8e2c-65fb0a14cbde", "Texture UUID for voice image level 5");
301 gSavedSettings.declareString("VoiceImageLevel6", "cde76ae8-0044-d575-8e2c-65fb0a14cbde", "Texture UUID for voice image level 6");
302 */
303
304 // Brent's first version
305 /*
306 gSavedSettings.declareString("VoiceImageLevel0", "5b41b4c3-eb70-0f0f-17d9-1765cbd07d39", "Texture UUID for voice image level 0");
307 gSavedSettings.declareString("VoiceImageLevel1", "72365124-c7a7-a1f9-3d7a-d8e521eb5011", "Texture UUID for voice image level 1");
308 gSavedSettings.declareString("VoiceImageLevel2", "72365124-c7a7-a1f9-3d7a-d8e521eb5011", "Texture UUID for voice image level 2");
309 gSavedSettings.declareString("VoiceImageLevel3", "72365124-c7a7-a1f9-3d7a-d8e521eb5011", "Texture UUID for voice image level 3");
310 gSavedSettings.declareString("VoiceImageLevel4", "72365124-c7a7-a1f9-3d7a-d8e521eb5011", "Texture UUID for voice image level 4");
311 gSavedSettings.declareString("VoiceImageLevel5", "72365124-c7a7-a1f9-3d7a-d8e521eb5011", "Texture UUID for voice image level 5");
312 gSavedSettings.declareString("VoiceImageLevel6", "72365124-c7a7-a1f9-3d7a-d8e521eb5011", "Texture UUID for voice image level 6");
313 */
314
315 /*
316 // Brent's second version
317 gSavedSettings.declareString("VoiceImageLevel0", "5b41b4c3-eb70-0f0f-17d9-1765cbd07d39", "Texture UUID for voice image level 0");
318 gSavedSettings.declareString("VoiceImageLevel1", "4ee6a7ac-472e-b5ff-7125-f6213798cbee", "Texture UUID for voice image level 1");
319 gSavedSettings.declareString("VoiceImageLevel2", "4ee6a7ac-472e-b5ff-7125-f6213798cbee", "Texture UUID for voice image level 2");
320 gSavedSettings.declareString("VoiceImageLevel3", "4ee6a7ac-472e-b5ff-7125-f6213798cbee", "Texture UUID for voice image level 3");
321 gSavedSettings.declareString("VoiceImageLevel4", "4ee6a7ac-472e-b5ff-7125-f6213798cbee", "Texture UUID for voice image level 4");
322 gSavedSettings.declareString("VoiceImageLevel5", "4ee6a7ac-472e-b5ff-7125-f6213798cbee", "Texture UUID for voice image level 5");
323 gSavedSettings.declareString("VoiceImageLevel6", "4ee6a7ac-472e-b5ff-7125-f6213798cbee", "Texture UUID for voice image level 6");
324 */
325
326 // Jeffrey's tweak on 4/9/07
327 gSavedSettings.declareString("VoiceImageLevel0", "041ee5a0-cb6a-9ac5-6e49-41e9320507d5", "Texture UUID for voice image level 0");
328 gSavedSettings.declareString("VoiceImageLevel1", "29de489d-0491-fb00-7dab-f9e686d31e83", "Texture UUID for voice image level 1");
329 gSavedSettings.declareString("VoiceImageLevel2", "29de489d-0491-fb00-7dab-f9e686d31e83", "Texture UUID for voice image level 2");
330 gSavedSettings.declareString("VoiceImageLevel3", "29de489d-0491-fb00-7dab-f9e686d31e83", "Texture UUID for voice image level 3");
331 gSavedSettings.declareString("VoiceImageLevel4", "29de489d-0491-fb00-7dab-f9e686d31e83", "Texture UUID for voice image level 4");
332 gSavedSettings.declareString("VoiceImageLevel5", "29de489d-0491-fb00-7dab-f9e686d31e83", "Texture UUID for voice image level 5");
333 gSavedSettings.declareString("VoiceImageLevel6", "29de489d-0491-fb00-7dab-f9e686d31e83", "Texture UUID for voice image level 6");
334
335
240 //------------------------------------------------------------------------ 336 //------------------------------------------------------------------------
241 // Caution Script Permission Prompts 337 // Caution Script Permission Prompts
242 //------------------------------------------------------------------------ 338 //------------------------------------------------------------------------
@@ -419,6 +515,7 @@ void declare_settings()
419 gSavedSettings.declareBOOL("CloseChatOnReturn", FALSE, "Close chat after hitting return"); 515 gSavedSettings.declareBOOL("CloseChatOnReturn", FALSE, "Close chat after hitting return");
420 516
421 // Copy IM messages into chat history 517 // Copy IM messages into chat history
518 gSavedSettings.declareBOOL("ChatHistoryTornOff", FALSE, "Show chat history window separately from Communicate window.");
422 gSavedSettings.declareBOOL("IMInChatHistory", FALSE, "Copy IM into chat history"); 519 gSavedSettings.declareBOOL("IMInChatHistory", FALSE, "Copy IM into chat history");
423 gSavedSettings.declareBOOL("IMShowTimestamps", TRUE, "Show timestamps in IM"); 520 gSavedSettings.declareBOOL("IMShowTimestamps", TRUE, "Show timestamps in IM");
424 521
@@ -591,11 +688,10 @@ void declare_settings()
591 688
592 gSavedSettings.declareBOOL("ShowLeaders", FALSE, "", NO_PERSIST); 689 gSavedSettings.declareBOOL("ShowLeaders", FALSE, "", NO_PERSIST);
593 gSavedSettings.declareBOOL("ShowDirectory", FALSE, "", NO_PERSIST); 690 gSavedSettings.declareBOOL("ShowDirectory", FALSE, "", NO_PERSIST);
594 gSavedSettings.declareBOOL("ShowFriends", FALSE, "", NO_PERSIST);
595 691
596 gSavedSettings.declareBOOL("AutoLoadWebProfiles", FALSE, "Automatically load ALL profile webpages without asking first."); 692 gSavedSettings.declareBOOL("AutoLoadWebProfiles", FALSE, "Automatically load ALL profile webpages without asking first.");
597 693
598 gSavedSettings.declareBOOL("ShowIM", FALSE, "", NO_PERSIST); 694 gSavedSettings.declareBOOL("ShowCommunicate", FALSE, "", NO_PERSIST);
599 gSavedSettings.declareBOOL("ShowChatHistory", FALSE, "", NO_PERSIST); 695 gSavedSettings.declareBOOL("ShowChatHistory", FALSE, "", NO_PERSIST);
600 696
601#ifdef LL_RELEASE_FOR_DOWNLOAD 697#ifdef LL_RELEASE_FOR_DOWNLOAD
@@ -636,6 +732,7 @@ void declare_settings()
636 LLFirstUse::addConfigVariable("FirstStreamingMusic"); 732 LLFirstUse::addConfigVariable("FirstStreamingMusic");
637 LLFirstUse::addConfigVariable("FirstStreamingVideo"); 733 LLFirstUse::addConfigVariable("FirstStreamingVideo");
638 LLFirstUse::addConfigVariable("FirstSculptedPrim"); 734 LLFirstUse::addConfigVariable("FirstSculptedPrim");
735 LLFirstUse::addConfigVariable("FirstVoice");
639 736
640 gSavedSettings.declareBOOL("ShowDebugConsole", FALSE, "Show log in SL window"); 737 gSavedSettings.declareBOOL("ShowDebugConsole", FALSE, "Show log in SL window");
641 gSavedSettings.declareBOOL("ShowDebugStats", FALSE, "Show performance stats display"); 738 gSavedSettings.declareBOOL("ShowDebugStats", FALSE, "Show performance stats display");
@@ -797,6 +894,9 @@ void declare_settings()
797 894
798 //gSavedSettings.declareS32("BWRadio", 0, "[NOT USED]"); 895 //gSavedSettings.declareS32("BWRadio", 0, "[NOT USED]");
799 896
897 gSavedSettings.declareRect("ChatterboxRect", LLRect(0, 400, 350, 0), "Rectangle for chatterbox window");
898 gSavedSettings.declareRect("FloaterActiveSpeakersRect", LLRect(0, 300, 250, 0), "Rectangle for active speakers window");
899
800 // Avatar customizing floaters 900 // Avatar customizing floaters
801 gSavedSettings.declareRect("FloaterCustomizeAppearanceRect", LLRect(0, 540, 494, 0), "Rectangle for avatar customization window"); 901 gSavedSettings.declareRect("FloaterCustomizeAppearanceRect", LLRect(0, 540, 494, 0), "Rectangle for avatar customization window");
802 902
@@ -923,6 +1023,9 @@ void declare_settings()
923 // Script Panel 1023 // Script Panel
924 //gSavedSettings.declareRect("ScriptPanelRect", LLRect(250, 175 + 400, 250 + 400, 175), "[NOT USED]"); 1024 //gSavedSettings.declareRect("ScriptPanelRect", LLRect(250, 175 + 400, 250 + 400, 175), "[NOT USED]");
925 1025
1026 // volume floater
1027 gSavedSettings.declareRect("FloaterAudioVolumeRect", LLRect(0, 440, 470, 0), "Rectangle for Audio Volume window");
1028
926 // Radio button sets 1029 // Radio button sets
927 gSavedSettings.declareU32("AvatarSex", 0, "", NO_PERSIST); 1030 gSavedSettings.declareU32("AvatarSex", 0, "", NO_PERSIST);
928 1031
@@ -1012,16 +1115,20 @@ void declare_settings()
1012 gSavedSettings.declareRect("HtmlFindRect", LLRect(16,650,600,128), "Rectangle for HTML find window"); 1115 gSavedSettings.declareRect("HtmlFindRect", LLRect(16,650,600,128), "Rectangle for HTML find window");
1013 1116
1014 // Audio 1117 // Audio
1015 gSavedSettings.declareF32("AudioLevelDistance", 1.0f, "Scale factor for audio engine (multiple of world scale, 2.0 = audio falls off twice as fast)");
1016 gSavedSettings.declareF32("AudioLevelDoppler", 1.0f, "Scale of doppler effect on moving audio sources (1.0 = normal, <1.0 = diminished doppler effect, >1.0 = enhanced doppler effect)");
1017 gSavedSettings.declareF32("AudioLevelFootsteps", 0.15f, "Relative audio level of footstep sound effects");
1018 gSavedSettings.declareF32("AudioLevelMaster", 1.0f, "Master audio level, or overall volume"); 1118 gSavedSettings.declareF32("AudioLevelMaster", 1.0f, "Master audio level, or overall volume");
1119 gSavedSettings.declareF32("AudioLevelSFX", 1.0f, "Audio level of in-world sound effects");
1120 gSavedSettings.declareF32("AudioLevelAmbient",0.5f, "Audio level of environment sounds");
1121 gSavedSettings.declareF32("AudioLevelUI", 0.5f, "Audio level of UI sound effects");
1019 gSavedSettings.declareF32("AudioLevelMusic", 1.0f, "Audio level of streaming music"); 1122 gSavedSettings.declareF32("AudioLevelMusic", 1.0f, "Audio level of streaming music");
1020 gSavedSettings.declareF32("MediaAudioVolume", 1.0f, "Audio level of Quicktime movies"); 1123 gSavedSettings.declareF32("AudioLevelVoice", 1.0f, "Audio level of voice chat");
1124 gSavedSettings.declareF32("AudioLevelMedia", 1.0f, "Audio level of Quicktime movies");
1125 gSavedSettings.declareF32("AudioLevelMic", 1.0f, "Audio level of microphone input");
1126
1127// gSavedSettings.declareF32("MediaAudioVolume", 1.0f, "Audio level of Quicktime movies"); // removed
1128
1129 gSavedSettings.declareF32("AudioLevelDistance", 1.0f, "Scale factor for audio engine (multiple of world scale, 2.0 = audio falls off twice as fast)");
1130 gSavedSettings.declareF32("AudioLevelDoppler", 1.0f, "Scale of doppler effect on moving audio sources (1.0 = normal, <1.0 = diminished doppler effect, >1.0 = enhanced doppler effect)");
1021 gSavedSettings.declareF32("AudioLevelRolloff", 1.0f, "Controls the distance-based dropoff of audio volume (fraction or multiple of default audio rolloff)"); 1131 gSavedSettings.declareF32("AudioLevelRolloff", 1.0f, "Controls the distance-based dropoff of audio volume (fraction or multiple of default audio rolloff)");
1022 gSavedSettings.declareF32("AudioLevelUI", 0.5f, "Audio level of UI sound effects");
1023 //gSavedSettings.declareF32("AudioLevelWater", 0.0f, "[NOT USED]");
1024 gSavedSettings.declareF32("AudioLevelWind", 0.5f, "Audio level of wind sound effect");
1025 1132
1026 gSavedSettings.declareS32("AudioDefaultBitrate", 64, "Data streaming rate of uploaded audio samples (thousands of bits per second)"); 1133 gSavedSettings.declareS32("AudioDefaultBitrate", 64, "Data streaming rate of uploaded audio samples (thousands of bits per second)");
1027 gSavedSettings.declareBOOL("AudioStreamingMusic", FALSE, "Enable streaming audio"); 1134 gSavedSettings.declareBOOL("AudioStreamingMusic", FALSE, "Enable streaming audio");
@@ -1107,11 +1214,7 @@ void declare_settings()
1107 gSavedSettings.declareBOOL("UseDebugMenus", FALSE, "Turns on \"Debug\" menu"); 1214 gSavedSettings.declareBOOL("UseDebugMenus", FALSE, "Turns on \"Debug\" menu");
1108 gSavedSettings.declareS32("ServerChoice", 0, "[DO NOT MODIFY] Controls which grid you connect to"); 1215 gSavedSettings.declareS32("ServerChoice", 0, "[DO NOT MODIFY] Controls which grid you connect to");
1109 gSavedSettings.declareString("CustomServer", "", "Specifies IP address or hostname of userserver to which you connect"); 1216 gSavedSettings.declareString("CustomServer", "", "Specifies IP address or hostname of userserver to which you connect");
1110#ifdef LL_RELEASE_FOR_DOWNLOAD
1111 gSavedSettings.declareBOOL("UseDebugLogin", FALSE, "Provides extra control over which grid to connect to"); 1217 gSavedSettings.declareBOOL("UseDebugLogin", FALSE, "Provides extra control over which grid to connect to");
1112#else
1113 gSavedSettings.declareBOOL("UseDebugLogin", TRUE, "Provides extra control over which grid to connect to" );
1114#endif
1115 1218
1116 // First run is true on the first startup of a given installation. 1219 // First run is true on the first startup of a given installation.
1117 // It is not related to whether your ACCOUNT has been logged in before. 1220 // It is not related to whether your ACCOUNT has been logged in before.
@@ -1146,7 +1249,15 @@ void declare_settings()
1146 gSavedSettings.declareBOOL("EditCameraMovement", FALSE, "When entering build mode, camera moves up above avatar"); 1249 gSavedSettings.declareBOOL("EditCameraMovement", FALSE, "When entering build mode, camera moves up above avatar");
1147 gSavedSettings.declareBOOL("AppearanceCameraMovement", TRUE, "When entering appearance editing mode, camera zooms in on currently selected portion of avatar"); 1250 gSavedSettings.declareBOOL("AppearanceCameraMovement", TRUE, "When entering appearance editing mode, camera zooms in on currently selected portion of avatar");
1148 1251
1149 gSavedSettings.declareBOOL("AltShowsPhysical", FALSE, "When ALT key is held down, physical objects are rendered in red."); 1252 //gSavedSettings.declareBOOL("AltShowsPhysical", FALSE, "When ALT key is held down, physical objects are rendered in red.");
1253 gSavedSettings.declareBOOL("BeaconAlwaysOn", FALSE, "Beacons / highlighting always on");
1254 gSavedSettings.declareBOOL("scriptsbeacon", FALSE, "Beacon / Highlight scripted objects");
1255 gSavedSettings.declareBOOL("physicalbeacon", TRUE, "Beacon / Highlight physical objects");
1256 gSavedSettings.declareBOOL("soundsbeacon", FALSE, "Beacon / Highlight sound generators");
1257 gSavedSettings.declareBOOL("particlesbeacon", FALSE, "Beacon / Highlight particle generators");
1258 gSavedSettings.declareBOOL("scripttouchbeacon", TRUE, "Beacon / Highlight scripted objects with touch function");
1259 gSavedSettings.declareBOOL("renderbeacons", FALSE, "Beacon / Highlight particle generators");
1260 gSavedSettings.declareBOOL("renderhighlights", TRUE, "Beacon / Highlight scripted objects with touch function");
1150 1261
1151 gSavedSettings.declareBOOL("MuteAudio", FALSE, "All audio plays at 0 volume (streaming audio still takes up bandwidth, for example)"); 1262 gSavedSettings.declareBOOL("MuteAudio", FALSE, "All audio plays at 0 volume (streaming audio still takes up bandwidth, for example)");
1152 gSavedSettings.declareBOOL("MuteWhenMinimized", TRUE, "Mute audio when SL window is minimized"); 1263 gSavedSettings.declareBOOL("MuteWhenMinimized", TRUE, "Mute audio when SL window is minimized");
@@ -1317,6 +1428,12 @@ void declare_settings()
1317 gSavedSettings.declareBOOL("FlycamAbsolute", FALSE, "Treat Flycam values as absolute positions (not deltas)."); 1428 gSavedSettings.declareBOOL("FlycamAbsolute", FALSE, "Treat Flycam values as absolute positions (not deltas).");
1318 gSavedSettings.declareBOOL("FlycamZoomDirect", FALSE, "Map flycam zoom axis directly to camera zoom."); 1429 gSavedSettings.declareBOOL("FlycamZoomDirect", FALSE, "Map flycam zoom axis directly to camera zoom.");
1319 1430
1431 // Vector Processor & Math
1432 gSavedSettings.declareBOOL("VectorizePerfTest", TRUE, "Test SSE/vectorization performance and choose fastest version.");
1433 gSavedSettings.declareBOOL("VectorizeEnable", FALSE, "Enable general vector operations and data alignment.");
1434 gSavedSettings.declareBOOL("VectorizeSkin", TRUE, "Enable vector operations for avatar skinning.");
1435 gSavedSettings.declareU32( "VectorizeProcessor", 0, "0=Compiler Default, 1=SSE, 2=SSE2, autodetected", NO_PERSIST);
1436
1320 // 1437 //
1321 // crash_settings.xml 1438 // crash_settings.xml
1322 // 1439 //
@@ -1333,3 +1450,460 @@ void fixup_settings()
1333 gSavedSettings.setBOOL("AnimateTextures", TRUE); // Force AnimateTextures to always be on 1450 gSavedSettings.setBOOL("AnimateTextures", TRUE); // Force AnimateTextures to always be on
1334#endif 1451#endif
1335} 1452}
1453
1454////////////////////////////////////////////////////////////////////////////
1455// Listeners
1456
1457class LLAFKTimeoutListener: public LLSimpleListener
1458{
1459 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
1460 {
1461 gAFKTimeout = (F32) event->getValue().asReal();
1462 return true;
1463 }
1464};
1465static LLAFKTimeoutListener afk_timeout_listener;
1466
1467class LLMouseSensitivityListener: public LLSimpleListener
1468{
1469 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
1470 {
1471 gMouseSensitivity = (F32) event->getValue().asReal();
1472 return true;
1473 }
1474};
1475static LLMouseSensitivityListener mouse_sensitivity_listener;
1476
1477
1478class LLInvertMouseListener: public LLSimpleListener
1479{
1480 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
1481 {
1482 gInvertMouse = event->getValue().asBoolean();
1483 return true;
1484 }
1485};
1486static LLInvertMouseListener invert_mouse_listener;
1487
1488class LLRenderAvatarMouselookListener: public LLSimpleListener
1489{
1490 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
1491 {
1492 LLVOAvatar::sVisibleInFirstPerson = event->getValue().asBoolean();
1493 return true;
1494 }
1495};
1496static LLRenderAvatarMouselookListener render_avatar_mouselook_listener;
1497
1498class LLRenderFarClipListener: public LLSimpleListener
1499{
1500 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
1501 {
1502 F32 draw_distance = (F32) event->getValue().asReal();
1503 gAgent.mDrawDistance = draw_distance;
1504 if (gWorldPointer)
1505 {
1506 gWorldPointer->setLandFarClip(draw_distance);
1507 }
1508 return true;
1509 }
1510};
1511static LLRenderFarClipListener render_far_clip_listener;
1512
1513class LLTerrainDetailListener: public LLSimpleListener
1514{
1515 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
1516 {
1517 LLDrawPoolTerrain::sDetailMode = event->getValue().asInteger();
1518 return true;
1519 }
1520};
1521static LLTerrainDetailListener terrain_detail_listener;
1522
1523
1524class LLSetShaderListener: public LLSimpleListener
1525{
1526 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
1527 {
1528 LLShaderMgr::setShaders();
1529 return true;
1530 }
1531};
1532static LLSetShaderListener set_shader_listener;
1533
1534class LLReleaseGLBufferListener: public LLSimpleListener
1535{
1536 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
1537 {
1538 gPipeline.releaseGLBuffers();
1539 LLShaderMgr::setShaders();
1540 return true;
1541 }
1542};
1543static LLReleaseGLBufferListener release_gl_buffer_listener;
1544
1545class LLVolumeLODListener: public LLSimpleListener
1546{
1547 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
1548 {
1549 LLVOVolume::sLODFactor = (F32) event->getValue().asReal();
1550 LLVOVolume::sDistanceFactor = 1.f-LLVOVolume::sLODFactor * 0.1f;
1551 return true;
1552 }
1553};
1554static LLVolumeLODListener volume_lod_listener;
1555
1556class LLAvatarLODListener: public LLSimpleListener
1557{
1558 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
1559 {
1560 LLVOAvatar::sLODFactor = (F32) event->getValue().asReal();
1561 return true;
1562 }
1563};
1564static LLAvatarLODListener avatar_lod_listener;
1565
1566class LLTreeLODListener: public LLSimpleListener
1567{
1568 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
1569 {
1570 LLVOTree::sTreeFactor = (F32) event->getValue().asReal();
1571 return true;
1572 }
1573};
1574static LLTreeLODListener tree_lod_listener;
1575
1576class LLFlexLODListener: public LLSimpleListener
1577{
1578 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
1579 {
1580 LLVolumeImplFlexible::sUpdateFactor = (F32) event->getValue().asReal();
1581 return true;
1582 }
1583};
1584static LLFlexLODListener flex_lod_listener;
1585
1586class LLGammaListener: public LLSimpleListener
1587{
1588 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
1589 {
1590 F32 gamma = (F32) event->getValue().asReal();
1591 if (gamma == 0.0f)
1592 {
1593 gamma = 1.0f; // restore normal gamma
1594 }
1595 if (gamma != gViewerWindow->getWindow()->getGamma())
1596 {
1597 // Only save it if it's changed
1598 if (!gViewerWindow->getWindow()->setGamma(gamma))
1599 {
1600 llwarns << "setGamma failed!" << llendl;
1601 }
1602 }
1603
1604 return true;
1605 }
1606};
1607static LLGammaListener gamma_listener;
1608
1609class LLNightBrightnessListener: public LLSimpleListener
1610{
1611 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
1612 {
1613 LLVOSky::sNighttimeBrightness = (F32) event->getValue().asReal();
1614 return true;
1615 }
1616};
1617static LLNightBrightnessListener night_brightness_listener;
1618
1619const F32 MAX_USER_FOG_RATIO = 4.f;
1620const F32 MIN_USER_FOG_RATIO = 0.5f;
1621
1622class LLFogRatioListener: public LLSimpleListener
1623{
1624 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
1625 {
1626 F32 fog_ratio = llmax(MIN_USER_FOG_RATIO,
1627 llmin((F32) event->getValue().asReal(),
1628 MAX_USER_FOG_RATIO));
1629 gSky.setFogRatio(fog_ratio);
1630 return true;
1631 }
1632};
1633static LLFogRatioListener fog_ratio_listener;
1634
1635class LLMaxPartCountListener: public LLSimpleListener
1636{
1637 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
1638 {
1639 LLViewerPartSim::setMaxPartCount(event->getValue().asInteger());
1640 return true;
1641 }
1642};
1643static LLMaxPartCountListener max_partCount_listener;
1644
1645const S32 MAX_USER_COMPOSITE_LIMIT = 100;
1646const S32 MIN_USER_COMPOSITE_LIMIT = 0;
1647
1648class LLCompositeLimitListener: public LLSimpleListener
1649{
1650 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
1651 {
1652 S32 composite_limit = llmax(MIN_USER_COMPOSITE_LIMIT,
1653 llmin((S32)event->getValue().asInteger(),
1654 MAX_USER_COMPOSITE_LIMIT));
1655 LLVOAvatar::sMaxOtherAvatarsToComposite = composite_limit;
1656 return true;
1657 }
1658};
1659static LLCompositeLimitListener composite_limit_listener;
1660
1661class LLVideoMemoryListener: public LLSimpleListener
1662{
1663 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
1664 {
1665 gImageList.updateMaxResidentTexMem(event->getValue().asInteger());
1666 return true;
1667 }
1668};
1669static LLVideoMemoryListener video_memory_listener;
1670
1671class LLBandwidthListener: public LLSimpleListener
1672{
1673 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
1674 {
1675 gViewerThrottle.setMaxBandwidth((F32) event->getValue().asReal());
1676 return true;
1677 }
1678};
1679static LLBandwidthListener bandwidth_listener;
1680
1681class LLChatFontSizeListener: public LLSimpleListener
1682{
1683 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
1684 {
1685 gConsole->setFontSize(event->getValue().asInteger());
1686 return true;
1687 }
1688};
1689static LLChatFontSizeListener chat_font_size_listener;
1690
1691class LLChatPersistTimeListener: public LLSimpleListener
1692{
1693 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
1694 {
1695 gConsole->setLinePersistTime((F32) event->getValue().asReal());
1696 return true;
1697 }
1698};
1699static LLChatPersistTimeListener chat_persist_time_listener;
1700
1701class LLConsoleMaxLinesListener: public LLSimpleListener
1702{
1703 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
1704 {
1705 gConsole->setMaxLines(event->getValue().asInteger());
1706 return true;
1707 }
1708};
1709static LLConsoleMaxLinesListener console_max_lines_listener;
1710
1711// Listener for all volume settings
1712class LLAudioListener: public LLSimpleListener
1713{
1714 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
1715 {
1716 audio_update_volume(true);
1717 return true;
1718 }
1719};
1720static LLAudioListener audio_listener;
1721
1722class LLJoystickListener : public LLSimpleListener
1723{
1724 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
1725 {
1726 LLViewerJoystick::updateCamera(TRUE);
1727 return true;
1728 }
1729};
1730static LLJoystickListener joystick_listener;
1731
1732void stop_video();
1733void prepare_video(const LLParcel *parcel);
1734
1735class LLAudioStreamMusicListener: public LLSimpleListener
1736{
1737 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
1738 {
1739 if (gAudiop)
1740 {
1741 if ( event->getValue().asBoolean() )
1742 {
1743 if (gParcelMgr
1744 && gParcelMgr->getAgentParcel()
1745 && gParcelMgr->getAgentParcel()->getMusicURL())
1746 {
1747 // if stream is already playing, don't call this
1748 // otherwise music will briefly stop
1749 if ( ! gAudiop->isInternetStreamPlaying() )
1750 {
1751 gAudiop->startInternetStream(gParcelMgr->getAgentParcel()->getMusicURL());
1752 }
1753 }
1754 }
1755 else
1756 {
1757 gAudiop->stopInternetStream();
1758 }
1759 }
1760 return true;
1761 }
1762};
1763
1764static LLAudioStreamMusicListener audio_stream_music_listener;
1765
1766
1767
1768class LLAudioStreamMediaListener: public LLSimpleListener
1769{
1770 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
1771 {
1772 if (LLMediaEngine::getInstance() && LLMediaEngine::getInstance()->isAvailable())
1773 {
1774 if (event->getValue().asBoolean())
1775 {
1776 gMessageSystem->setHandlerFunc ( "ParcelMediaCommandMessage", LLMediaEngine::process_parcel_media );
1777 gMessageSystem->setHandlerFunc ( "ParcelMediaUpdate", LLMediaEngine::process_parcel_media_update );
1778 if ( ( gParcelMgr ) &&
1779 ( gParcelMgr->getAgentParcel () ) &&
1780 ( gParcelMgr->getAgentParcel()->getMediaURL () ) )
1781 {
1782 prepare_video ( gParcelMgr->getAgentParcel () );
1783 }
1784 }
1785 else
1786 {
1787 gMessageSystem->setHandlerFunc("ParcelMediaCommandMessage", null_message_callback);
1788 gMessageSystem->setHandlerFunc ( "ParcelMediaUpdate", null_message_callback );
1789 stop_video();
1790 }
1791 }
1792 else
1793 {
1794 if (gSavedSettings.getWarning("QuickTimeInstalled"))
1795 {
1796 gSavedSettings.setWarning("QuickTimeInstalled", FALSE);
1797
1798 LLNotifyBox::showXml("NoQuickTime" );
1799 }
1800 }
1801
1802 return true;
1803 }
1804};
1805
1806static LLAudioStreamMediaListener audio_stream_media_listener;
1807
1808
1809class LLUseOcclusionListener: public LLSimpleListener
1810{
1811 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
1812 {
1813 LLPipeline::sUseOcclusion = (event->getValue().asBoolean() && gGLManager.mHasOcclusionQuery &&
1814 !gUseWireframe);
1815 return true;
1816 }
1817};
1818static LLUseOcclusionListener use_occlusion_listener;
1819
1820class LLNumpadControlListener: public LLSimpleListener
1821{
1822 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
1823 {
1824 if (gKeyboard)
1825 {
1826 gKeyboard->setNumpadDistinct(static_cast<LLKeyboard::e_numpad_distinct>(event->getValue().asInteger()));
1827 }
1828 return true;
1829 }
1830};
1831
1832static LLNumpadControlListener numpad_control_listener;
1833
1834class LLRenderUseVBOListener: public LLSimpleListener
1835{
1836 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
1837 {
1838 gPipeline.setUseVBO(event->getValue().asBoolean());
1839 return true;
1840 }
1841};
1842static LLRenderUseVBOListener render_use_vbo_listener;
1843
1844class LLRenderLightingDetailListener: public LLSimpleListener
1845{
1846 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
1847 {
1848 gPipeline.setLightingDetail(event->getValue().asInteger());
1849 return true;
1850 }
1851};
1852static LLRenderLightingDetailListener render_lighting_detail_listener;
1853
1854////////////////////////////////////////////////////////////////////////////
1855
1856void settings_setup_listeners()
1857{
1858 gSavedSettings.getControl("FirstPersonAvatarVisible")->addListener(&render_avatar_mouselook_listener);
1859 gSavedSettings.getControl("MouseSensitivity")->addListener(&mouse_sensitivity_listener);
1860 gSavedSettings.getControl("InvertMouse")->addListener(&invert_mouse_listener);
1861 gSavedSettings.getControl("AFKTimeout")->addListener(&afk_timeout_listener);
1862 gSavedSettings.getControl("RenderFarClip")->addListener(&render_far_clip_listener);
1863 gSavedSettings.getControl("RenderTerrainDetail")->addListener(&terrain_detail_listener);
1864 gSavedSettings.getControl("RenderRippleWater")->addListener(&set_shader_listener);
1865 gSavedSettings.getControl("RenderAvatarVP")->addListener(&set_shader_listener);
1866 gSavedSettings.getControl("VertexShaderEnable")->addListener(&set_shader_listener);
1867 gSavedSettings.getControl("RenderDynamicReflections")->addListener(&set_shader_listener);
1868 gSavedSettings.getControl("RenderGlow")->addListener(&release_gl_buffer_listener);
1869 gSavedSettings.getControl("RenderGlowResolution")->addListener(&release_gl_buffer_listener);
1870 gSavedSettings.getControl("RenderAvatarMode")->addListener(&set_shader_listener);
1871 gSavedSettings.getControl("RenderVolumeLODFactor")->addListener(&volume_lod_listener);
1872 gSavedSettings.getControl("RenderAvatarLODFactor")->addListener(&avatar_lod_listener);
1873 gSavedSettings.getControl("RenderTreeLODFactor")->addListener(&tree_lod_listener);
1874 gSavedSettings.getControl("RenderFlexTimeFactor")->addListener(&flex_lod_listener);
1875 gSavedSettings.getControl("ThrottleBandwidthKBPS")->addListener(&bandwidth_listener);
1876 gSavedSettings.getControl("RenderGamma")->addListener(&gamma_listener);
1877 gSavedSettings.getControl("RenderNightBrightness")->addListener(&night_brightness_listener);
1878 gSavedSettings.getControl("RenderFogRatio")->addListener(&fog_ratio_listener);
1879 gSavedSettings.getControl("RenderMaxPartCount")->addListener(&max_partCount_listener);
1880 gSavedSettings.getControl("AvatarCompositeLimit")->addListener(&composite_limit_listener);
1881 gSavedSettings.getControl("GraphicsCardMemorySetting")->addListener(&video_memory_listener);
1882 gSavedSettings.getControl("ChatFontSize")->addListener(&chat_font_size_listener);
1883 gSavedSettings.getControl("ChatPersistTime")->addListener(&chat_persist_time_listener);
1884 gSavedSettings.getControl("ConsoleMaxLines")->addListener(&console_max_lines_listener);
1885 gSavedSettings.getControl("UseOcclusion")->addListener(&use_occlusion_listener);
1886 gSavedSettings.getControl("AudioLevelMaster")->addListener(&audio_listener);
1887// gSavedSettings.getControl("AudioLevelSFX")->addListener(&audio_volume_listener); // no need for listener
1888// gSavedSettings.getControl("AudioLevelUI")->addListener(&audio_volume_listener); // no need for listener
1889 gSavedSettings.getControl("AudioLevelAmbient")->addListener(&audio_listener);
1890 gSavedSettings.getControl("AudioLevelMusic")->addListener(&audio_listener);
1891 gSavedSettings.getControl("AudioLevelMedia")->addListener(&audio_listener);
1892 gSavedSettings.getControl("AudioLevelVoice")->addListener(&audio_listener);
1893 gSavedSettings.getControl("AudioLevelDistance")->addListener(&audio_listener);
1894 gSavedSettings.getControl("AudioLevelDoppler")->addListener(&audio_listener);
1895 gSavedSettings.getControl("AudioLevelRolloff")->addListener(&audio_listener);
1896 gSavedSettings.getControl("AudioStreamingMusic")->addListener(&audio_stream_music_listener);
1897 gSavedSettings.getControl("AudioStreamingVideo")->addListener(&audio_stream_media_listener);
1898 gSavedSettings.getControl("MuteAudio")->addListener(&audio_listener);
1899 gSavedSettings.getControl("RenderVBOEnable")->addListener(&render_use_vbo_listener);
1900 gSavedSettings.getControl("RenderLightingDetail")->addListener(&render_lighting_detail_listener);
1901 gSavedSettings.getControl("NumpadControl")->addListener(&numpad_control_listener);
1902 gSavedSettings.getControl("FlycamAxis0")->addListener(&joystick_listener);
1903 gSavedSettings.getControl("FlycamAxis1")->addListener(&joystick_listener);
1904 gSavedSettings.getControl("FlycamAxis2")->addListener(&joystick_listener);
1905 gSavedSettings.getControl("FlycamAxis3")->addListener(&joystick_listener);
1906 gSavedSettings.getControl("FlycamAxis4")->addListener(&joystick_listener);
1907 gSavedSettings.getControl("FlycamAxis5")->addListener(&joystick_listener);
1908 gSavedSettings.getControl("FlycamAxis6")->addListener(&joystick_listener);
1909}