diff options
author | McCabe Maxsted | 2009-09-10 21:43:11 -0700 |
---|---|---|
committer | McCabe Maxsted | 2009-09-10 21:43:11 -0700 |
commit | f332eaa4a69a4546e0b9b2ba3719e3c038731fd3 (patch) | |
tree | 69a2c79196b7a7cffa49b861329e65b2c5ba7ddf /linden/indra/newview/lloverlaybar.cpp | |
parent | Admin options now only show for other people's profiles (diff) | |
download | meta-impy-f332eaa4a69a4546e0b9b2ba3719e3c038731fd3.zip meta-impy-f332eaa4a69a4546e0b9b2ba3719e3c038731fd3.tar.gz meta-impy-f332eaa4a69a4546e0b9b2ba3719e3c038731fd3.tar.bz2 meta-impy-f332eaa4a69a4546e0b9b2ba3719e3c038731fd3.tar.xz |
Created new toolbar control for windlight presets and options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/lloverlaybar.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/linden/indra/newview/lloverlaybar.cpp b/linden/indra/newview/lloverlaybar.cpp index 91a7375..6b51b3a 100644 --- a/linden/indra/newview/lloverlaybar.cpp +++ b/linden/indra/newview/lloverlaybar.cpp | |||
@@ -62,6 +62,7 @@ | |||
62 | #include "llvoavatar.h" | 62 | #include "llvoavatar.h" |
63 | #include "llvoiceremotectrl.h" | 63 | #include "llvoiceremotectrl.h" |
64 | #include "llwebbrowserctrl.h" | 64 | #include "llwebbrowserctrl.h" |
65 | #include "llwindlightremotectrl.h" | ||
65 | #include "llselectmgr.h" | 66 | #include "llselectmgr.h" |
66 | 67 | ||
67 | // | 68 | // |
@@ -92,6 +93,13 @@ void* LLOverlayBar::createVoiceRemote(void* userdata) | |||
92 | return self->mVoiceRemote; | 93 | return self->mVoiceRemote; |
93 | } | 94 | } |
94 | 95 | ||
96 | void* LLOverlayBar::createWindlightRemote(void* userdata) | ||
97 | { | ||
98 | LLOverlayBar *self = (LLOverlayBar*)userdata; | ||
99 | self->mWindlightRemote = new LLWindlightRemoteCtrl(); | ||
100 | return self->mWindlightRemote; | ||
101 | } | ||
102 | |||
95 | void* LLOverlayBar::createChatBar(void* userdata) | 103 | void* LLOverlayBar::createChatBar(void* userdata) |
96 | { | 104 | { |
97 | gChatBar = new LLChatBar(); | 105 | gChatBar = new LLChatBar(); |
@@ -102,6 +110,7 @@ LLOverlayBar::LLOverlayBar() | |||
102 | : LLPanel(), | 110 | : LLPanel(), |
103 | mMediaRemote(NULL), | 111 | mMediaRemote(NULL), |
104 | mVoiceRemote(NULL), | 112 | mVoiceRemote(NULL), |
113 | mWindlightRemote(NULL), | ||
105 | mMusicState(STOPPED), | 114 | mMusicState(STOPPED), |
106 | mOriginalIMLabel("") | 115 | mOriginalIMLabel("") |
107 | { | 116 | { |
@@ -113,6 +122,7 @@ LLOverlayBar::LLOverlayBar() | |||
113 | LLCallbackMap::map_t factory_map; | 122 | LLCallbackMap::map_t factory_map; |
114 | factory_map["media_remote"] = LLCallbackMap(LLOverlayBar::createMediaRemote, this); | 123 | factory_map["media_remote"] = LLCallbackMap(LLOverlayBar::createMediaRemote, this); |
115 | factory_map["voice_remote"] = LLCallbackMap(LLOverlayBar::createVoiceRemote, this); | 124 | factory_map["voice_remote"] = LLCallbackMap(LLOverlayBar::createVoiceRemote, this); |
125 | factory_map["windlight_remote"] = LLCallbackMap(LLOverlayBar::createWindlightRemote, this); | ||
116 | factory_map["chat_bar"] = LLCallbackMap(LLOverlayBar::createChatBar, this); | 126 | factory_map["chat_bar"] = LLCallbackMap(LLOverlayBar::createChatBar, this); |
117 | 127 | ||
118 | LLUICtrlFactory::getInstance()->buildPanel(this, "panel_overlaybar.xml", &factory_map); | 128 | LLUICtrlFactory::getInstance()->buildPanel(this, "panel_overlaybar.xml", &factory_map); |
@@ -269,6 +279,7 @@ void LLOverlayBar::refresh() | |||
269 | } | 279 | } |
270 | 280 | ||
271 | 281 | ||
282 | moveChildToBackOfTabGroup(mWindlightRemote); | ||
272 | moveChildToBackOfTabGroup(mMediaRemote); | 283 | moveChildToBackOfTabGroup(mMediaRemote); |
273 | moveChildToBackOfTabGroup(mVoiceRemote); | 284 | moveChildToBackOfTabGroup(mVoiceRemote); |
274 | 285 | ||
@@ -277,6 +288,7 @@ void LLOverlayBar::refresh() | |||
277 | { | 288 | { |
278 | childSetVisible("media_remote_container", FALSE); | 289 | childSetVisible("media_remote_container", FALSE); |
279 | childSetVisible("voice_remote_container", FALSE); | 290 | childSetVisible("voice_remote_container", FALSE); |
291 | childSetVisible("windlight_remote_container", FALSE); | ||
280 | childSetVisible("state_buttons", FALSE); | 292 | childSetVisible("state_buttons", FALSE); |
281 | } | 293 | } |
282 | else | 294 | else |
@@ -284,6 +296,7 @@ void LLOverlayBar::refresh() | |||
284 | // update "remotes" | 296 | // update "remotes" |
285 | childSetVisible("media_remote_container", TRUE); | 297 | childSetVisible("media_remote_container", TRUE); |
286 | childSetVisible("voice_remote_container", LLVoiceClient::voiceEnabled()); | 298 | childSetVisible("voice_remote_container", LLVoiceClient::voiceEnabled()); |
299 | childSetVisible("windlight_remote_container", gSavedSettings.getBOOL("EnableWindlightRemote")); | ||
287 | childSetVisible("state_buttons", TRUE); | 300 | childSetVisible("state_buttons", TRUE); |
288 | } | 301 | } |
289 | 302 | ||