本文整理汇总了C++中LLVOAvatar::isTyping方法的典型用法代码示例。如果您正苦于以下问题:C++ LLVOAvatar::isTyping方法的具体用法?C++ LLVOAvatar::isTyping怎么用?C++ LLVOAvatar::isTyping使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLVOAvatar
的用法示例。
在下文中一共展示了LLVOAvatar::isTyping方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: updateAvatarList
//.........这里部分代码省略.........
if (avatarp->isDead() || avatarp->isSelf() || avatarp->mIsDummy)
{
continue;
}
// Get avatar data
position = gAgent.getPosGlobalFromAgent(avatarp->getCharacterPosition());
name = avatarp->getFullname();
if (!LLAvatarNameCache::getPNSName(avatarp->getID(), name))
continue;
//duped for lower section
if (name.empty() || (name.compare(" ") == 0))// || (name.compare(gCacheName->getDefaultName()) == 0))
{
if (!gCacheName->getFullName(avid, name)) //seems redudant with LLAvatarNameCache::getPNSName above...
{
continue;
}
}
if (avid.isNull())
{
//llinfos << "Key empty for avatar " << name << llendl;
continue;
}
LLAvatarListEntry* entry = getAvatarEntry(avid);
if (entry)
{
// Avatar already in list, update position
F32 dist = (F32)(position - mypos).magVec();
entry->setPosition(position, (avatarp->getRegion() == gAgent.getRegion()), true, dist < 20.0, dist < 100.0);
if(avatarp->isTyping())entry->setActivity(LLAvatarListEntry::ACTIVITY_TYPING);
}
else
{
// Avatar not there yet, add it
if(announce && avatarp->getRegion() == gAgent.getRegion())
announce_keys.push(avid);
mAvatars.push_back(LLAvatarListEntryPtr(new LLAvatarListEntry(avid, name, position)));
}
}
else
{
if (i < positions.size())
{
position = positions[i];
}
else
{
continue;
}
if (!LLAvatarNameCache::getPNSName(avid, name))
{
//name = gCacheName->getDefaultName();
continue; //prevent (Loading...)
}
LLAvatarListEntry* entry = getAvatarEntry(avid);
if (entry)
{
// Avatar already in list, update position
F32 dist = (F32)(position - mypos).magVec();
entry->setPosition(position, gAgent.getRegion()->pointInRegionGlobal(position), false, dist < 20.0, dist < 100.0);
示例2: updateRadarList
//.........这里部分代码省略.........
LLAvatarNameCache::get(avId, boost::bind(&FSRadar::radarAlertMsg, this, _1, _2, str_region_entering));
}
}
else if (RadarReportSimRangeLeave && rf.lastRegion == regionSelf && !isInSameRegion && avRegion.notNull())
{
make_ui_sound("UISndRadarSimLeave"); // <FS:PP> FIRE-6069: Radar alerts sounds
LLAvatarNameCache::get(avId, boost::bind(&FSRadar::radarAlertMsg, this, _1, _2, str_region_leaving));
}
}
//If we were manually asked to update an external source for all existing avatars, add them to the queue.
if (alertScripts)
{
mRadarEnterAlerts.push_back(avId);
}
}
//
//2d. Prepare data for presentation view for this avatar
//
if (isInSameRegion)
{
inSameRegion++;
}
LLSD entry;
LLSD entry_options;
entry["id"] = avId;
entry["name"] = avName;
entry["in_region"] = isInSameRegion;
entry["flags"] = avFlag;
entry["seen"] = avSeenStr;
entry["range"] = (avRange > AVATAR_UNKNOWN_RANGE ? llformat("%3.2f", avRange) : llformat(">%3.2f", drawRadius));
entry["typing"] = (avVo && avVo->isTyping());
entry["sitting"] = (avVo && (avVo->getParent() || avVo->isMotionActive(ANIM_AGENT_SIT_GROUND) || avVo->isMotionActive(ANIM_AGENT_SIT_GROUND_CONSTRAINED)));
entry["has_notes"] = ent->hasNotes();
if (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
{
entry["age"] = (avAge > -1 ? llformat("%d", avAge) : "");
if (ent->hasAlertAge())
{
entry_options["age_color"] = LLUIColorTable::instance().getColor("AvatarListItemAgeAlert", LLColor4::red).get().getValue();
if (RadarAvatarAgeAlert && !ent->hasAgeAlertPerformed())
{
make_ui_sound("UISndRadarAgeAlert");
LLStringUtil::format_map_t args;
args["AGE"] = llformat("%d", avAge);
std::string message = formatString(str_avatar_age_alert, args);
LLAvatarNameCache::get(avId, boost::bind(&FSRadar::radarAlertMsg, this, _1, _2, message));
}
ent->mAgeAlertPerformed = true;
}
}
else
{
entry["age"] = "---";
}
//AO: Set any range colors / styles
LLUIColor range_color;
if (avRange > AVATAR_UNKNOWN_RANGE)
{
if (avRange <= chat_range_say)
{
示例3: updateAvatarList
//.........这里部分代码省略.........
{
case 0 : name = avatar_name.getLegacyName(); break;
case 1 : name = (avatar_name.mIsDisplayNameDefault ? avatar_name.mDisplayName : avatar_name.getCompleteName()); break;
case 2 : name = avatar_name.mDisplayName; break;
default : name = avatar_name.getLegacyName(); break;
}
first = avatar_name.mLegacyFirstName;
last = avatar_name.mLegacyLastName;
}
else continue;
// [/Ansariel: Display name support]
//duped for lower section
if (name.empty() || (name.compare(" ") == 0))// || (name.compare(gCacheName->getDefaultName()) == 0))
{
if (!gCacheName->getFullName(avid, name)) //seems redudant with LLAvatarNameCache::get above...
{
continue;
}
}
if (avid.isNull())
{
//llinfos << "Key empty for avatar " << name << llendl;
continue;
}
if (mAvatars.count(avid) > 0)
{
// Avatar already in list, update position
F32 dist = (F32)(position - mypos).magVec();
mAvatars[avid].setPosition(position, (avatarp->getRegion() == gAgent.getRegion()), true, dist < 20.0, dist < 100.0);
if(avatarp->isTyping())mAvatars[avid].setActivity(LLAvatarListEntry::ACTIVITY_TYPING);
}
else
{
// Avatar not there yet, add it
LLAvatarListEntry entry(avid, name, position);
if(announce && avatarp->getRegion() == gAgent.getRegion())
announce_keys.push(avid);
mAvatars[avid] = entry;
}
}
else
{
if (i < positions.size())
{
position = positions[i];
}
else
{
continue;
}
if (!gCacheName->getFullName(avid, name))
{
//name = gCacheName->getDefaultName();
continue; //prevent (Loading...)
}
if (mAvatars.count(avid) > 0)
{
// Avatar already in list, update position
F32 dist = (F32)(position - mypos).magVec();
mAvatars[avid].setPosition(position, gAgent.getRegion()->pointInRegionGlobal(position), false, dist < 20.0, dist < 100.0);