commit
c6f44113b8
|
|
@ -35,4 +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<LLAvatarList>("speakers_list");
|
||||
|
||||
mSpeakerManager = LLLocalSpeakerMgr::getInstance();
|
||||
mPaticipants = new LLParticipantList(mSpeakerManager, mAvatarList);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
//EOF
|
||||
|
|
|
|||
|
|
@ -36,20 +36,34 @@
|
|||
|
||||
#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.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
class LLCallFloater : public LLFloater
|
||||
{
|
||||
public:
|
||||
LLCallFloater();
|
||||
~LLCallFloater();
|
||||
|
||||
/*virtual*/ BOOL postBuild();
|
||||
|
||||
|
||||
private:
|
||||
LLSpeakerMgr* mSpeakerManager;
|
||||
LLParticipantList* mPaticipants;
|
||||
LLAvatarList* mAvatarList;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
LLCallFloater* instance = new LLCallFloater;
|
||||
mPrivateCallPanel = instance->getHandle();
|
||||
|
||||
y = LLBottomTray::getInstance()->getRect().getHeight() + mPrivateCallPanel->getRect().getHeight();
|
||||
// *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, mPrivateCallPanel->getRect().getWidth(), mPrivateCallPanel->getRect().getHeight());
|
||||
mPrivateCallPanel->setRect(rect);
|
||||
rect.setLeftTopAndSize(x, y, instance->getRect().getWidth(), instance->getRect().getHeight());
|
||||
instance->setRect(rect);
|
||||
|
||||
|
||||
LLAvatarListItem* item = new LLAvatarListItem();
|
||||
item->showLastInteractionTime(false);
|
||||
item->showInfoBtn(true);
|
||||
item->showSpeakingIndicator(true);
|
||||
item->reshape(mPrivateCallPanel->getRect().getWidth(), item->getRect().getHeight(), FALSE);
|
||||
|
||||
mPrivateCallPanel->addItem(item);
|
||||
mPrivateCallPanel->setVisible(TRUE);
|
||||
mPrivateCallPanel->setFrontmost(TRUE);
|
||||
instance->setVisible(TRUE);
|
||||
instance->setFrontmost(TRUE);
|
||||
|
||||
mShowBtn->setToggleState(TRUE);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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<LLFloater> mPrivateCallPanel;
|
||||
LLOutputMonitorCtrl* mOutputMonitor;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -87,9 +87,10 @@
|
|||
<avatar_list
|
||||
follows="all"
|
||||
height="197"
|
||||
ignore_online_status="true"
|
||||
layout="topleft"
|
||||
left="0"
|
||||
multi_select="true"
|
||||
name="avatar_list"
|
||||
name="speakers_list"
|
||||
width="282" />
|
||||
</floater>
|
||||
|
|
|
|||
Loading…
Reference in New Issue