本文整理汇总了C++中LLVoiceChannel::getState方法的典型用法代码示例。如果您正苦于以下问题:C++ LLVoiceChannel::getState方法的具体用法?C++ LLVoiceChannel::getState怎么用?C++ LLVoiceChannel::getState使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLVoiceChannel
的用法示例。
在下文中一共展示了LLVoiceChannel::getState方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: draw
void LLFloaterChatterBox::draw()
{
// clear new im notifications when chatterbox is visible
if (!isMinimized())
{
gIMMgr->clearNewIMNotification();
}
LLFloater* current_active_floater = getCurrentVoiceFloater();
// set icon on tab for floater currently associated with active voice channel
if(mActiveVoiceFloater != current_active_floater)
{
// remove image from old floater's tab
if (mActiveVoiceFloater)
{
mTabContainer->setTabImage(mActiveVoiceFloater, "");
}
}
// update image on current active tab
if (current_active_floater)
{
LLColor4 icon_color = LLColor4::white;
LLVoiceChannel* channelp = LLVoiceChannel::getCurrentVoiceChannel();
if (channelp)
{
if (channelp->isActive())
{
icon_color = LLColor4::green;
}
else if (channelp->getState() == LLVoiceChannel::STATE_ERROR)
{
icon_color = LLColor4::red;
}
else // active, but not connected
{
icon_color = LLColor4::yellow;
}
}
mTabContainer->setTabImage(current_active_floater, "active_voice_tab.tga", icon_color);
}
mActiveVoiceFloater = current_active_floater;
LLMultiFloater::draw();
}