diff options
author | Graham Linden <graham@lindenlab.com> | 2018-05-31 17:10:48 +0100 |
---|---|---|
committer | Graham Linden <graham@lindenlab.com> | 2018-05-31 17:10:48 +0100 |
commit | eb8eaa58a4e28b4db2736000f22fbd97371ef9db (patch) | |
tree | f27b7dccc4409bce20d9173a6f17d971c689637e /indra/newview/llfloatercamera.cpp | |
parent | c70119ebabc4b06e2b0db02aea8c56e01fbc666e (diff) | |
parent | f0ae109b696671c5773a5084a7329d0b164b7735 (diff) |
Merge storm-2145 dev into lindenlab branch parented from viewer-release
Diffstat (limited to 'indra/newview/llfloatercamera.cpp')
-rw-r--r-- | indra/newview/llfloatercamera.cpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/indra/newview/llfloatercamera.cpp b/indra/newview/llfloatercamera.cpp index 20d650fa37..c12ccb386e 100644 --- a/indra/newview/llfloatercamera.cpp +++ b/indra/newview/llfloatercamera.cpp @@ -42,6 +42,7 @@ #include "llslider.h" #include "llfirstuse.h" #include "llhints.h" +#include "lltabcontainer.h" static LLDefaultChildRegistry::Register<LLPanelCameraItem> r("panel_camera_item"); @@ -353,6 +354,7 @@ LLFloaterCamera::LLFloaterCamera(const LLSD& val) { LLHints::registerHintTarget("view_popup", getHandle()); mCommitCallbackRegistrar.add("CameraPresets.ChangeView", boost::bind(&LLFloaterCamera::onClickCameraItem, _2)); + mCommitCallbackRegistrar.add("Presets.GoViewPrefs", boost::bind(&LLFloaterCamera::onViewButtonClick, this, _2)); } // virtual @@ -376,6 +378,33 @@ BOOL LLFloaterCamera::postBuild() return LLFloater::postBuild(); } +F32 LLFloaterCamera::getCurrentTransparency() +{ + + static LLCachedControl<F32> camera_opacity(gSavedSettings, "CameraOpacity"); + static LLCachedControl<F32> active_floater_transparency(gSavedSettings, "ActiveFloaterTransparency"); + return llmin(camera_opacity(), active_floater_transparency()); + +} + +void LLFloaterCamera::onViewButtonClick(const LLSD& user_data) +{ + // bring up the prefs floater + LLFloater* prefsfloater = LLFloaterReg::showInstance("preferences"); + if (prefsfloater) + { + // grab the 'view' panel from the preferences floater and + // bring it the front! + LLTabContainer* tabcontainer = prefsfloater->getChild<LLTabContainer>("pref core"); + LLPanel* graphicspanel = prefsfloater->getChild<LLPanel>("view"); + if (tabcontainer && graphicspanel) + { + tabcontainer->selectTabPanel(graphicspanel); + } + } +} + + void LLFloaterCamera::fillFlatlistFromPanel (LLFlatListView* list, LLPanel* panel) { // copying child list and then iterating over a copy, because list itself |