Merge viewer-bear
commit
2543c7bfbc
|
|
@ -159,6 +159,7 @@ BOOL LLAvatarListItem::postBuild()
|
|||
mIconPermissionEditTheirs->setVisible(false);
|
||||
|
||||
mSpeakingIndicator = getChild<LLOutputMonitorCtrl>("speaking_indicator");
|
||||
mSpeakingIndicator->setChannelState(LLOutputMonitorCtrl::UNDEFINED_CHANNEL);
|
||||
mInfoBtn = getChild<LLButton>("info_btn");
|
||||
mProfileBtn = getChild<LLButton>("profile_btn");
|
||||
|
||||
|
|
|
|||
|
|
@ -76,9 +76,9 @@ LLOutputMonitorCtrl::LLOutputMonitorCtrl(const LLOutputMonitorCtrl::Params& p)
|
|||
mSpeakerId(p.speaker_id),
|
||||
mIsModeratorMuted(false),
|
||||
mIsAgentControl(false),
|
||||
mIsActiveChannel(false),
|
||||
mIndicatorToggled(false),
|
||||
mShowParticipantsSpeaking(false),
|
||||
mChannelState(INACTIVE_CHANNEL),
|
||||
mAlwaysVisible(false) // <FS:Ansariel> Option to not hide it if speaker ID is set to null
|
||||
{
|
||||
//static LLUIColor output_monitor_muted_color = LLUIColorTable::instance().getColor("OutputMonitorMutedColor", LLColor4::orange);
|
||||
|
|
@ -296,8 +296,13 @@ BOOL LLOutputMonitorCtrl::handleMouseUp(S32 x, S32 y, MASK mask)
|
|||
|
||||
void LLOutputMonitorCtrl::setIsActiveChannel(bool val)
|
||||
{
|
||||
mIsActiveChannel = val;
|
||||
if (!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);
|
||||
|
|
@ -356,7 +361,7 @@ void LLOutputMonitorCtrl::onChange()
|
|||
void LLOutputMonitorCtrl::switchIndicator(bool switch_on)
|
||||
{
|
||||
// <FS:Ansariel> [FS communication UI]
|
||||
//if (mIsActiveChannel && getVisible() != (BOOL)switch_on)
|
||||
//if ((mChannelState != INACTIVE_CHANNEL) && (getVisible() != (BOOL)switch_on))
|
||||
if (getVisible() != (BOOL)switch_on)
|
||||
// </FS:Ansariel> [FS communication UI]
|
||||
{
|
||||
|
|
|
|||
|
|
@ -84,8 +84,16 @@ public:
|
|||
void setIsAgentControl(bool val) { mIsAgentControl = val; }
|
||||
void setIsTalking(bool val) { mIsTalking = val; }
|
||||
|
||||
enum EChannelState
|
||||
{
|
||||
ACTIVE_CHANNEL,
|
||||
INACTIVE_CHANNEL,
|
||||
UNDEFINED_CHANNEL
|
||||
};
|
||||
|
||||
// switchIndicator controls visibility, 'active channel' governs if we are allowed to show indicator
|
||||
void setIsActiveChannel(bool val);
|
||||
void setChannelState(EChannelState state);
|
||||
|
||||
void setShowParticipantsSpeaking(bool show) { mShowParticipantsSpeaking = show; }
|
||||
|
||||
|
|
@ -142,7 +150,6 @@ private:
|
|||
bool mIsModeratorMuted;
|
||||
bool mIsMuted;
|
||||
bool mIsTalking;
|
||||
bool mIsActiveChannel;
|
||||
bool mShowParticipantsSpeaking;
|
||||
LLPointer<LLUIImage> mImageMute;
|
||||
LLPointer<LLUIImage> mImageOff;
|
||||
|
|
@ -158,6 +165,8 @@ private:
|
|||
LLUUID mSpeakerId;
|
||||
|
||||
bool mIndicatorToggled;
|
||||
|
||||
EChannelState mChannelState;
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
|||
Loading…
Reference in New Issue