本文整理汇总了C++中LLAvatarName::getNSName方法的典型用法代码示例。如果您正苦于以下问题:C++ LLAvatarName::getNSName方法的具体用法?C++ LLAvatarName::getNSName怎么用?C++ LLAvatarName::getNSName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLAvatarName
的用法示例。
在下文中一共展示了LLAvatarName::getNSName方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: onAvatarNameCache
void LLFloaterReporter::onAvatarNameCache(const LLUUID& avatar_id, const LLAvatarName& av_name)
{
mAvatarNameCacheConnection.disconnect();
if (mObjectID == avatar_id)
{
mOwnerName = av_name.getNSName();
getChild<LLUICtrl>("owner_name")->setValue(av_name.getNSName());
getChild<LLUICtrl>("object_name")->setValue(av_name.getNSName());
getChild<LLUICtrl>("abuser_name_edit")->setValue(av_name.getNSName());
}
}
示例2: onAvatarNameLookup
void LLFloaterIMPanel::onAvatarNameLookup(const LLAvatarName& avatar_name)
{
setTitle(avatar_name.getNSName());
const S32& ns(gSavedSettings.getS32("IMNameSystem"));
std::string title(avatar_name.getNSName(ns));
if (!ns || ns == 3) // Remove Resident, if applicable.
{
size_t pos(title.find(" Resident"));
if (pos != std::string::npos && !gSavedSettings.getBOOL("LiruShowLastNameResident"))
title.erase(pos, 9);
}
setShortTitle(title);
if (LLMultiFloater* mf = dynamic_cast<LLMultiFloater*>(getParent()))
mf->updateFloaterTitle(this);
}
示例3: onAvatarNameCache
void LLFloaterReporter::onAvatarNameCache(const LLUUID& avatar_id, const LLAvatarName& av_name)
{
mAvatarNameCacheConnection.disconnect();
if (mObjectID == avatar_id)
{
mOwnerName = av_name.getNSName();
const std::string& name(((gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES) || gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMETAGS)) && RlvUtil::isNearbyAgent(avatar_id)) ? RlvStrings::getString(RLV_STRING_HIDDEN) : mOwnerName);
getChild<LLUICtrl>("owner_name")->setValue(name);
getChild<LLUICtrl>("object_name")->setValue(name);
getChild<LLUICtrl>("abuser_name_edit")->setValue(name);
}
}
示例4: on_avatar_name_cache_notify
static void on_avatar_name_cache_notify(const LLUUID& agent_id,
const LLAvatarName& av_name,
bool online,
LLSD payload)
{
// Popup a notify box with online status of this agent
// Use display name only because this user is your friend
LLSD args;
args["NAME"] = av_name.getNSName(friend_name_system());
args["STATUS"] = online ? LLTrans::getString("OnlineStatus") : LLTrans::getString("OfflineStatus");
std::string name = args["NAME"];
boost::algorithm::trim(name);
xantispam_check(agent_id.asString(), (online ? "&-ExecFriendIsOnline!" : "&-ExecFriendIsOffline!"), (online ? name + " is online" : name + " is offline"));
// do not pop up a notification when disabled for this agent
if(!xantispam_check(agent_id.asString(), (online ? "!StatusFriendIsOnline" : "!StatusFriendIsOffline"), name))
{
return;
}
// / xantispam
// Popup a notify box with online status of this agent
LLNotificationPtr notification;
if (online)
{
notification =
LLNotifications::instance().add("FriendOnlineOffline",
args,
payload,
boost::bind(&LLAvatarActions::startIM, agent_id));
}
else
{
notification =
LLNotifications::instance().add("FriendOnlineOffline", args, payload);
}
// If there's an open IM session with this agent, send a notification there too.
LLUUID session_id = LLIMMgr::computeSessionID(IM_NOTHING_SPECIAL, agent_id);
if (LLFloaterIMPanel* floater = gIMMgr->findFloaterBySession(session_id))
{
std::string notify_msg = notification->getMessage();
if (!notify_msg.empty())
floater->addHistoryLine(notify_msg, gSavedSettings.getColor4("SystemChatColor"));
}
}
示例5: on_avatar_name_cache_teleport_request
// static
void LLAvatarActions::on_avatar_name_cache_teleport_request(const LLUUID& id, const LLAvatarName& av_name)
{
LLSD notification;
notification["uuid"] = id;
std::string name;
// [RLVa:KB] - Checked: 2014-03-31 (Catznip-3.6)
if (!RlvActions::canShowName(RlvActions::SNC_TELEPORTREQUEST))
name = RlvStrings::getAnonym(av_name.getLegacyName());
else
// [RLVa:KB]
name = av_name.getNSName();
notification["NAME"] = name;
LLSD payload;
LLNotificationsUtil::add("TeleportRequestPrompt", notification, payload, teleport_request_callback);
}
示例6: on_avatar_name_cache_notify
static void on_avatar_name_cache_notify(const LLUUID& agent_id,
const LLAvatarName& av_name,
bool online,
LLSD payload)
{
// Popup a notify box with online status of this agent
// Use display name only because this user is your friend
LLSD args;
args["NAME"] = av_name.getNSName(friend_name_system());
args["STATUS"] = online ? LLTrans::getString("OnlineStatus") : LLTrans::getString("OfflineStatus");
// Popup a notify box with online status of this agent
LLNotificationPtr notification;
static const LLCachedControl<S32> behavior(gSavedSettings, "LiruOnlineNotificationBehavior", 1);
if (online && behavior)
{
notification =
LLNotifications::instance().add("FriendOnlineOffline",
args,
payload,
behavior == 1 ? boost::bind(&LLAvatarActions::startIM, agent_id) : (LLNotificationResponder)boost::bind(LLAvatarActions::showProfile, agent_id, false));
}
else
{
notification =
LLNotifications::instance().add("FriendOnlineOffline", args, payload);
}
// If there's an open IM session with this agent, send a notification there too.
LLUUID session_id = LLIMMgr::computeSessionID(IM_NOTHING_SPECIAL, agent_id);
if (LLFloaterIMPanel* floater = gIMMgr->findFloaterBySession(session_id))
{
std::string notify_msg = notification->getMessage();
if (!notify_msg.empty())
floater->addHistoryLine(notify_msg, gSavedSettings.getColor4("SystemChatColor"));
}
}