From 4bef4f94c0ec89ef7b14bc267f52ba00a6dcdc2b Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 4 Aug 2023 00:44:07 +0300 Subject: [PATCH] SL-18049 Part 3; Better indication when voice is muted --- indra/newview/llstatusbar.cpp | 24 ++++++++++++++++++ indra/newview/llstatusbar.h | 2 +- .../default/textures/icons/VoiceMute_Off.png | Bin 0 -> 753 bytes .../skins/default/textures/textures.xml | 1 + 4 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 indra/newview/skins/default/textures/icons/VoiceMute_Off.png diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index 0a87b14e17..a9ec4ffbb4 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -66,6 +66,7 @@ #include "llviewermenu.h" // for gMenuBarView #include "llviewerparcelmgr.h" #include "llviewerthrottle.h" +#include "llvoiceclient.h" #include "lluictrlfactory.h" #include "lltoolmgr.h" @@ -190,6 +191,16 @@ BOOL LLStatusBar::postBuild() LLHints::getInstance()->registerHintTarget("linden_balance", getChild("balance_bg")->getHandle()); gSavedSettings.getControl("MuteAudio")->getSignal()->connect(boost::bind(&LLStatusBar::onVolumeChanged, this, _2)); + gSavedSettings.getControl("EnableVoiceChat")->getSignal()->connect(boost::bind(&LLStatusBar::onVoiceChanged, this, _2)); + + if (gSavedSettings.getBOOL("EnableVoiceChat") && !LLVoiceClient::isMutedVoiceInstance()) + { + mBtnVolume->setImageUnselected(LLUI::getUIImage("Audio_Off")); + } + else + { + mBtnVolume->setImageUnselected(LLUI::getUIImage("VoiceMute_Off")); + } // Adding Net Stat Graph S32 x = getRect().getWidth() - 2; @@ -640,6 +651,19 @@ void LLStatusBar::onVolumeChanged(const LLSD& newvalue) refresh(); } +void LLStatusBar::onVoiceChanged(const LLSD& newvalue) +{ + if (newvalue.asBoolean() && !LLVoiceClient::isMutedVoiceInstance()) + { + mBtnVolume->setImageUnselected(LLUI::getUIImage("Audio_Off")); + } + else + { + mBtnVolume->setImageUnselected(LLUI::getUIImage("VoiceMute_Off")); + } + refresh(); +} + void LLStatusBar::onUpdateFilterTerm() { LLWString searchValue = utf8str_to_wstring( mFilterEdit->getValue() ); diff --git a/indra/newview/llstatusbar.h b/indra/newview/llstatusbar.h index 3002b91c10..3e9190652d 100644 --- a/indra/newview/llstatusbar.h +++ b/indra/newview/llstatusbar.h @@ -99,12 +99,12 @@ private: void onClickBuyCurrency(); void onVolumeChanged(const LLSD& newvalue); + void onVoiceChanged(const LLSD& newvalue); void onMouseEnterPresetsCamera(); void onMouseEnterPresets(); void onMouseEnterVolume(); void onMouseEnterNearbyMedia(); - void onClickScreen(S32 x, S32 y); static void onClickMediaToggle(void* data); static void onClickBalance(void* data); diff --git a/indra/newview/skins/default/textures/icons/VoiceMute_Off.png b/indra/newview/skins/default/textures/icons/VoiceMute_Off.png new file mode 100644 index 0000000000000000000000000000000000000000..425ba267a51cd9faf2b30076f81cc612e7876c40 GIT binary patch literal 753 zcmVPx#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0)|OMK~yMHZBk!I zQ(+W8a||Ziyz`E2H6J4B&s$L-(ZfavixPx{2;D;~C-Ws}B=w*VQHZu4dTC<3Ad`M>|rK?8w6hUImvJZZJU{_d{+ z1;>3-ggT9e7O;9*qw$toDyXvzd?o~To0@=6CUdM-IRoNS zHj$vCM&oZh!}E$>PL7h}xU2K?^O0;eo0cR=WO+kF!?jx869OY4WE*1@lF4Ko!wGNY z6&{5sih^FRH@zMh0PV^O@VFWLO>~`*)o>y)vnk7?*!PEds|Ki4sw)_NMaIUYzkPjb zO`!mS*$g|Ko#4a`Qd|%j90X}&L-waquJ5_rc+~(|ma`)xBfe9i(Ay%;J0A>!w7d)l z!^5zLuX?AW18%mp!G_mcD#YWP4+%MU{0i6c`|GmLm){GAbw6A#aJ07rUI(OT6b^=l zfbcwUgcJ*<(wolx{bx0IfVj9B4!>OO@4r_RMG*1vmvTADkVwdT jHTVR198ZzQd=&lx9S$zU)N7E000000NkvXXu0mjfynj+8 literal 0 HcmV?d00001 diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index 21335bf6c3..d237ddd518 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -63,6 +63,7 @@ with the same filename but different name +