diff options
author | Mike Antipov <mantipov@productengine.com> | 2009-11-26 11:39:59 +0200 |
---|---|---|
committer | Mike Antipov <mantipov@productengine.com> | 2009-11-26 11:39:59 +0200 |
commit | e0717c6aac140c840e6ca614afd39b6d95d46329 (patch) | |
tree | fcede7b2fe3d12457dd1600280a9e6b6e2c9d231 /indra/newview/llspeakbutton.cpp | |
parent | 4c81e7a85c3fe69f16ac3996df732627dda8533a (diff) |
Work on major sub-task EXT-2790 (Complete Voice Control Panel (floater) started by Lynx (LLVoiceControlPanel))
-- made Voice Control Panel dockable to speak panel
-- move button toggle state processing from the code to xml
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview/llspeakbutton.cpp')
-rw-r--r-- | indra/newview/llspeakbutton.cpp | 41 |
1 files changed, 3 insertions, 38 deletions
diff --git a/indra/newview/llspeakbutton.cpp b/indra/newview/llspeakbutton.cpp index 9562d7828c..5edc4804ca 100644 --- a/indra/newview/llspeakbutton.cpp +++ b/indra/newview/llspeakbutton.cpp @@ -33,6 +33,7 @@ #include "llviewerprecompiledheaders.h" // must be first include #include "llbutton.h" +#include "llfloaterreg.h" #include "llagent.h" #include "llbottomtray.h" @@ -95,8 +96,8 @@ LLSpeakButton::LLSpeakButton(const Params& p) addChild(mShowBtn); LLTransientFloaterMgr::getInstance()->addControlView(mShowBtn); - mShowBtn->setClickedCallback(boost::bind(&LLSpeakButton::onClick_ShowBtn, this)); - mShowBtn->setToggleState(FALSE); +// mShowBtn->setClickedCallback(boost::bind(&LLSpeakButton::onClick_ShowBtn, this)); +// mShowBtn->setToggleState(FALSE); static const S32 MONITOR_RIGHT_PAD = 2; @@ -168,39 +169,3 @@ void LLSpeakButton::onMouseUp_SpeakBtn() gVoiceClient->inputUserControlState(down); } -void LLSpeakButton::onClick_ShowBtn() -{ - if(!mShowBtn->getToggleState()) - { - if (!mPrivateCallPanel.isDead()) - { - LLFloater* instance = mPrivateCallPanel.get(); - instance->onClickClose(instance); - } - mShowBtn->setToggleState(FALSE); - return; - } - - S32 x = mSpeakBtn->getRect().mLeft; - S32 y = 0; - - localPointToScreen(x, y, &x, &y); - - LLCallFloater* instance = new LLCallFloater; - mPrivateCallPanel = instance->getHandle(); - - // *TODO: mantipov: why we are adding this floater to Root View? It is in FloaterView by default - getRootView()->addChild(instance); - - y = LLBottomTray::getInstance()->getRect().getHeight() + instance->getRect().getHeight(); - - LLRect rect; - rect.setLeftTopAndSize(x, y, instance->getRect().getWidth(), instance->getRect().getHeight()); - instance->setRect(rect); - - instance->setVisible(TRUE); - instance->setFrontmost(TRUE); - - mShowBtn->setToggleState(TRUE); -} - |