summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Nikolenko <maximnproductengine@lindenlab.com>2023-02-02 13:43:11 +0200
committerMaxim Nikolenko <maximnproductengine@lindenlab.com>2023-02-02 13:43:11 +0200
commit0169e8cc976bd261a1d02d248eeed21a3e607201 (patch)
tree8532f14564f8f6432234c444e5d770e3da614a5e
parentc43336d5ed211ab77f2dc12b6cb7442d7544a2f7 (diff)
SL-19126 Add a button to Graphics Presets fly-out to open Auto adjust settings
-rw-r--r--indra/newview/llpanelpresetspulldown.cpp12
-rw-r--r--indra/newview/llpanelpresetspulldown.h1
-rw-r--r--indra/newview/skins/default/xui/en/panel_presets_pulldown.xml15
3 files changed, 26 insertions, 2 deletions
diff --git a/indra/newview/llpanelpresetspulldown.cpp b/indra/newview/llpanelpresetspulldown.cpp
index 23e4fa8887..f6e501f147 100644
--- a/indra/newview/llpanelpresetspulldown.cpp
+++ b/indra/newview/llpanelpresetspulldown.cpp
@@ -34,6 +34,7 @@
#include "llbutton.h"
#include "lltabcontainer.h"
#include "llfloater.h"
+#include "llfloaterperformance.h"
#include "llfloaterreg.h"
#include "llpresetsmanager.h"
#include "llsliderctrl.h"
@@ -50,6 +51,7 @@ LLPanelPresetsPulldown::LLPanelPresetsPulldown()
mHoverTimer.stop();
mCommitCallbackRegistrar.add("Presets.GoGraphicsPrefs", boost::bind(&LLPanelPresetsPulldown::onGraphicsButtonClick, this, _2));
+ mCommitCallbackRegistrar.add("Presets.GoAutofpsPrefs", boost::bind(&LLPanelPresetsPulldown::onAutofpsButtonClick, this, _2));
mCommitCallbackRegistrar.add("Presets.RowClick", boost::bind(&LLPanelPresetsPulldown::onRowClick, this, _2));
buildFromFile( "panel_presets_pulldown.xml");
@@ -157,3 +159,13 @@ void LLPanelPresetsPulldown::onGraphicsButtonClick(const LLSD& user_data)
}
}
}
+
+void LLPanelPresetsPulldown::onAutofpsButtonClick(const LLSD& user_data)
+{
+ setVisible(FALSE);
+ LLFloaterPerformance* performance_floater = LLFloaterReg::showTypedInstance<LLFloaterPerformance>("performance");
+ if (performance_floater)
+ {
+ performance_floater->showAutoadjustmentsPanel();
+ }
+}
diff --git a/indra/newview/llpanelpresetspulldown.h b/indra/newview/llpanelpresetspulldown.h
index c0d32b9b21..79bd6886b1 100644
--- a/indra/newview/llpanelpresetspulldown.h
+++ b/indra/newview/llpanelpresetspulldown.h
@@ -41,6 +41,7 @@ class LLPanelPresetsPulldown : public LLPanelPulldown
private:
void onGraphicsButtonClick(const LLSD& user_data);
+ void onAutofpsButtonClick(const LLSD& user_data);
void onRowClick(const LLSD& user_data);
std::list<std::string> mPresetNames;
diff --git a/indra/newview/skins/default/xui/en/panel_presets_pulldown.xml b/indra/newview/skins/default/xui/en/panel_presets_pulldown.xml
index b87dda2315..b3d165c4fd 100644
--- a/indra/newview/skins/default/xui/en/panel_presets_pulldown.xml
+++ b/indra/newview/skins/default/xui/en/panel_presets_pulldown.xml
@@ -8,7 +8,7 @@
border="false"
chrome="true"
follows="bottom"
- height="155"
+ height="185"
layout="topleft"
name="presets_pulldown"
width="225">
@@ -57,7 +57,7 @@
width="215" />
<button
name="open_prefs_btn"
- label="Open Graphics Preferences"
+ label="Graphics Preferences"
tool_tip = "Bring up graphics prefs"
top_delta="5"
left="15"
@@ -66,4 +66,15 @@
<button.commit_callback
function="Presets.GoGraphicsPrefs" />
</button>
+ <button
+ name="open_autofps_btn"
+ label="Auto-FPS settings"
+ tool_tip = "Bring up auto-adjust settings"
+ top_pad="5"
+ left="15"
+ height="20"
+ width="200">
+ <button.commit_callback
+ function="Presets.GoAutofpsPrefs" />
+ </button>
</panel>