diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2009-11-09 17:13:37 +0000 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2009-11-09 17:13:37 +0000 |
commit | e9048b17792b91e6bf8a05692d859ea9c94011d6 (patch) | |
tree | b988d1b8642ece297e63c6ff0408429a2ed71d02 /indra | |
parent | 7804990998c1cc4cb0faa5fd7b37b3a22321c3b6 (diff) |
Central-source the authoritative state of mic openness.
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llbottomtray.cpp | 1 | ||||
-rw-r--r-- | indra/newview/llspeakbutton.cpp | 9 | ||||
-rw-r--r-- | indra/newview/llspeakbutton.h | 1 |
3 files changed, 10 insertions, 1 deletions
diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp index a17ba79078..e5cc2fce88 100644 --- a/indra/newview/llbottomtray.cpp +++ b/indra/newview/llbottomtray.cpp @@ -50,7 +50,6 @@ LLBottomTray::LLBottomTray(const LLSD&) mSpeakBtn(NULL), mNearbyChatBar(NULL), mToolbarStack(NULL) - { mFactoryMap["chat_bar"] = LLCallbackMap(LLBottomTray::createNearbyChatBar, NULL); diff --git a/indra/newview/llspeakbutton.cpp b/indra/newview/llspeakbutton.cpp index cd765b0338..312d7050b9 100644 --- a/indra/newview/llspeakbutton.cpp +++ b/indra/newview/llspeakbutton.cpp @@ -62,6 +62,15 @@ LLSpeakButton::Params::Params() // See widgets/talk_button.xml } +void LLSpeakButton::draw() +{ + // gVoiceClient is the authoritative global source of info regarding our open-mic state, we merely reflect that state. + bool openmic = gVoiceClient->getUserPTTState(); + mSpeakBtn->setToggleState(openmic); + llinfos << "mic state " << int(openmic) << llendl; + LLUICtrl::draw(); +} + LLSpeakButton::LLSpeakButton(const Params& p) : LLUICtrl(p) , mPrivateCallPanel(NULL) diff --git a/indra/newview/llspeakbutton.h b/indra/newview/llspeakbutton.h index f59ded2133..48a4d5880b 100644 --- a/indra/newview/llspeakbutton.h +++ b/indra/newview/llspeakbutton.h @@ -61,6 +61,7 @@ public: }; /*virtual*/ ~LLSpeakButton(); + /*virtual*/ void draw(); void setSpeakBtnToggleState(bool state); |