diff options
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/app_settings/settings.xml | 24 | ||||
-rw-r--r-- | indra/newview/llbottomtray.cpp | 52 | ||||
-rw-r--r-- | indra/newview/llbottomtray.h | 9 | ||||
-rw-r--r-- | indra/newview/llfloatercamera.cpp | 3 | ||||
-rw-r--r-- | indra/newview/llnavigationbar.cpp | 3 | ||||
-rw-r--r-- | indra/newview/llpanellogin.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llsidetray.cpp | 2 | ||||
-rw-r--r-- | indra/newview/lltool.cpp | 8 | ||||
-rw-r--r-- | indra/newview/lltoolpie.cpp | 16 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_bottomtray.xml | 1 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_bottomtray_lite.xml | 1 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_login.xml | 1 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_navigation_bar.xml | 1 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/widgets/sidetray_tab.xml | 4 |
14 files changed, 84 insertions, 43 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 9c19d2c638..18a064c7ba 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -2820,6 +2820,28 @@ <key>Value</key> <integer>1</integer> </map> + <key>EnableGrab</key> + <map> + <key>Comment</key> + <string>Use Ctrl+mouse to grab and manipulate objects</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>1</integer> + </map> + <key>EnableAltZoom</key> + <map> + <key>Comment</key> + <string>Use Alt+mouse to look at and zoom in on objects</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>1</integer> + </map> <key>EnableRippleWater</key> <map> <key>Comment</key> @@ -11684,7 +11706,7 @@ <string>Boolean</string> <key>Value</key> <integer>1</integer> - </map> + </map> <key>WindowFullScreen</key> <map> <key>Comment</key> diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp index 33d006578d..b5fa198bae 100644 --- a/indra/newview/llbottomtray.cpp +++ b/indra/newview/llbottomtray.cpp @@ -65,31 +65,42 @@ LLDefaultChildRegistry::Register<LLBottomtrayButton> bottomtray_button("bottomtr // virtual BOOL LLBottomtrayButton::handleHover(S32 x, S32 y, MASK mask) { - S32 screenX, screenY; - localPointToScreen(x, y, &screenX, &screenY); - // pass hover to bottomtray - LLBottomTray::getInstance()->onDraggableButtonHover(screenX, screenY); - return FALSE; + if (mCanDrag) + { + S32 screenX, screenY; + localPointToScreen(x, y, &screenX, &screenY); + // pass hover to bottomtray + LLBottomTray::getInstance()->onDraggableButtonHover(screenX, screenY); + return TRUE; + } + else + { + return LLButton::handleHover(x, y, mask); + } } //virtual BOOL LLBottomtrayButton::handleMouseUp(S32 x, S32 y, MASK mask) { - S32 screenX, screenY; - localPointToScreen(x, y, &screenX, &screenY); - // pass mouse up to bottomtray - LLBottomTray::getInstance()->onDraggableButtonMouseUp(this, screenX, screenY); - LLButton::handleMouseUp(x, y, mask); - return FALSE; + if (mCanDrag) + { + S32 screenX, screenY; + localPointToScreen(x, y, &screenX, &screenY); + // pass mouse up to bottomtray + LLBottomTray::getInstance()->onDraggableButtonMouseUp(this, screenX, screenY); + } + return LLButton::handleMouseUp(x, y, mask); } //virtual BOOL LLBottomtrayButton::handleMouseDown(S32 x, S32 y, MASK mask) { - S32 screenX, screenY; - localPointToScreen(x, y, &screenX, &screenY); - // pass mouse up to bottomtray - LLBottomTray::getInstance()->onDraggableButtonMouseDown(this, screenX, screenY); - LLButton::handleMouseDown(x, y, mask); - return FALSE; + if (mCanDrag) + { + S32 screenX, screenY; + localPointToScreen(x, y, &screenX, &screenY); + // pass mouse up to bottomtray + LLBottomTray::getInstance()->onDraggableButtonMouseDown(this, screenX, screenY); + } + return LLButton::handleMouseDown(x, y, mask); } static void update_build_button_enable_state() @@ -150,8 +161,6 @@ public: { mFactoryMap["chat_bar"] = LLCallbackMap(LLBottomTray::createNearbyChatBar, NULL); buildFromFile("panel_bottomtray_lite.xml"); - // Necessary for focus movement among child controls - setFocusRoot(TRUE); } BOOL postBuild() @@ -211,16 +220,11 @@ LLBottomTray::LLBottomTray(const LLSD&) buildFromFile("panel_bottomtray.xml"); - LLUICtrl::CommitCallbackRegistry::defaultRegistrar().add("CameraPresets.ChangeView", boost::bind(&LLFloaterCamera::onClickCameraItem, _2)); - //this is to fix a crash that occurs because LLBottomTray is a singleton //and thus is deleted at the end of the viewers lifetime, but to be cleanly //destroyed LLBottomTray requires some subsystems that are long gone //LLUI::getRootView()->addChild(this); - // Necessary for focus movement among child controls - setFocusRoot(TRUE); - { mBottomTrayLite = new LLBottomTrayLite(); mBottomTrayLite->setFollowsAll(); diff --git a/indra/newview/llbottomtray.h b/indra/newview/llbottomtray.h index 8d8a42c553..dc98170049 100644 --- a/indra/newview/llbottomtray.h +++ b/indra/newview/llbottomtray.h @@ -54,7 +54,9 @@ class LLBottomtrayButton : public LLButton public: struct Params : public LLInitParam::Block<Params, LLButton::Params> { - Params(){} + Optional<bool> can_drag; + Params() + : can_drag("can_drag", true){} }; /*virtual*/ BOOL handleHover(S32 x, S32 y, MASK mask); /*virtual*/ BOOL handleMouseUp(S32 x, S32 y, MASK mask); @@ -62,11 +64,14 @@ public: protected: LLBottomtrayButton(const Params& p) - : LLButton(p) + : LLButton(p), + mCanDrag(p.can_drag) { } friend class LLUICtrlFactory; + + bool mCanDrag; }; class LLBottomTray diff --git a/indra/newview/llfloatercamera.cpp b/indra/newview/llfloatercamera.cpp index ad24c6534a..b4e211a38e 100644 --- a/indra/newview/llfloatercamera.cpp +++ b/indra/newview/llfloatercamera.cpp @@ -336,6 +336,9 @@ LLFloaterCamera::LLFloaterCamera(const LLSD& val) mCurrMode(CAMERA_CTRL_MODE_PAN), mPrevMode(CAMERA_CTRL_MODE_PAN) { + LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar; + registrar.add("CameraPresets.ChangeView", boost::bind(&LLFloaterCamera::onClickCameraItem, _2)); + } // virtual diff --git a/indra/newview/llnavigationbar.cpp b/indra/newview/llnavigationbar.cpp index 58849393b4..e4f83ce6b9 100644 --- a/indra/newview/llnavigationbar.cpp +++ b/indra/newview/llnavigationbar.cpp @@ -276,9 +276,6 @@ LLNavigationBar::LLNavigationBar() // set a listener function for LoginComplete event LLAppViewer::instance()->setOnLoginCompletedCallback(boost::bind(&LLNavigationBar::handleLoginComplete, this)); - - // Necessary for focus movement among child controls - setFocusRoot(TRUE); } LLNavigationBar::~LLNavigationBar() diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index 7c93d8a1f9..2f3e0875b8 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -163,8 +163,6 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, mHtmlAvailable( TRUE ), mListener(new LLPanelLoginListener(this)) { - setFocusRoot(TRUE); - setBackgroundVisible(FALSE); setBackgroundOpaque(TRUE); diff --git a/indra/newview/llsidetray.cpp b/indra/newview/llsidetray.cpp index 521e5005e8..53d8a5c19e 100644 --- a/indra/newview/llsidetray.cpp +++ b/indra/newview/llsidetray.cpp @@ -155,8 +155,6 @@ LLSideTrayTab::LLSideTrayTab(const Params& p) mDescription(p.description), mMainPanel(NULL) { - // Necessary for focus movement among child controls - setFocusRoot(TRUE); } LLSideTrayTab::~LLSideTrayTab() diff --git a/indra/newview/lltool.cpp b/indra/newview/lltool.cpp index 282d4e19c6..2d8ce95347 100644 --- a/indra/newview/lltool.cpp +++ b/indra/newview/lltool.cpp @@ -33,6 +33,7 @@ #include "llview.h" #include "llviewerwindow.h" +#include "llviewercontrol.h" #include "lltoolcomp.h" #include "lltoolfocus.h" #include "llfocusmgr.h" @@ -190,9 +191,12 @@ LLTool* LLTool::getOverrideTool(MASK mask) { return NULL; } - if (mask & MASK_ALT) + if (gSavedSettings.getBOOL("EnableAltZoom")) { - return LLToolCamera::getInstance(); + if (mask & MASK_ALT) + { + return LLToolCamera::getInstance(); + } } return NULL; } diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index 864de018e0..2ee3e4ffed 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -1210,15 +1210,17 @@ void LLToolPie::handleDeselect() LLTool* LLToolPie::getOverrideTool(MASK mask) { - if (mask == MASK_CONTROL) + if (gSavedSettings.getBOOL("EnableGrab")) { - return LLToolGrab::getInstance(); - } - else if (mask == (MASK_CONTROL | MASK_SHIFT)) - { - return LLToolGrab::getInstance(); + if (mask == MASK_CONTROL) + { + return LLToolGrab::getInstance(); + } + else if (mask == (MASK_CONTROL | MASK_SHIFT)) + { + return LLToolGrab::getInstance(); + } } - return LLTool::getOverrideTool(mask); } diff --git a/indra/newview/skins/default/xui/en/panel_bottomtray.xml b/indra/newview/skins/default/xui/en/panel_bottomtray.xml index 63068a069f..013a8090f7 100644 --- a/indra/newview/skins/default/xui/en/panel_bottomtray.xml +++ b/indra/newview/skins/default/xui/en/panel_bottomtray.xml @@ -5,6 +5,7 @@ bg_opaque_color="DkGray" chrome="true" follows="left|bottom|right" + focus_root="true" height="33" layout="topleft" left="0" diff --git a/indra/newview/skins/default/xui/en/panel_bottomtray_lite.xml b/indra/newview/skins/default/xui/en/panel_bottomtray_lite.xml index efb1da4c05..b5e1a5f16d 100644 --- a/indra/newview/skins/default/xui/en/panel_bottomtray_lite.xml +++ b/indra/newview/skins/default/xui/en/panel_bottomtray_lite.xml @@ -10,6 +10,7 @@ layout="topleft" left="0" name="bottom_tray_lite" + focus_root="true" tab_stop="true" top="28" chrome="true" diff --git a/indra/newview/skins/default/xui/en/panel_login.xml b/indra/newview/skins/default/xui/en/panel_login.xml index 891616b838..321e6c4cda 100644 --- a/indra/newview/skins/default/xui/en/panel_login.xml +++ b/indra/newview/skins/default/xui/en/panel_login.xml @@ -5,6 +5,7 @@ height="600" layout="topleft" left="0" name="panel_login" +focus_root="true" top="600" width="996"> <panel.string diff --git a/indra/newview/skins/default/xui/en/panel_navigation_bar.xml b/indra/newview/skins/default/xui/en/panel_navigation_bar.xml index 082d51ed3c..8a7bd53054 100644 --- a/indra/newview/skins/default/xui/en/panel_navigation_bar.xml +++ b/indra/newview/skins/default/xui/en/panel_navigation_bar.xml @@ -4,6 +4,7 @@ background_visible="true" bg_opaque_color="MouseGray" follows="left|top|right" + focus_root="true" height="60" layout="topleft" name="navigation_bar" diff --git a/indra/newview/skins/default/xui/en/widgets/sidetray_tab.xml b/indra/newview/skins/default/xui/en/widgets/sidetray_tab.xml new file mode 100644 index 0000000000..aa8461d367 --- /dev/null +++ b/indra/newview/skins/default/xui/en/widgets/sidetray_tab.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<sidetray_tab + focus_root="true" + /> |