aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra
diff options
context:
space:
mode:
authorJacek Antonelli2008-09-22 20:18:50 -0500
committerJacek Antonelli2008-09-22 20:18:50 -0500
commitc401e51c2cdc18c9ca346c815c4cd0176fa3e145 (patch)
tree0f90d049723e4a7f3fd252d1d7c431ab2dbf686a /linden/indra
parentMerge branch 'VWR-8024' into next-merge (diff)
parentVWR-8341: Bring back a UI indicator of 'Flycam' text. (diff)
downloadmeta-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 'linden/indra')
-rw-r--r--linden/indra/newview/lloverlaybar.cpp18
-rw-r--r--linden/indra/newview/lloverlaybar.h1
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/panel_overlaybar.xml4
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
317void LLOverlayBar::onClickFlycam(void*)
318{
319 LLViewerJoystick::getInstance()->toggleFlycam();
320}
321
322// static
305void LLOverlayBar::onClickResetView(void* data) 323void 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."