summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterimcontainer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfloaterimcontainer.cpp')
-rwxr-xr-xindra/newview/llfloaterimcontainer.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp
index a0df37b309..a4b91e47bb 100755
--- a/indra/newview/llfloaterimcontainer.cpp
+++ b/indra/newview/llfloaterimcontainer.cpp
@@ -229,7 +229,9 @@ BOOL LLFloaterIMContainer::postBuild()
mStubCollapseBtn = getChild<LLButton>("stub_collapse_btn");
mStubCollapseBtn->setClickedCallback(boost::bind(&LLFloaterIMContainer::onStubCollapseButtonClicked, this));
mSpeakBtn = getChild<LLButton>("speak_btn");
- mSpeakBtn->setClickedCallback(boost::bind(&LLFloaterIMContainer::onSpeakButtonClicked, this));
+
+ mSpeakBtn->setMouseDownCallback(boost::bind(&LLFloaterIMContainer::onSpeakButtonPressed, this));
+ mSpeakBtn->setMouseUpCallback(boost::bind(&LLFloaterIMContainer::onSpeakButtonReleased, this));
childSetAction("add_btn", boost::bind(&LLFloaterIMContainer::onAddButtonClicked, this));
@@ -352,11 +354,18 @@ void LLFloaterIMContainer::onStubCollapseButtonClicked()
collapseMessagesPane(true);
}
-void LLFloaterIMContainer::onSpeakButtonClicked()
+void LLFloaterIMContainer::onSpeakButtonPressed()
+{
+ LLVoiceClient::getInstance()->inputUserControlState(true);
+ updateSpeakBtnState();
+}
+
+void LLFloaterIMContainer::onSpeakButtonReleased()
{
- LLAgent::toggleMicrophone("speak");
+ LLVoiceClient::getInstance()->inputUserControlState(false);
updateSpeakBtnState();
}
+
void LLFloaterIMContainer::onExpandCollapseButtonClicked()
{
if (mConversationsPane->isCollapsed() && mMessagesPane->isCollapsed()