From 1171e5c0b24abe2cd2b6090ed1f84cf5aa83c218 Mon Sep 17 00:00:00 2001 From: Aimee Trescothick Date: Mon, 22 Sep 2008 02:25:37 -0500 Subject: VWR-8341: Bring back a UI indicator of 'Flycam' text. --- linden/indra/newview/lloverlaybar.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'linden/indra/newview/lloverlaybar.cpp') 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 @@ #include "llui.h" #include "llviewercontrol.h" #include "llviewerimagelist.h" +#include "llviewerjoystick.h" #include "llviewermedia.h" #include "llviewermenu.h" // handle_reset_view() #include "llviewermedia.h" @@ -121,6 +122,7 @@ BOOL LLOverlayBar::postBuild() childSetAction("IM Received",onClickIMReceived,this); childSetAction("Set Not Busy",onClickSetNotBusy,this); childSetAction("Release Keys",onClickReleaseKeys,this); + childSetAction("Flycam",onClickFlycam,this); childSetAction("Mouselook",onClickMouselook,this); childSetAction("Stand Up",onClickStandUp,this); childSetVisible("chat_bar", gSavedSettings.getBOOL("ChatVisible")); @@ -221,6 +223,16 @@ void LLOverlayBar::refresh() buttons_changed = TRUE; } + BOOL flycam = LLViewerJoystick::getInstance()->getOverrideCamera(); + button = getChild("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); @@ -302,6 +314,12 @@ void LLOverlayBar::onClickReleaseKeys(void*) } // static +void LLOverlayBar::onClickFlycam(void*) +{ + LLViewerJoystick::getInstance()->toggleFlycam(); +} + +// static void LLOverlayBar::onClickResetView(void* data) { handle_reset_view(); -- cgit v1.1