summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2023-08-04 00:44:07 +0300
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2023-08-04 00:44:07 +0300
commit4bef4f94c0ec89ef7b14bc267f52ba00a6dcdc2b (patch)
treeedcc7a538208de9a0d7219940c0ce752b0d4bc1b /indra
parent08484cec5ac1933fdc689ddd3dcbca72229f8118 (diff)
SL-18049 Part 3; Better indication when voice is muted
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llstatusbar.cpp24
-rw-r--r--indra/newview/llstatusbar.h2
-rw-r--r--indra/newview/skins/default/textures/icons/VoiceMute_Off.pngbin0 -> 753 bytes
-rw-r--r--indra/newview/skins/default/textures/textures.xml1
4 files changed, 26 insertions, 1 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() );
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 0000000000..425ba267a5
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/VoiceMute_Off.png
Binary files differ
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
<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" />