aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/lloverlaybar.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/lloverlaybar.cpp')
-rw-r--r--linden/indra/newview/lloverlaybar.cpp25
1 files changed, 24 insertions, 1 deletions
diff --git a/linden/indra/newview/lloverlaybar.cpp b/linden/indra/newview/lloverlaybar.cpp
index 91a7375..12c001e 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
96void* LLOverlayBar::createWindlightRemote(void* userdata)
97{
98 LLOverlayBar *self = (LLOverlayBar*)userdata;
99 self->mWindlightRemote = new LLWindlightRemoteCtrl();
100 return self->mWindlightRemote;
101}
102
95void* LLOverlayBar::createChatBar(void* userdata) 103void* 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);
@@ -256,7 +266,10 @@ void LLOverlayBar::refresh()
256 BOOL sitting = FALSE; 266 BOOL sitting = FALSE;
257 if (gAgent.getAvatarObject()) 267 if (gAgent.getAvatarObject())
258 { 268 {
259 sitting = gAgent.getAvatarObject()->mIsSitting; 269// sitting = gAgent.getAvatarObject()->mIsSitting;
270// [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g)
271 sitting = gAgent.getAvatarObject()->mIsSitting && !gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT);
272// [/RLVa:KB]
260 } 273 }
261 button = getChild<LLButton>("Stand Up"); 274 button = getChild<LLButton>("Stand Up");
262 275
@@ -269,6 +282,7 @@ void LLOverlayBar::refresh()
269 } 282 }
270 283
271 284
285 moveChildToBackOfTabGroup(mWindlightRemote);
272 moveChildToBackOfTabGroup(mMediaRemote); 286 moveChildToBackOfTabGroup(mMediaRemote);
273 moveChildToBackOfTabGroup(mVoiceRemote); 287 moveChildToBackOfTabGroup(mVoiceRemote);
274 288
@@ -277,6 +291,7 @@ void LLOverlayBar::refresh()
277 { 291 {
278 childSetVisible("media_remote_container", FALSE); 292 childSetVisible("media_remote_container", FALSE);
279 childSetVisible("voice_remote_container", FALSE); 293 childSetVisible("voice_remote_container", FALSE);
294 childSetVisible("windlight_remote_container", FALSE);
280 childSetVisible("state_buttons", FALSE); 295 childSetVisible("state_buttons", FALSE);
281 } 296 }
282 else 297 else
@@ -284,6 +299,7 @@ void LLOverlayBar::refresh()
284 // update "remotes" 299 // update "remotes"
285 childSetVisible("media_remote_container", TRUE); 300 childSetVisible("media_remote_container", TRUE);
286 childSetVisible("voice_remote_container", LLVoiceClient::voiceEnabled()); 301 childSetVisible("voice_remote_container", LLVoiceClient::voiceEnabled());
302 childSetVisible("windlight_remote_container", gSavedSettings.getBOOL("EnableWindlightRemote"));
287 childSetVisible("state_buttons", TRUE); 303 childSetVisible("state_buttons", TRUE);
288 } 304 }
289 305
@@ -336,6 +352,13 @@ void LLOverlayBar::onClickMouselook(void*)
336//static 352//static
337void LLOverlayBar::onClickStandUp(void*) 353void LLOverlayBar::onClickStandUp(void*)
338{ 354{
355// [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g)
356 if ( (gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) && (gAgent.getAvatarObject()) && (gAgent.getAvatarObject()->mIsSitting) )
357 {
358 return;
359 }
360// [/RLVa:KB]
361
339 LLSelectMgr::getInstance()->deselectAllForStandingUp(); 362 LLSelectMgr::getInstance()->deselectAllForStandingUp();
340 gAgent.setControlFlags(AGENT_CONTROL_STAND_UP); 363 gAgent.setControlFlags(AGENT_CONTROL_STAND_UP);
341} 364}