Revert voice control to snowglobe
This commit is contained in:
@@ -76,10 +76,6 @@ BOOL LLVoiceRemoteCtrl::postBuild()
|
||||
mTalkLockBtn = getChild<LLButton>("ptt_lock");
|
||||
mTalkLockBtn->setClickedCallback(onBtnLock);
|
||||
mTalkLockBtn->setCallbackUserData(this);
|
||||
|
||||
mPosLockBtn = getChild<LLButton>("pos_lock_btn");
|
||||
mPosLockBtn->setClickedCallback(onClickPosLock);
|
||||
mPosLockBtn->setCallbackUserData(this);
|
||||
|
||||
mSpeakersBtn = getChild<LLButton>("speakers_btn");
|
||||
mSpeakersBtn->setClickedCallback(onClickSpeakers);
|
||||
@@ -88,7 +84,14 @@ BOOL LLVoiceRemoteCtrl::postBuild()
|
||||
childSetAction("show_channel", onClickPopupBtn, this);
|
||||
childSetAction("end_call_btn", onClickEndCall, this);
|
||||
|
||||
|
||||
LLTextBox* text = getChild<LLTextBox>("channel_label");
|
||||
if (text)
|
||||
{
|
||||
text->setUseEllipses(TRUE);
|
||||
}
|
||||
|
||||
childSetAction("voice_channel_bg", onClickVoiceChannel, this);
|
||||
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@@ -103,7 +106,6 @@ void LLVoiceRemoteCtrl::draw()
|
||||
}
|
||||
|
||||
mTalkBtn->setEnabled(voice_active);
|
||||
mPosLockBtn->setEnabled(voice_active);
|
||||
mTalkLockBtn->setEnabled(voice_active);
|
||||
|
||||
// propagate ptt state to button display,
|
||||
@@ -113,9 +115,7 @@ void LLVoiceRemoteCtrl::draw()
|
||||
mTalkBtn->setToggleState(!gSavedSettings.getBOOL("PTTCurrentlyEnabled") || gVoiceClient->getUserPTTState());
|
||||
}
|
||||
mSpeakersBtn->setToggleState(LLFloaterActiveSpeakers::instanceVisible(LLSD()));
|
||||
mPosLockBtn->setToggleState(gVoiceClient->getPosLocked());
|
||||
mTalkLockBtn->setToggleState(!gSavedSettings.getBOOL("PTTCurrentlyEnabled"));
|
||||
|
||||
|
||||
std::string talk_blip_image;
|
||||
if (gVoiceClient->getIsSpeaking(gAgent.getID()))
|
||||
@@ -169,7 +169,36 @@ void LLVoiceRemoteCtrl::draw()
|
||||
&& current_channel->isActive()
|
||||
&& current_channel != LLVoiceChannelProximal::getInstance());
|
||||
|
||||
childSetValue("channel_label", active_channel_name);
|
||||
childSetToolTip("voice_channel_bg", active_channel_name);
|
||||
|
||||
if (current_channel)
|
||||
{
|
||||
LLIconCtrl* voice_channel_icon = getChild<LLIconCtrl>("voice_channel_icon");
|
||||
if (voice_channel_icon && voice_floater)
|
||||
{
|
||||
voice_channel_icon->setImage(voice_floater->getString("voice_icon"));
|
||||
}
|
||||
|
||||
LLButton* voice_channel_bg = getChild<LLButton>("voice_channel_bg");
|
||||
if (voice_channel_bg)
|
||||
{
|
||||
LLColor4 bg_color;
|
||||
if (current_channel->isActive())
|
||||
{
|
||||
bg_color = lerp(LLColor4::green, LLColor4::white, 0.7f);
|
||||
}
|
||||
else if (current_channel->getState() == LLVoiceChannel::STATE_ERROR)
|
||||
{
|
||||
bg_color = lerp(LLColor4::red, LLColor4::white, 0.7f);
|
||||
}
|
||||
else // active, but not connected
|
||||
{
|
||||
bg_color = lerp(LLColor4::yellow, LLColor4::white, 0.7f);
|
||||
}
|
||||
voice_channel_bg->setImageColor(bg_color);
|
||||
}
|
||||
}
|
||||
|
||||
LLButton* expand_button = getChild<LLButton>("show_channel");
|
||||
if (expand_button)
|
||||
@@ -249,17 +278,6 @@ void LLVoiceRemoteCtrl::onClickEndCall(void* user_data)
|
||||
}
|
||||
}
|
||||
|
||||
//static
|
||||
void LLVoiceRemoteCtrl::onClickPosLock(void* user_data)
|
||||
{
|
||||
gVoiceClient->setPosLocked(!gVoiceClient->getPosLocked());
|
||||
llwarns << gVoiceClient->getPosLocked() << llendl;
|
||||
|
||||
if(!gVoiceClient->getPosLocked())
|
||||
{
|
||||
gVoiceClient->parcelChanged(); //force it to get a new SIP url based on our actual location
|
||||
}
|
||||
}
|
||||
|
||||
void LLVoiceRemoteCtrl::onClickSpeakers(void *user_data)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user