summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/app_settings/commands.xml10
-rw-r--r--indra/newview/llfloaterperformance.cpp17
-rw-r--r--indra/newview/llfloaterperformance.h1
-rw-r--r--indra/newview/skins/default/textures/textures.xml1
-rw-r--r--indra/newview/skins/default/textures/toolbar_icons/performance.pngbin0 -> 451 bytes
-rw-r--r--indra/newview/skins/default/xui/en/strings.xml2
6 files changed, 28 insertions, 3 deletions
diff --git a/indra/newview/app_settings/commands.xml b/indra/newview/app_settings/commands.xml
index d0480ca47e..b0629938a9 100644
--- a/indra/newview/app_settings/commands.xml
+++ b/indra/newview/app_settings/commands.xml
@@ -276,4 +276,14 @@
is_running_function="Floater.IsOpen"
is_running_parameters="my_environments"
/>
+ <command name="performance"
+ available_in_toybox="true"
+ icon="Command_Performance_Icon"
+ label_ref="Command_Performance_Label"
+ tooltip_ref="Command_Performance_Tooltip"
+ execute_function="Floater.ToggleOrBringToFront"
+ execute_parameters="performance"
+ is_running_function="Floater.IsOpen"
+ is_running_parameters="performance"
+ />
</commands>
diff --git a/indra/newview/llfloaterperformance.cpp b/indra/newview/llfloaterperformance.cpp
index d7c0527b5c..dca19e0e28 100644
--- a/indra/newview/llfloaterperformance.cpp
+++ b/indra/newview/llfloaterperformance.cpp
@@ -36,6 +36,7 @@
#include "llfloaterpreference.h" // LLAvatarComplexityControls
#include "llfloaterreg.h"
#include "llnamelistctrl.h"
+#include "llradiogroup.h"
#include "llsliderctrl.h"
#include "lltextbox.h"
#include "lltrans.h"
@@ -114,6 +115,7 @@ BOOL LLFloaterPerformance::postBuild()
mObjectList->setIconClickedCallback(boost::bind(&LLFloaterPerformance::detachItem, this, _1));
mSettingsPanel->getChild<LLButton>("advanced_btn")->setCommitCallback(boost::bind(&LLFloaterPerformance::onClickAdvanced, this));
+ mSettingsPanel->getChild<LLRadioGroup>("graphics_quality")->setCommitCallback(boost::bind(&LLFloaterPerformance::onChangeQuality, this, _2));
mNearbyPanel->getChild<LLButton>("exceptions_btn")->setCommitCallback(boost::bind(&LLFloaterPerformance::onClickExceptions, this));
mNearbyPanel->getChild<LLCheckBoxCtrl>("hide_avatars")->setCommitCallback(boost::bind(&LLFloaterPerformance::onClickHideAvatars, this));
@@ -220,7 +222,7 @@ void LLFloaterPerformance::populateHUDList()
for (iter = complexity_list.begin(); iter != end; ++iter)
{
LLHUDComplexity hud_object_complexity = *iter;
- S32 obj_cost_short = hud_object_complexity.objectsCost / 1000;
+ S32 obj_cost_short = llmax((S32)hud_object_complexity.objectsCost / 1000, 1);
LLSD item;
item["special_id"] = hud_object_complexity.objectId;
item["target"] = LLNameListCtrl::SPECIAL;
@@ -279,7 +281,7 @@ void LLFloaterPerformance::populateObjectList()
for (iter = complexity_list.begin(); iter != end; ++iter)
{
LLObjectComplexity object_complexity = *iter;
- S32 obj_cost_short = object_complexity.objectCost / 1000;
+ S32 obj_cost_short = llmax((S32)object_complexity.objectCost / 1000, 1);
LLSD item;
item["special_id"] = object_complexity.objectId;
item["target"] = LLNameListCtrl::SPECIAL;
@@ -334,7 +336,7 @@ void LLFloaterPerformance::populateNearbyList()
LLVOAvatar* avatar = dynamic_cast<LLVOAvatar*>(*char_iter);
if (avatar && (LLVOAvatar::AOA_INVISIBLE != avatar->getOverallAppearance()))
{
- S32 complexity_short = avatar->getVisualComplexity() / 1000;
+ S32 complexity_short = llmax((S32)avatar->getVisualComplexity() / 1000, 1);;
LLSD item;
item["id"] = avatar->getID();
LLSD& row = item["columns"];
@@ -439,6 +441,15 @@ void LLFloaterPerformance::onClickAdvanced()
LLFloaterReg::showInstance("prefs_graphics_advanced");
}
+void LLFloaterPerformance::onChangeQuality(const LLSD& data)
+{
+ LLFloaterPreference* instance = LLFloaterReg::getTypedInstance<LLFloaterPreference>("preferences");
+ if (instance)
+ {
+ instance->onChangeQuality(data);
+ }
+}
+
void LLFloaterPerformance::onClickHideAvatars()
{
LLPipeline::toggleRenderTypeControl(LLPipeline::RENDER_TYPE_AVATAR);
diff --git a/indra/newview/llfloaterperformance.h b/indra/newview/llfloaterperformance.h
index 58f9447d4c..a5549685f6 100644
--- a/indra/newview/llfloaterperformance.h
+++ b/indra/newview/llfloaterperformance.h
@@ -59,6 +59,7 @@ private:
void populateNearbyList();
void onClickAdvanced();
+ void onChangeQuality(const LLSD& data);
void onClickHideAvatars();
void onClickExceptions();
diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml
index 03878d9fe7..cf5be9afa5 100644
--- a/indra/newview/skins/default/textures/textures.xml
+++ b/indra/newview/skins/default/textures/textures.xml
@@ -151,6 +151,7 @@ with the same filename but different name
<texture name="Command_Move_Icon" file_name="toolbar_icons/move.png" preload="true" />
<texture name="Command_Environments_Icon" file_name="toolbar_icons/environments.png" preload="true" />
<texture name="Command_People_Icon" file_name="toolbar_icons/people.png" preload="true" />
+ <texture name="Command_Performance_Icon" file_name="toolbar_icons/performance.png" preload="true" />
<texture name="Command_Picks_Icon" file_name="toolbar_icons/picks.png" preload="true" />
<texture name="Command_Places_Icon" file_name="toolbar_icons/places.png" preload="true" />
<texture name="Command_Preferences_Icon" file_name="toolbar_icons/preferences.png" preload="true" />
diff --git a/indra/newview/skins/default/textures/toolbar_icons/performance.png b/indra/newview/skins/default/textures/toolbar_icons/performance.png
new file mode 100644
index 0000000000..91baf849c8
--- /dev/null
+++ b/indra/newview/skins/default/textures/toolbar_icons/performance.png
Binary files differ
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index db6fbfe362..edf904226e 100644
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -4143,6 +4143,7 @@ Try enclosing path to the editor with double quotes.
<string name="Command_MiniMap_Label">Mini-map</string>
<string name="Command_Move_Label">Walk / run / fly</string>
<string name="Command_People_Label">People</string>
+ <string name="Command_Performance_Label">Graphics speed</string>
<string name="Command_Picks_Label">Picks</string>
<string name="Command_Places_Label">Places</string>
<string name="Command_Preferences_Label">Preferences</string>
@@ -4173,6 +4174,7 @@ Try enclosing path to the editor with double quotes.
<string name="Command_MiniMap_Tooltip">Show nearby people</string>
<string name="Command_Move_Tooltip">Moving your avatar</string>
<string name="Command_People_Tooltip">Friends, groups, and nearby people</string>
+ <string name="Command_Performance_Tooltip">Improve graphics speed</string>
<string name="Command_Picks_Tooltip">Places to show as favorites in your profile</string>
<string name="Command_Places_Tooltip">Places you've saved</string>
<string name="Command_Preferences_Tooltip">Preferences</string>