diff options
author | Jacek Antonelli | 2008-09-22 14:57:04 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-09-22 14:57:04 -0500 |
commit | eac93146ebe8f99fee0f1f99cd91e1386022298f (patch) | |
tree | 4e1dc6b022c9490c9949dcf012084fe2f80da053 /linden/indra | |
parent | Merge branch 'VWR-8024' into next-merge (diff) | |
parent | VWR-8341: Bring back a UI indicator of 'Flycam' text. (diff) | |
download | meta-impy-eac93146ebe8f99fee0f1f99cd91e1386022298f.zip meta-impy-eac93146ebe8f99fee0f1f99cd91e1386022298f.tar.gz meta-impy-eac93146ebe8f99fee0f1f99cd91e1386022298f.tar.bz2 meta-impy-eac93146ebe8f99fee0f1f99cd91e1386022298f.tar.xz |
Merge branch 'VWR-8341' into next-merge
Diffstat (limited to 'linden/indra')
-rw-r--r-- | linden/indra/newview/lloverlaybar.cpp | 18 | ||||
-rw-r--r-- | linden/indra/newview/lloverlaybar.h | 1 | ||||
-rw-r--r-- | linden/indra/newview/skins/default/xui/en-us/panel_overlaybar.xml | 4 |
3 files changed, 23 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(); |
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: | |||
69 | static void onClickIMReceived(void* data); | 69 | static void onClickIMReceived(void* data); |
70 | static void onClickSetNotBusy(void* data); | 70 | static void onClickSetNotBusy(void* data); |
71 | static void onClickReleaseKeys(void* data); | 71 | static void onClickReleaseKeys(void* data); |
72 | static void onClickFlycam(void* data); | ||
72 | static void onClickMouselook(void* data); | 73 | static void onClickMouselook(void* data); |
73 | static void onClickStandUp(void* data); | 74 | static void onClickStandUp(void* data); |
74 | static void onClickResetView(void* data); | 75 | 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 @@ | |||
32 | tool_tip="A script has taken control of your keys. Click here to release them." | 32 | tool_tip="A script has taken control of your keys. Click here to release them." |
33 | width="102" /> | 33 | width="102" /> |
34 | <button bottom="1" follows="left|bottom" font="SansSerif" halign="center" height="20" | 34 | <button bottom="1" follows="left|bottom" font="SansSerif" halign="center" height="20" |
35 | label="Flycam" label_selected="Flycam" left="229" name="Flycam" scale_image="true" | ||
36 | tool_tip="Your camera is under joystick control, click here to release it." | ||
37 | width="102" /> | ||
38 | <button bottom="1" follows="left|bottom" font="SansSerif" halign="center" height="20" | ||
35 | label="Mouselook" label_selected="Mouselook" left="343" name="Mouselook" | 39 | label="Mouselook" label_selected="Mouselook" left="343" name="Mouselook" |
36 | scale_image="true" | 40 | scale_image="true" |
37 | tool_tip="Use mouse to steer your view. If you have a gun, clicking will shoot." | 41 | tool_tip="Use mouse to steer your view. If you have a gun, clicking will shoot." |