SL-18049 Part 3; Better indication when voice is muted

master
Andrey Kleshchev 2023-08-04 00:44:07 +03:00
parent 08484cec5a
commit 4bef4f94c0
4 changed files with 26 additions and 1 deletions

View File

@ -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() );

View File

@ -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);

Binary file not shown.

After

Width:  |  Height:  |  Size: 753 B

View File

@ -63,6 +63,7 @@ with the same filename but different name
<texture name="AudioMute_Off" file_name="icons/AudioMute_Off.png" preload="false" />
<texture name="AudioMute_Over" file_name="icons/AudioMute_Over.png" preload="false" />
<texture name="VoiceMute_Off" file_name="icons/VoiceMute_Off.png" preload="false" />
<texture name="Audio_Off" file_name="icons/Audio_Off.png" preload="false" />
<texture name="Audio_Press" file_name="icons/Audio_Press.png" preload="false" />