summaryrefslogtreecommitdiff
path: root/indra/newview/lloutputmonitorctrl.cpp
diff options
context:
space:
mode:
authorAndreyL ProductEngine <alihatskiy@productengine.com>2019-05-08 21:41:11 +0300
committerAndreyL ProductEngine <alihatskiy@productengine.com>2019-05-08 21:41:11 +0300
commit93f0023efad59c6f86ee8003e3a22f1102ad28e8 (patch)
treeffb06811136a43a737aacfa844974e206f9f5537 /indra/newview/lloutputmonitorctrl.cpp
parent922793e4898ec272576f32b79cc31b1c299e1e21 (diff)
parent34322f8f37380df868703051230f2a4109602b3f (diff)
Merged in lindenlab/viewer-release
Diffstat (limited to 'indra/newview/lloutputmonitorctrl.cpp')
-rw-r--r--indra/newview/lloutputmonitorctrl.cpp26
1 files changed, 21 insertions, 5 deletions
diff --git a/indra/newview/lloutputmonitorctrl.cpp b/indra/newview/lloutputmonitorctrl.cpp
index 6c26073d5b..7f6c065bb9 100644
--- a/indra/newview/lloutputmonitorctrl.cpp
+++ b/indra/newview/lloutputmonitorctrl.cpp
@@ -72,9 +72,11 @@ LLOutputMonitorCtrl::LLOutputMonitorCtrl(const LLOutputMonitorCtrl::Params& p)
mImageLevel3(p.image_level_3),
mAutoUpdate(p.auto_update),
mSpeakerId(p.speaker_id),
+ mIsModeratorMuted(false),
mIsAgentControl(false),
mIndicatorToggled(false),
- mShowParticipantsSpeaking(false)
+ mShowParticipantsSpeaking(false),
+ mChannelState(INACTIVE_CHANNEL)
{
//static LLUIColor output_monitor_muted_color = LLUIColorTable::instance().getColor("OutputMonitorMutedColor", LLColor4::orange);
//static LLUIColor output_monitor_overdriven_color = LLUIColorTable::instance().getColor("OutputMonitorOverdrivenColor", LLColor4::red);
@@ -124,7 +126,7 @@ void LLOutputMonitorCtrl::draw()
const F32 LEVEL_1 = LLVoiceClient::OVERDRIVEN_POWER_LEVEL * 2.f / 3.f;
const F32 LEVEL_2 = LLVoiceClient::OVERDRIVEN_POWER_LEVEL;
- if (getVisible() && mAutoUpdate && !mIsMuted && mSpeakerId.notNull())
+ if (getVisible() && mAutoUpdate && !getIsMuted() && mSpeakerId.notNull())
{
setPower(LLVoiceClient::getInstance()->getCurrentPower(mSpeakerId));
if(mIsAgentControl)
@@ -156,7 +158,7 @@ void LLOutputMonitorCtrl::draw()
}
LLPointer<LLUIImage> icon;
- if (mIsMuted)
+ if (getIsMuted())
{
icon = mImageMute;
}
@@ -255,6 +257,21 @@ BOOL LLOutputMonitorCtrl::handleMouseUp(S32 x, S32 y, MASK mask)
return TRUE;
}
+void LLOutputMonitorCtrl::setIsActiveChannel(bool val)
+{
+ setChannelState(val ? ACTIVE_CHANNEL : INACTIVE_CHANNEL);
+}
+
+void LLOutputMonitorCtrl::setChannelState(EChannelState state)
+{
+ mChannelState = state;
+ if (state == INACTIVE_CHANNEL)
+ {
+ // switchIndicator will set it to TRUE when channel becomes active
+ setVisible(FALSE);
+ }
+}
+
void LLOutputMonitorCtrl::setSpeakerId(const LLUUID& speaker_id, const LLUUID& session_id/* = LLUUID::null*/, bool show_other_participants_speaking /* = false */)
{
if (speaker_id.isNull() && mSpeakerId.notNull())
@@ -304,8 +321,7 @@ void LLOutputMonitorCtrl::onChange()
// virtual
void LLOutputMonitorCtrl::switchIndicator(bool switch_on)
{
-
- if(getVisible() != (BOOL)switch_on)
+ if ((mChannelState != INACTIVE_CHANNEL) && (getVisible() != (BOOL)switch_on))
{
setVisible(switch_on);