diff options
author | maxim_productengine <mnikolenko@productengine.com> | 2012-10-18 18:58:55 +0300 |
---|---|---|
committer | maxim_productengine <mnikolenko@productengine.com> | 2012-10-18 18:58:55 +0300 |
commit | 9cc1dfd4e6f3859e690da578adde057ec9a82e18 (patch) | |
tree | ea5ead5d3aaa29ee38cadc4f7a0fc1c3b159146b | |
parent | 19f25eea3d5dab061441491b41fa8cc416a273b5 (diff) |
MAINT-1303 FIXED Hide menus and buttons after exiting mouselook if 'Hide all controls' is switched on.
-rw-r--r-- | indra/newview/app_settings/settings.xml | 12 | ||||
-rw-r--r-- | indra/newview/llagentcamera.cpp | 6 | ||||
-rw-r--r-- | indra/newview/llviewermenu.cpp | 37 |
3 files changed, 38 insertions, 17 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 7497a273ea..0dd997a51a 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -14059,5 +14059,17 @@ <real>1.0</real> </array> </map> + + <key>HideUIControls</key> + <map> + <key>Comment</key> + <string>Hide all menu items and buttons</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> </map> </llsd> diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp index 751b73e1eb..9025c7af8b 100644 --- a/indra/newview/llagentcamera.cpp +++ b/indra/newview/llagentcamera.cpp @@ -35,6 +35,7 @@ #include "llfloaterreg.h" #include "llhudmanager.h" #include "lljoystickbutton.h" +#include "llmoveview.h" #include "llselectmgr.h" #include "llsmoothstep.h" #include "lltoolmgr.h" @@ -2113,6 +2114,11 @@ void LLAgentCamera::changeCameraToDefault() { changeCameraToThirdPerson(); } + if (gSavedSettings.getBOOL("HideUIControls")) + { + gViewerWindow->setUIVisibility(false); + LLPanelStandStopFlying::getInstance()->setVisible(false); + } } diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 21a96a4e07..9d79d99204 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -3908,25 +3908,27 @@ class LLViewToggleUI : public view_listener_t { bool handleEvent(const LLSD& userdata) { - LLNotification::Params params("ConfirmHideUI"); - params.functor.function(boost::bind(&LLViewToggleUI::confirm, this, _1, _2)); - LLSD substitutions; + if(gAgentCamera.getCameraMode() != CAMERA_MODE_MOUSELOOK) + { + LLNotification::Params params("ConfirmHideUI"); + params.functor.function(boost::bind(&LLViewToggleUI::confirm, this, _1, _2)); + LLSD substitutions; #if LL_DARWIN - substitutions["SHORTCUT"] = "Cmd+Shift+U"; + substitutions["SHORTCUT"] = "Cmd+Shift+U"; #else - substitutions["SHORTCUT"] = "Ctrl+Shift+U"; + substitutions["SHORTCUT"] = "Ctrl+Shift+U"; #endif - params.substitutions = substitutions; - if (gViewerWindow->getUIVisibility()) - { - // hiding, so show notification - LLNotifications::instance().add(params); - } - else - { - LLNotifications::instance().forceResponse(params, 0); + params.substitutions = substitutions; + if (!gSavedSettings.getBOOL("HideUIControls")) + { + // hiding, so show notification + LLNotifications::instance().add(params); + } + else + { + LLNotifications::instance().forceResponse(params, 0); + } } - return true; } @@ -3936,8 +3938,9 @@ class LLViewToggleUI : public view_listener_t if (option == 0) // OK { - gViewerWindow->setUIVisibility(!gViewerWindow->getUIVisibility()); - LLPanelStandStopFlying::getInstance()->setVisible(gViewerWindow->getUIVisibility()); + gViewerWindow->setUIVisibility(gSavedSettings.getBOOL("HideUIControls")); + LLPanelStandStopFlying::getInstance()->setVisible(gSavedSettings.getBOOL("HideUIControls")); + gSavedSettings.setBOOL("HideUIControls",!gSavedSettings.getBOOL("HideUIControls")); } } }; |