diff options
author | Jacek Antonelli | 2008-09-22 20:18:50 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-09-22 20:18:50 -0500 |
commit | c401e51c2cdc18c9ca346c815c4cd0176fa3e145 (patch) | |
tree | 0f90d049723e4a7f3fd252d1d7c431ab2dbf686a /linden/indra/newview/lloverlaybar.cpp | |
parent | Merge branch 'VWR-8024' into next-merge (diff) | |
parent | VWR-8341: Bring back a UI indicator of 'Flycam' text. (diff) | |
download | meta-impy-c401e51c2cdc18c9ca346c815c4cd0176fa3e145.zip meta-impy-c401e51c2cdc18c9ca346c815c4cd0176fa3e145.tar.gz meta-impy-c401e51c2cdc18c9ca346c815c4cd0176fa3e145.tar.bz2 meta-impy-c401e51c2cdc18c9ca346c815c4cd0176fa3e145.tar.xz |
Merge branch 'VWR-8341' into next-merge
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/lloverlaybar.cpp | 18 |
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 |
317 | void LLOverlayBar::onClickFlycam(void*) | ||
318 | { | ||
319 | LLViewerJoystick::getInstance()->toggleFlycam(); | ||
320 | } | ||
321 | |||
322 | // static | ||
305 | void LLOverlayBar::onClickResetView(void* data) | 323 | void LLOverlayBar::onClickResetView(void* data) |
306 | { | 324 | { |
307 | handle_reset_view(); | 325 | handle_reset_view(); |