本文整理汇总了C++中LLFloaterAvatarList::getString方法的典型用法代码示例。如果您正苦于以下问题:C++ LLFloaterAvatarList::getString方法的具体用法?C++ LLFloaterAvatarList::getString怎么用?C++ LLFloaterAvatarList::getString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLFloaterAvatarList
的用法示例。
在下文中一共展示了LLFloaterAvatarList::getString方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: chat_avatar_status
void chat_avatar_status(std::string name, LLUUID key, ERadarAlertType type, bool entering)
{
static LLCachedControl<bool> radar_chat_alerts(gSavedSettings, "RadarChatAlerts");
if (!radar_chat_alerts) return;
static LLCachedControl<bool> radar_alert_sim(gSavedSettings, "RadarAlertSim");
static LLCachedControl<bool> radar_alert_draw(gSavedSettings, "RadarAlertDraw");
static LLCachedControl<bool> radar_alert_shout_range(gSavedSettings, "RadarAlertShoutRange");
static LLCachedControl<bool> radar_alert_chat_range(gSavedSettings, "RadarAlertChatRange");
static LLCachedControl<bool> radar_chat_keys(gSavedSettings, "RadarChatKeys");
LLFloaterAvatarList* self = LLFloaterAvatarList::getInstance();
LLStringUtil::format_map_t args;
switch(type)
{
case ALERT_TYPE_SIM:
if (radar_alert_sim)
{
args["[RANGE]"] = self->getString("the_sim");
}
break;
case ALERT_TYPE_DRAW:
if (radar_alert_draw)
{
args["[RANGE]"] = self->getString("draw_distance");
}
break;
case ALERT_TYPE_SHOUTRANGE:
if (radar_alert_shout_range)
{
args["[RANGE]"] = self->getString("shout_range");
}
break;
case ALERT_TYPE_CHATRANGE:
if (radar_alert_chat_range)
{
args["[RANGE]"] = self->getString("chat_range");
}
break;
}
if (args.find("[RANGE]") != args.end())
{
args["[NAME]"] = name;
args["[ACTION]"] = self->getString(entering ? "has_entered" : "has_left");
LLChat chat;
chat.mText = self->getString("template", args);
chat.mFromName = name;
chat.mURL = llformat("secondlife:///app/agent/%s/about",key.asString().c_str());
chat.mSourceType = CHAT_SOURCE_SYSTEM;
LLFloaterChat::addChat(chat);
}
}