diff options
author | Mnikolenko Productengine <mnikolenko@productengine.com> | 2022-01-24 16:33:44 +0200 |
---|---|---|
committer | Mnikolenko Productengine <mnikolenko@productengine.com> | 2022-01-24 16:33:44 +0200 |
commit | d7603ffc9c94a6cdab94bc23745903c7fff25ff1 (patch) | |
tree | 7cdc77fc087a6d7442d52e7e0faa0f7823245693 /indra/newview/llfloaterpreference.cpp | |
parent | 5b04123aec281de30fb8b6473600f6b1e9d16909 (diff) |
SL-16627 AutoFPS first pass
Diffstat (limited to 'indra/newview/llfloaterpreference.cpp')
-rw-r--r-- | indra/newview/llfloaterpreference.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 8ea5519929..fbc3275b1e 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -304,6 +304,7 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key) mCommitCallbackRegistrar.add("Pref.RememberedUsernames", boost::bind(&LLFloaterPreference::onClickRememberedUsernames, this)); mCommitCallbackRegistrar.add("Pref.SpellChecker", boost::bind(&LLFloaterPreference::onClickSpellChecker, this)); mCommitCallbackRegistrar.add("Pref.Advanced", boost::bind(&LLFloaterPreference::onClickAdvanced, this)); + mCommitCallbackRegistrar.add("Pref.MouseDown", boost::bind(&LLFloaterPreference::onUICtrlMouseDown, this)); sSkin = gSavedSettings.getString("SkinCurrent"); @@ -1782,6 +1783,23 @@ void LLFloaterPreference::updateSearchableItems() mSearchDataDirty = true; } +void LLFloaterPreference::onUICtrlMouseDown() +{ + static LLCachedControl<bool> use_auto_adjust(gSavedSettings,"AutoFPS"); + if (use_auto_adjust) + { + LLNotificationsUtil::add("AutoFPSConfirmDisable", LLSD(), LLSD(), + [this](const LLSD¬if, const LLSD&resp) + { + S32 opt = LLNotificationsUtil::getSelectedOption(notif, resp); + if (opt == 0) + { + gSavedSettings.setBOOL("AutoFPS", FALSE); + } + }); + } +} + void LLFloaterPreference::applyUIColor(LLUICtrl* ctrl, const LLSD& param) { LLUIColorTable::instance().setColor(param.asString(), LLColor4(ctrl->getValue())); |