aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/lloverlaybar.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-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 d430d17..0dc557d 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"
@@ -121,6 +122,7 @@ BOOL LLOverlayBar::postBuild()
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);
123 childSetAction("Release Keys",onClickReleaseKeys,this); 124 childSetAction("Release Keys",onClickReleaseKeys,this);
125 childSetAction("Flycam",onClickFlycam,this);
124 childSetAction("Mouselook",onClickMouselook,this); 126 childSetAction("Mouselook",onClickMouselook,this);
125 childSetAction("Stand Up",onClickStandUp,this); 127 childSetAction("Stand Up",onClickStandUp,this);
126 childSetVisible("chat_bar", gSavedSettings.getBOOL("ChatVisible")); 128 childSetVisible("chat_bar", gSavedSettings.getBOOL("ChatVisible"));
@@ -221,6 +223,16 @@ void LLOverlayBar::refresh()
221 buttons_changed = TRUE; 223 buttons_changed = TRUE;
222 } 224 }
223 225
226 BOOL flycam = LLViewerJoystick::getInstance()->getOverrideCamera();
227 button = getChild<LLButton>("Flycam");
228 if (button && button->getVisible() != flycam)
229 {
230 button->setVisible(flycam);
231 sendChildToFront(button);
232 moveChildToBackOfTabGroup(button);
233 buttons_changed = TRUE;
234 }
235
224 BOOL mouselook_grabbed; 236 BOOL mouselook_grabbed;
225 mouselook_grabbed = gAgent.isControlGrabbed(CONTROL_ML_LBUTTON_DOWN_INDEX) 237 mouselook_grabbed = gAgent.isControlGrabbed(CONTROL_ML_LBUTTON_DOWN_INDEX)
226 || gAgent.isControlGrabbed(CONTROL_ML_LBUTTON_UP_INDEX); 238 || gAgent.isControlGrabbed(CONTROL_ML_LBUTTON_UP_INDEX);
@@ -302,6 +314,12 @@ void LLOverlayBar::onClickReleaseKeys(void*)
302} 314}
303 315
304// static 316// static
317void LLOverlayBar::onClickFlycam(void*)
318{
319 LLViewerJoystick::getInstance()->toggleFlycam();
320}
321
322// static
305void LLOverlayBar::onClickResetView(void* data) 323void LLOverlayBar::onClickResetView(void* data)
306{ 324{
307 handle_reset_view(); 325 handle_reset_view();