本文整理汇总了C++中LLVOAvatar::getClientInfo方法的典型用法代码示例。如果您正苦于以下问题:C++ LLVOAvatar::getClientInfo方法的具体用法?C++ LLVOAvatar::getClientInfo怎么用?C++ LLVOAvatar::getClientInfo使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLVOAvatar
的用法示例。
在下文中一共展示了LLVOAvatar::getClientInfo方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: refreshAvatarList
//.........这里部分代码省略.........
}
snprintf(temp, sizeof(temp), "%d", (S32)distance);
}
}
element["columns"][LIST_DISTANCE]["value"] = temp;
element["columns"][LIST_DISTANCE]["color"] = color.getValue();
position = position - simpos;
S32 x = (S32)position.mdV[VX];
S32 y = (S32)position.mdV[VY];
if (x >= 0 && x <= 256 && y >= 0 && y <= 256)
{
snprintf(temp, sizeof(temp), "%d, %d", x, y);
}
else
{
temp[0] = '\0';
if (y < 0)
{
strcat(temp, "S");
}
else if (y > 256)
{
strcat(temp, "N");
}
if (x < 0)
{
strcat(temp, "W");
}
else if (x > 256)
{
strcat(temp, "E");
}
}
element["columns"][LIST_POSITION]["column"] = "position";
element["columns"][LIST_POSITION]["type"] = "text";
element["columns"][LIST_POSITION]["value"] = temp;
element["columns"][LIST_ALTITUDE]["column"] = "altitude";
element["columns"][LIST_ALTITUDE]["type"] = "text";
if (UnknownAltitude)
{
strcpy(temp, "?");
}
else
{
snprintf(temp, sizeof(temp), "%d", (S32)position.mdV[VZ]);
}
element["columns"][LIST_ALTITUDE]["value"] = temp;
element["columns"][LIST_CLIENT]["column"] = "client";
element["columns"][LIST_CLIENT]["type"] = "text";
//element["columns"][LIST_METADATA]["column"] = "metadata";
//element["columns"][LIST_METADATA]["type"] = "text";
static const LLCachedControl<LLColor4> avatar_name_color(gColors, "AvatarNameColor",LLColor4(LLColor4U(251, 175, 93, 255)) );
LLColor4 client_color(avatar_name_color);
std::string client;
LLVOAvatar *avatarp = gObjectList.findAvatar(av_id);
if(avatarp)
{
avatarp->getClientInfo(client, client_color, TRUE);
if(client == "")
{
client_color = unselected_color;
client = "?";
}
element["columns"][LIST_CLIENT]["value"] = client.c_str();
// <dogmode>
// Don't expose Emerald's metadata.
//if(avatarp->extraMetadata.length())
//{
// element["columns"][LIST_METADATA]["value"] = avatarp->extraMetadata.c_str();
//}
}
else
{
element["columns"][LIST_CLIENT]["value"] = "Out Of Range";
}
//Blend to make the color show up better
client_color = client_color *.5f + unselected_color * .5f;
element["columns"][LIST_CLIENT]["color"] = client_color.getValue();
// Add to list
mAvatarList->addElement(element, ADD_BOTTOM);
}
// finish
mAvatarList->sortItems();
mAvatarList->selectMultiple(selected);
mAvatarList->setScrollPos(scrollpos);
// llinfos << "radar refresh: done" << llendl;
}