diff options
author | Mnikolenko Productengine <mnikolenko@productengine.com> | 2021-06-15 19:25:08 +0300 |
---|---|---|
committer | Mnikolenko Productengine <mnikolenko@productengine.com> | 2021-06-15 19:25:08 +0300 |
commit | 0914f5c48f777705bdc57188e7372707f7977e5a (patch) | |
tree | ff08b44fc13fd666ea06955fcbe8bdeee81db3b6 /indra/newview/llfloaterperformance.cpp | |
parent | 10a770047d90045e882a65e5347da3530b189c42 (diff) |
SL-15297 WIP Implement performance floater #2
Diffstat (limited to 'indra/newview/llfloaterperformance.cpp')
-rw-r--r-- | indra/newview/llfloaterperformance.cpp | 36 |
1 files changed, 34 insertions, 2 deletions
diff --git a/indra/newview/llfloaterperformance.cpp b/indra/newview/llfloaterperformance.cpp index 8024d1539c..a44c3a262d 100644 --- a/indra/newview/llfloaterperformance.cpp +++ b/indra/newview/llfloaterperformance.cpp @@ -27,11 +27,15 @@ #include "llfloaterperformance.h" #include "llappearancemgr.h" +#include "llavataractions.h" #include "llavatarrendernotifier.h" #include "llfeaturemanager.h" #include "llfloaterreg.h" #include "llnamelistctrl.h" +#include "llfloaterpreference.h" // LLAvatarComplexityControls +#include "llsliderctrl.h" #include "lltextbox.h" +#include "lltrans.h" #include "llvoavatar.h" @@ -43,6 +47,7 @@ LLFloaterPerformance::LLFloaterPerformance(const LLSD& key) LLFloaterPerformance::~LLFloaterPerformance() { + mComplexityChangedSignal.disconnect(); } BOOL LLFloaterPerformance::postBuild() @@ -79,7 +84,11 @@ BOOL LLFloaterPerformance::postBuild() mNearbyPanel->getChild<LLButton>("exceptions_btn")->setCommitCallback(boost::bind(&LLFloaterPerformance::onClickExceptions, this)); mNearbyList = mNearbyPanel->getChild<LLNameListCtrl>("nearby_list"); - + + updateComplexityText(); + mComplexityChangedSignal = gSavedSettings.getControl("IndirectMaxComplexity")->getCommitSignal()->connect(boost::bind(&LLFloaterPerformance::updateComplexityText, this)); + mNearbyPanel->getChild<LLSliderCtrl>("IndirectMaxComplexity")->setCommitCallback(boost::bind(&LLFloaterPerformance::updateMaxComplexity, this)); + return TRUE; } @@ -151,6 +160,7 @@ void LLFloaterPerformance::populateHUDList() mHUDList->addElement(item); } + mHUDList->sortByColumnIndex(1, FALSE); mHUDsPanel->getChild<LLTextBox>("huds_value")->setValue(std::to_string(complexity_list.size())); } @@ -185,10 +195,19 @@ void LLFloaterPerformance::populateNearbyList() row[2]["value"] = avatar->getFullname(); row[2]["font"]["name"] = "SANSSERIF"; - mNearbyList->addElement(item); + LLScrollListItem* av_item = mNearbyList->addElement(item); + if(av_item && LLAvatarActions::isFriend(avatar->getID())) + { + LLScrollListText* name_text = dynamic_cast<LLScrollListText*>(av_item->getColumn(2)); + if (name_text) + { + name_text->setColor(LLUIColorTable::instance().getColor("ConversationFriendColor")); + } + } } char_iter++; } + mNearbyList->sortByColumnIndex(1, FALSE); } @@ -213,4 +232,17 @@ void LLFloaterPerformance::onClickExceptions() LLFloaterReg::showInstance("avatar_render_settings"); } +void LLFloaterPerformance::updateMaxComplexity() +{ + LLAvatarComplexityControls::updateMax( + mNearbyPanel->getChild<LLSliderCtrl>("IndirectMaxComplexity"), + mNearbyPanel->getChild<LLTextBox>("IndirectMaxComplexityText")); +} + +void LLFloaterPerformance::updateComplexityText() +{ + LLAvatarComplexityControls::setText(gSavedSettings.getU32("RenderAvatarMaxComplexity"), + mNearbyPanel->getChild<LLTextBox>("IndirectMaxComplexityText", true)); +} + // EOF |