From 649c29674c63ef39551f75570862941ed889b443 Mon Sep 17 00:00:00 2001 From: Inusaito Sayori Date: Sat, 14 Dec 2013 20:48:48 -0500 Subject: [PATCH] Feature Request: User control over which UI will become hidden when going into mouselook. Adds three checkboxes to input and camera preferences: Floaters, Notices, and Menubar Should satisfy Issue 462. SV-462 #close Done~ --- indra/newview/app_settings/settings.xml | 33 +++++++++++++++++++ indra/newview/llagent.cpp | 20 +++++++---- .../xui/en-us/panel_preferences_input.xml | 4 +++ 3 files changed, 51 insertions(+), 6 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 6b6ab0ab0..8b3a3524a 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -763,6 +763,39 @@ Value 0 + LiruMouselookHidesFloaters + + Comment + Whether or not floaters open during third person will be hidden while in mouselook + Persist + 1 + Type + Boolean + Value + 1 + + LiruMouselookHidesMenubar + + Comment + Whether or not the main menu bar will be hidden in mouselook + Persist + 1 + Type + Boolean + Value + 1 + + LiruMouselookHidesNotices + + Comment + Whether or not notices will be hidden in mouselook + Persist + 1 + Type + Boolean + Value + 0 + LiruMouselookMenu Comment diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 081e3b65f..599ee5496 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -52,6 +52,7 @@ #include "llmoveview.h" #include "llchatbar.h" #include "llnotificationsutil.h" +#include "llnotify.h" // For hiding notices(gNotifyBoxView) in mouselook #include "llparcel.h" #include "llrendersphere.h" #include "llsdmessage.h" @@ -2043,6 +2044,8 @@ void LLAgent::endAnimationUpdateUI() gMenuBarView->setVisible(TRUE); gStatusBar->setVisibleForMouselook(true); + // Show notices + gNotifyBoxView->setVisible(true); LLToolMgr::getInstance()->setCurrentToolset(gBasicToolset); @@ -2053,7 +2056,7 @@ void LLAgent::endAnimationUpdateUI() } // Only pop if we have pushed... - if (TRUE == mViewsPushed) + if (mViewsPushed) { LLFloaterView::skip_list_t skip_list; skip_list.insert(LLFloaterMap::getInstance()); @@ -2134,9 +2137,11 @@ void LLAgent::endAnimationUpdateUI() if (gAgentCamera.getCameraMode() == CAMERA_MODE_MOUSELOOK) { // hide menus - gMenuBarView->setVisible(FALSE); + gMenuBarView->setVisible(!gSavedSettings.getBOOL("LiruMouselookHidesMenubar")); gStatusBar->setVisibleForMouselook(false); + if (gSavedSettings.getBOOL("LiruMouselookHidesNotices")) + gNotifyBoxView->setVisible(false); // clear out camera lag effect gAgentCamera.clearCameraLag(); @@ -2146,7 +2151,7 @@ void LLAgent::endAnimationUpdateUI() LLToolMgr::getInstance()->setCurrentToolset(gMouselookToolset); - mViewsPushed = TRUE; + mViewsPushed = gSavedSettings.getBOOL("LiruMouselookHidesFloaters"); if (mMouselookModeInSignal) { @@ -2155,9 +2160,12 @@ void LLAgent::endAnimationUpdateUI() // hide all floaters except the mini map - LLFloaterView::skip_list_t skip_list; - skip_list.insert(LLFloaterMap::getInstance()); - gFloaterView->pushVisibleAll(FALSE, skip_list); + if (mViewsPushed) // Singu Note: Only hide if the setting is true. + { + LLFloaterView::skip_list_t skip_list; + skip_list.insert(LLFloaterMap::getInstance()); + gFloaterView->pushVisibleAll(FALSE, skip_list); + } if( gMorphView ) { diff --git a/indra/newview/skins/default/xui/en-us/panel_preferences_input.xml b/indra/newview/skins/default/xui/en-us/panel_preferences_input.xml index cdbc28c25..aadd1526c 100644 --- a/indra/newview/skins/default/xui/en-us/panel_preferences_input.xml +++ b/indra/newview/skins/default/xui/en-us/panel_preferences_input.xml @@ -5,6 +5,10 @@ + UI Hidden in mouselook: + + + Movement Options: