From cdd9c57b2c9f02167e78322e5631822b0cd0521b Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Wed, 25 Nov 2009 13:44:53 +0200 Subject: Work on major sub-task EXT-2790 (Complete Voice Control Panel (floater) started by Lynx (LLVoiceControlPanel)) -- Replaced LLVoiceControlPanel with LLCallFloater in Speak button implementation --HG-- branch : product-engine --- indra/newview/llcallfloater.cpp | 11 ++++++++++ indra/newview/llcallfloater.h | 4 ++++ indra/newview/llspeakbutton.cpp | 48 ++++++++++++++++------------------------- indra/newview/llspeakbutton.h | 4 ++-- 4 files changed, 36 insertions(+), 31 deletions(-) (limited to 'indra') diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp index 82f86bbaed..c6d54995bf 100644 --- a/indra/newview/llcallfloater.cpp +++ b/indra/newview/llcallfloater.cpp @@ -35,4 +35,15 @@ #include "llcallfloater.h" + +LLCallFloater::LLCallFloater() +: LLFloater(LLSD()) +{ + LLUICtrlFactory::getInstance()->buildFloater(this, "floater_voice_controls.xml", NULL); +} + +LLCallFloater::~LLCallFloater() +{ + +} //EOF diff --git a/indra/newview/llcallfloater.h b/indra/newview/llcallfloater.h index 3732379da2..dde4085d00 100644 --- a/indra/newview/llcallfloater.h +++ b/indra/newview/llcallfloater.h @@ -49,6 +49,10 @@ */ class LLCallFloater : public LLFloater { +public: + LLCallFloater(); + ~LLCallFloater(); + }; diff --git a/indra/newview/llspeakbutton.cpp b/indra/newview/llspeakbutton.cpp index 54f776ca6a..9562d7828c 100644 --- a/indra/newview/llspeakbutton.cpp +++ b/indra/newview/llspeakbutton.cpp @@ -32,19 +32,13 @@ #include "llviewerprecompiledheaders.h" // must be first include +#include "llbutton.h" + #include "llagent.h" #include "llbottomtray.h" -#include "llfloaterreg.h" -#include "llvoiceclient.h" -#include "llvoicecontrolpanel.h" -#include "lltransientfloatermgr.h" - -#include "llavatariconctrl.h" -#include "llbutton.h" -#include "llpanel.h" -#include "lltextbox.h" +#include "llcallfloater.h" #include "lloutputmonitorctrl.h" -#include "llgroupmgr.h" +#include "lltransientfloatermgr.h" #include "llspeakbutton.h" @@ -72,7 +66,6 @@ void LLSpeakButton::draw() LLSpeakButton::LLSpeakButton(const Params& p) : LLUICtrl(p) -, mPrivateCallPanel(NULL) , mOutputMonitor(NULL) , mSpeakBtn(NULL) , mShowBtn(NULL) @@ -179,9 +172,11 @@ void LLSpeakButton::onClick_ShowBtn() { if(!mShowBtn->getToggleState()) { - mPrivateCallPanel->onClickClose(mPrivateCallPanel); - delete mPrivateCallPanel; - mPrivateCallPanel = NULL; + if (!mPrivateCallPanel.isDead()) + { + LLFloater* instance = mPrivateCallPanel.get(); + instance->onClickClose(instance); + } mShowBtn->setToggleState(FALSE); return; } @@ -191,25 +186,20 @@ void LLSpeakButton::onClick_ShowBtn() localPointToScreen(x, y, &x, &y); - mPrivateCallPanel = new LLVoiceControlPanel; - getRootView()->addChild(mPrivateCallPanel); - - y = LLBottomTray::getInstance()->getRect().getHeight() + mPrivateCallPanel->getRect().getHeight(); + LLCallFloater* instance = new LLCallFloater; + mPrivateCallPanel = instance->getHandle(); - LLRect rect; - rect.setLeftTopAndSize(x, y, mPrivateCallPanel->getRect().getWidth(), mPrivateCallPanel->getRect().getHeight()); - mPrivateCallPanel->setRect(rect); + // *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(); - LLAvatarListItem* item = new LLAvatarListItem(); - item->showLastInteractionTime(false); - item->showInfoBtn(true); - item->showSpeakingIndicator(true); - item->reshape(mPrivateCallPanel->getRect().getWidth(), item->getRect().getHeight(), FALSE); + LLRect rect; + rect.setLeftTopAndSize(x, y, instance->getRect().getWidth(), instance->getRect().getHeight()); + instance->setRect(rect); - mPrivateCallPanel->addItem(item); - mPrivateCallPanel->setVisible(TRUE); - mPrivateCallPanel->setFrontmost(TRUE); + instance->setVisible(TRUE); + instance->setFrontmost(TRUE); mShowBtn->setToggleState(TRUE); } diff --git a/indra/newview/llspeakbutton.h b/indra/newview/llspeakbutton.h index 424ee5357a..33f7c9fa28 100644 --- a/indra/newview/llspeakbutton.h +++ b/indra/newview/llspeakbutton.h @@ -36,7 +36,7 @@ #include "llinitparam.h" #include "lluictrl.h" -class LLVoiceControlPanel; +class LLCallFloater; class LLButton; class LLOutputMonitorCtrl; @@ -91,7 +91,7 @@ protected: private: LLButton* mSpeakBtn; LLButton* mShowBtn; - LLVoiceControlPanel* mPrivateCallPanel; + LLHandle mPrivateCallPanel; LLOutputMonitorCtrl* mOutputMonitor; }; -- cgit v1.2.3 From 9d941cf1193eaaf333dd1c9427256786b1bc60c8 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Wed, 25 Nov 2009 14:52:39 +0200 Subject: Work on major sub-task EXT-2790 (Complete Voice Control Panel (floater) started by Lynx (LLVoiceControlPanel)) -- Implemented speakers list for local chat. --HG-- branch : product-engine --- indra/newview/llcallfloater.cpp | 20 ++++++++++++++++++++ indra/newview/llcallfloater.h | 10 ++++++++++ .../skins/default/xui/en/floater_voice_controls.xml | 3 ++- 3 files changed, 32 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp index c6d54995bf..eaa048f5aa 100644 --- a/indra/newview/llcallfloater.cpp +++ b/indra/newview/llcallfloater.cpp @@ -35,15 +35,35 @@ #include "llcallfloater.h" +#include "llavatarlist.h" +#include "llparticipantlist.h" +#include "llspeakers.h" + LLCallFloater::LLCallFloater() : LLFloater(LLSD()) +, mSpeakerManager(NULL) +, mPaticipants(NULL) +, mAvatarList(NULL) { LLUICtrlFactory::getInstance()->buildFloater(this, "floater_voice_controls.xml", NULL); } LLCallFloater::~LLCallFloater() { + delete mPaticipants; + mPaticipants = NULL; +} + +// virtual +BOOL LLCallFloater::postBuild() +{ + LLFloater::postBuild(); + mAvatarList = getChild("speakers_list"); + + mSpeakerManager = LLLocalSpeakerMgr::getInstance(); + mPaticipants = new LLParticipantList(mSpeakerManager, mAvatarList); + return TRUE; } //EOF diff --git a/indra/newview/llcallfloater.h b/indra/newview/llcallfloater.h index dde4085d00..3e672eec79 100644 --- a/indra/newview/llcallfloater.h +++ b/indra/newview/llcallfloater.h @@ -36,6 +36,10 @@ #include "llfloater.h" +class LLAvatarList; +class LLParticipantList; +class LLSpeakerMgr; + /** * The Voice Control Panel is an ambient window summoned by clicking the flyout chevron on the Speak button. * It can be torn-off and freely positioned onscreen. @@ -53,7 +57,13 @@ public: LLCallFloater(); ~LLCallFloater(); + /*virtual*/ BOOL postBuild(); + +private: + LLSpeakerMgr* mSpeakerManager; + LLParticipantList* mPaticipants; + LLAvatarList* mAvatarList; }; diff --git a/indra/newview/skins/default/xui/en/floater_voice_controls.xml b/indra/newview/skins/default/xui/en/floater_voice_controls.xml index 705b4276e3..82b4372a4b 100644 --- a/indra/newview/skins/default/xui/en/floater_voice_controls.xml +++ b/indra/newview/skins/default/xui/en/floater_voice_controls.xml @@ -87,9 +87,10 @@ -- cgit v1.2.3 From 964f4a8fef54f66a9d6ccfea321fa84f51be8bf6 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Wed, 25 Nov 2009 15:16:17 +0200 Subject: No ticket. Fixed lines endings to Unix format --HG-- branch : product-engine --- indra/newview/llcallfloater.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'indra') diff --git a/indra/newview/llcallfloater.h b/indra/newview/llcallfloater.h index 3e672eec79..f1afddb1cc 100644 --- a/indra/newview/llcallfloater.h +++ b/indra/newview/llcallfloater.h @@ -41,13 +41,13 @@ class LLParticipantList; class LLSpeakerMgr; /** - * The Voice Control Panel is an ambient window summoned by clicking the flyout chevron on the Speak button. - * It can be torn-off and freely positioned onscreen. - * - * When the Resident is engaged in Nearby Voice Chat, the Voice Control Panel provides control over - * the Resident's own microphone input volume, the audible volume of each of the other participants, - * the Resident's own Voice Morphing settings (if she has subscribed to enable the feature), and Voice Recording. - * + * The Voice Control Panel is an ambient window summoned by clicking the flyout chevron on the Speak button. + * It can be torn-off and freely positioned onscreen. + * + * When the Resident is engaged in Nearby Voice Chat, the Voice Control Panel provides control over + * the Resident's own microphone input volume, the audible volume of each of the other participants, + * the Resident's own Voice Morphing settings (if she has subscribed to enable the feature), and Voice Recording. + * * When the Resident is engaged in Group Voice Chat, the Voice Control Panel also provides an * 'End Call' button to allow the Resident to leave that voice channel. */ -- cgit v1.2.3