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/doc/contributions.txt | 1 + linden/indra/newview/lloverlaybar.cpp | 18 ++++++++++++++++++ linden/indra/newview/lloverlaybar.h | 1 + .../skins/default/xui/en-us/panel_overlaybar.xml | 4 ++++ 4 files changed, 24 insertions(+) (limited to 'linden') diff --git a/linden/doc/contributions.txt b/linden/doc/contributions.txt index da98604..ac185bc 100644 --- a/linden/doc/contributions.txt +++ b/linden/doc/contributions.txt @@ -14,6 +14,7 @@ Adam Marker Aimee Trescothick VWR-3903 VWR-4083 + VWR-8341 Alejandro Rosenthal VWR-1184 Alissa Sabre 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(); diff --git a/linden/indra/newview/lloverlaybar.h b/linden/indra/newview/lloverlaybar.h index 51a6e50..43fb5c2 100644 --- a/linden/indra/newview/lloverlaybar.h +++ b/linden/indra/newview/lloverlaybar.h @@ -69,6 +69,7 @@ public: static void onClickIMReceived(void* data); static void onClickSetNotBusy(void* data); static void onClickReleaseKeys(void* data); + static void onClickFlycam(void* data); static void onClickMouselook(void* data); static void onClickStandUp(void* data); static void onClickResetView(void* data); diff --git a/linden/indra/newview/skins/default/xui/en-us/panel_overlaybar.xml b/linden/indra/newview/skins/default/xui/en-us/panel_overlaybar.xml index bcd7bbc..c2c615d 100644 --- a/linden/indra/newview/skins/default/xui/en-us/panel_overlaybar.xml +++ b/linden/indra/newview/skins/default/xui/en-us/panel_overlaybar.xml @@ -32,6 +32,10 @@ tool_tip="A script has taken control of your keys. Click here to release them." width="102" />