diff options
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llchiclet.cpp | 1 | ||||
-rw-r--r-- | indra/newview/lloutputmonitorctrl.cpp | 12 | ||||
-rw-r--r-- | indra/newview/lloutputmonitorctrl.h | 3 |
3 files changed, 14 insertions, 2 deletions
diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp index bad61101c1..a854eb852f 100644 --- a/indra/newview/llchiclet.cpp +++ b/indra/newview/llchiclet.cpp @@ -1336,6 +1336,7 @@ LLTalkButton::LLTalkButton(const Params& p) // never show "muted" because you can't mute yourself mOutputMonitor->setIsMuted(false); + mOutputMonitor->setIsAgentControl(true); } LLTalkButton::~LLTalkButton() diff --git a/indra/newview/lloutputmonitorctrl.cpp b/indra/newview/lloutputmonitorctrl.cpp index 8bac9937f0..39381e3faa 100644 --- a/indra/newview/lloutputmonitorctrl.cpp +++ b/indra/newview/lloutputmonitorctrl.cpp @@ -80,7 +80,8 @@ LLOutputMonitorCtrl::LLOutputMonitorCtrl(const LLOutputMonitorCtrl::Params& p) mImageLevel2(p.image_level_2), mImageLevel3(p.image_level_3), mAutoUpdate(p.auto_update), - mSpeakerId(p.speaker_id) + mSpeakerId(p.speaker_id), + mIsAgentControl(false) { //static LLUIColor output_monitor_muted_color = LLUIColorTable::instance().getColor("OutputMonitorMutedColor", LLColor4::orange); //static LLUIColor output_monitor_overdriven_color = LLUIColorTable::instance().getColor("OutputMonitorOverdrivenColor", LLColor4::red); @@ -132,7 +133,14 @@ void LLOutputMonitorCtrl::draw() if (getVisible() && mAutoUpdate && !mIsMuted && mSpeakerId.notNull()) { setPower(gVoiceClient->getCurrentPower(mSpeakerId)); - setIsTalking(gVoiceClient->getIsSpeaking(mSpeakerId)); + if(mIsAgentControl) + { + setIsTalking(gVoiceClient->getUserPTTState()); + } + else + { + setIsTalking(gVoiceClient->getIsSpeaking(mSpeakerId)); + } } LLPointer<LLUIImage> icon; diff --git a/indra/newview/lloutputmonitorctrl.h b/indra/newview/lloutputmonitorctrl.h index 7a7b8bc3a1..85ea552a57 100644 --- a/indra/newview/lloutputmonitorctrl.h +++ b/indra/newview/lloutputmonitorctrl.h @@ -81,6 +81,8 @@ public: // For the current user, need to know the PTT state to show // correct button image. + void setIsAgentControl(bool val) { mIsAgentControl = val; } + void setIsTalking(bool val) { mIsTalking = val; } void setSpeakerId(const LLUUID& speaker_id); @@ -100,6 +102,7 @@ private: F32 mPower; + bool mIsAgentControl; bool mIsMuted; bool mIsTalking; LLPointer<LLUIImage> mImageMute; |