本文整理汇总了C++中LLAvatarName::getUserName方法的典型用法代码示例。如果您正苦于以下问题:C++ LLAvatarName::getUserName方法的具体用法?C++ LLAvatarName::getUserName怎么用?C++ LLAvatarName::getUserName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLAvatarName
的用法示例。
在下文中一共展示了LLAvatarName::getUserName方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: onAvatarNameCache
void LLInspectAvatar::onAvatarNameCache(
const LLUUID& agent_id,
const LLAvatarName& av_name)
{
mAvatarNameCacheConnection.disconnect();
if (agent_id == mAvatarID)
{
getChild<LLUICtrl>("user_name")->setValue(av_name.getDisplayName());
getChild<LLUICtrl>("user_name_small")->setValue(av_name.getDisplayName());
getChild<LLUICtrl>("user_slid")->setValue(av_name.getUserName());
mAvatarName = av_name;
// show smaller display name if too long to display in regular size
if (getChild<LLTextBox>("user_name")->getTextPixelWidth() > getChild<LLTextBox>("user_name")->getRect().getWidth())
{
getChild<LLUICtrl>("user_name_small")->setVisible( true );
getChild<LLUICtrl>("user_name")->setVisible( false );
}
else
{
getChild<LLUICtrl>("user_name_small")->setVisible( false );
getChild<LLUICtrl>("user_name")->setVisible( true );
}
}
}
示例2: onAvatarNameCache
void LLAvatarIconCtrl::onAvatarNameCache(const LLUUID& agent_id, const LLAvatarName& av_name)
{
mAvatarNameCacheConnection.disconnect();
if (agent_id == mAvatarId)
{
// Most avatar icon controls are next to a UI element that shows
// a display name, so only show username.
mFullName = av_name.getUserName();
if (mDrawTooltip)
{
setToolTip(mFullName);
}
else
{
setToolTip(std::string());
}
}
}