summaryrefslogtreecommitdiff
path: root/indra/newview/lloverlaybar.cpp
diff options
context:
space:
mode:
authorAdam Moss <moss@lindenlab.com>2008-11-12 20:28:24 +0000
committerAdam Moss <moss@lindenlab.com>2008-11-12 20:28:24 +0000
commita879e13055f0bb759ee12e708184e95d8bd9be30 (patch)
treed659c3f71dea7a4f213e9d855f331dc5af56c63a /indra/newview/lloverlaybar.cpp
parentf89f19990cbb9f3f2e7473ac6c159098bdfabec7 (diff)
svn merge -c102054
svn+ssh://svn.lindenlab.com/svn/linden/branches/moss/morejoy-2-r102015 QAR-1016 joystick+spacenav improvements MERGE
Diffstat (limited to 'indra/newview/lloverlaybar.cpp')
-rw-r--r--indra/newview/lloverlaybar.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/indra/newview/lloverlaybar.cpp b/indra/newview/lloverlaybar.cpp
index 7162c2e925..f311732e46 100644
--- a/indra/newview/lloverlaybar.cpp
+++ b/indra/newview/lloverlaybar.cpp
@@ -50,6 +50,7 @@
#include "llui.h"
#include "llviewercontrol.h"
#include "llviewerimagelist.h"
+#include "llviewerjoystick.h"
#include "llviewermedia.h"
#include "llviewermenu.h" // handle_reset_view()
#include "llviewermedia.h"
@@ -122,6 +123,7 @@ BOOL LLOverlayBar::postBuild()
childSetAction("Set Not Busy",onClickSetNotBusy,this);
childSetAction("Mouselook",onClickMouselook,this);
childSetAction("Stand Up",onClickStandUp,this);
+ childSetAction("Flycam",onClickFlycam,this);
childSetVisible("chat_bar", gSavedSettings.getBOOL("ChatVisible"));
setFocusRoot(TRUE);
@@ -209,6 +211,16 @@ void LLOverlayBar::refresh()
buttons_changed = TRUE;
}
+ BOOL flycam = LLViewerJoystick::getInstance()->getOverrideCamera();
+ button = getChild<LLButton>("Flycam");
+ if (button && button->getVisible() != flycam)
+ {
+ button->setVisible(flycam);
+ sendChildToFront(button);
+ moveChildToBackOfTabGroup(button);
+ buttons_changed = TRUE;
+ }
+
BOOL mouselook_grabbed;
mouselook_grabbed = gAgent.isControlGrabbed(CONTROL_ML_LBUTTON_DOWN_INDEX)
|| gAgent.isControlGrabbed(CONTROL_ML_LBUTTON_UP_INDEX);
@@ -284,6 +296,12 @@ void LLOverlayBar::onClickSetNotBusy(void*)
// static
+void LLOverlayBar::onClickFlycam(void*)
+{
+ LLViewerJoystick::getInstance()->toggleFlycam();
+}
+
+// static
void LLOverlayBar::onClickResetView(void* data)
{
handle_reset_view();