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.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/linden/indra/newview/lloverlaybar.cpp b/linden/indra/newview/lloverlaybar.cpp
index d0aad25..1087fd8 100644
--- a/linden/indra/newview/lloverlaybar.cpp
+++ b/linden/indra/newview/lloverlaybar.cpp
@@ -50,6 +50,7 @@
50#include "llui.h" 50#include "llui.h"
51#include "llviewercontrol.h" 51#include "llviewercontrol.h"
52#include "llviewerimagelist.h" 52#include "llviewerimagelist.h"
53#include "llviewerjoystick.h"
53#include "llviewermedia.h" 54#include "llviewermedia.h"
54#include "llviewermenu.h" // handle_reset_view() 55#include "llviewermenu.h" // handle_reset_view()
55#include "llviewermedia.h" 56#include "llviewermedia.h"
@@ -120,6 +121,7 @@ BOOL LLOverlayBar::postBuild()
120{ 121{
121 childSetAction("IM Received",onClickIMReceived,this); 122 childSetAction("IM Received",onClickIMReceived,this);
122 childSetAction("Set Not Busy",onClickSetNotBusy,this); 123 childSetAction("Set Not Busy",onClickSetNotBusy,this);
124 childSetAction("Flycam",onClickFlycam,this);
123 childSetAction("Mouselook",onClickMouselook,this); 125 childSetAction("Mouselook",onClickMouselook,this);
124 childSetAction("Stand Up",onClickStandUp,this); 126 childSetAction("Stand Up",onClickStandUp,this);
125 childSetVisible("chat_bar", gSavedSettings.getBOOL("ChatVisible")); 127 childSetVisible("chat_bar", gSavedSettings.getBOOL("ChatVisible"));
@@ -209,6 +211,16 @@ void LLOverlayBar::refresh()
209 buttons_changed = TRUE; 211 buttons_changed = TRUE;
210 } 212 }
211 213
214 BOOL flycam = LLViewerJoystick::getInstance()->getOverrideCamera();
215 button = getChild<LLButton>("Flycam");
216 if (button && button->getVisible() != flycam)
217 {
218 button->setVisible(flycam);
219 sendChildToFront(button);
220 moveChildToBackOfTabGroup(button);
221 buttons_changed = TRUE;
222 }
223
212 BOOL mouselook_grabbed; 224 BOOL mouselook_grabbed;
213 mouselook_grabbed = gAgent.isControlGrabbed(CONTROL_ML_LBUTTON_DOWN_INDEX) 225 mouselook_grabbed = gAgent.isControlGrabbed(CONTROL_ML_LBUTTON_DOWN_INDEX)
214 || gAgent.isControlGrabbed(CONTROL_ML_LBUTTON_UP_INDEX); 226 || gAgent.isControlGrabbed(CONTROL_ML_LBUTTON_UP_INDEX);
@@ -284,6 +296,12 @@ void LLOverlayBar::onClickSetNotBusy(void*)
284 296
285 297
286// static 298// static
299void LLOverlayBar::onClickFlycam(void*)
300{
301 LLViewerJoystick::getInstance()->toggleFlycam();
302}
303
304// static
287void LLOverlayBar::onClickResetView(void* data) 305void LLOverlayBar::onClickResetView(void* data)
288{ 306{
289 handle_reset_view(); 307 handle_reset_view();