diff options
| author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2023-08-04 00:44:07 +0300 |
|---|---|---|
| committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2023-08-04 00:44:07 +0300 |
| commit | 4bef4f94c0ec89ef7b14bc267f52ba00a6dcdc2b (patch) | |
| tree | edcc7a538208de9a0d7219940c0ce752b0d4bc1b /indra/newview/llstatusbar.cpp | |
| parent | 08484cec5ac1933fdc689ddd3dcbca72229f8118 (diff) | |
SL-18049 Part 3; Better indication when voice is muted
Diffstat (limited to 'indra/newview/llstatusbar.cpp')
| -rw-r--r-- | indra/newview/llstatusbar.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
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<LLView>("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() ); |
