From c50aab4a265643d9d03ae4d0066f853fc5d996eb Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Wed, 26 Aug 2015 16:57:28 -0400 Subject: refine messages per MAINT-5376 (no percentage) --- indra/newview/app_settings/settings.xml | 11 +++---- indra/newview/llavatarrendernotifier.cpp | 38 ++++++++++++++++++++-- indra/newview/llavatarrendernotifier.h | 1 + .../newview/skins/default/xui/en/notifications.xml | 3 +- indra/newview/skins/default/xui/en/strings.xml | 7 ++++ 5 files changed, 50 insertions(+), 10 deletions(-) (limited to 'indra') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 800af06cf3..405848edc8 100755 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -8276,7 +8276,7 @@ RenderComplexityColorMin Comment - Max visual complexity of avatars in a scene + Unused obsolete setting Persist 1 Type @@ -8292,7 +8292,7 @@ RenderComplexityColorMid Comment - Max visual complexity of avatars in a scene + Unused obsolete setting Persist 1 Type @@ -8308,7 +8308,7 @@ RenderComplexityColorMax Comment - Max visual complexity of avatars in a scene + Unused obsolete setting Persist 1 Type @@ -8324,7 +8324,7 @@ RenderComplexityThreshold Comment - Only color objects higher than render threshold + Unused obsolete setting Persist 1 Type @@ -8335,8 +8335,7 @@ RenderComplexityStaticMax Comment - Sets a static max value for scaling of RenderComplexity - display (-1 for dynamic scaling) + Unused obsolete setting Persist 1 Type diff --git a/indra/newview/llavatarrendernotifier.cpp b/indra/newview/llavatarrendernotifier.cpp index 2596035f95..0741206160 100644 --- a/indra/newview/llavatarrendernotifier.cpp +++ b/indra/newview/llavatarrendernotifier.cpp @@ -38,6 +38,7 @@ #include "llnotificationtemplate.h" #include "lltimer.h" #include "llviewercontrol.h" +#include "lltrans.h" // associated header #include "llavatarrendernotifier.h" @@ -58,6 +59,38 @@ mShowOverLimitAgents(false) { } +std::string LLAvatarRenderNotifier::overLimitMessage() +{ + + static const char* not_everyone = "av_render_not_everyone"; + static const char* over_half = "av_render_over_half"; + static const char* most = "av_render_most_of"; + static const char* anyone = "av_render_anyone"; + + std::string message; + if ( mLatestOverLimitPct >= 99.0 ) + { + message = anyone; + } + else if ( mLatestOverLimitPct >= 75.0 ) + { + message = most; + } + else if ( mLatestOverLimitPct >= 50.0 ) + { + message = over_half; + } + else if ( mLatestOverLimitPct > 10.0 ) + { + message = not_everyone; + } + else + { + // message is left empty + } + return LLTrans::getString(message); +} + void LLAvatarRenderNotifier::displayNotification() { static LLCachedControl expire_delay(gSavedSettings, "ShowMyComplexityChanges", 20); @@ -66,10 +99,11 @@ void LLAvatarRenderNotifier::displayNotification() LLSD args; args["AGENT_COMPLEXITY"] = LLSD::Integer(mLatestAgentComplexity); std::string notification_name; - if (mShowOverLimitAgents) + std::string notification_message = overLimitMessage(); + if (mShowOverLimitAgents && !notification_message.empty()) { notification_name = "RegionAndAgentComplexity"; - args["OVERLIMIT_PCT"] = LLSD::Integer(mLatestOverLimitPct); + args["OVERLIMIT_MSG"] = notification_message; } else { diff --git a/indra/newview/llavatarrendernotifier.h b/indra/newview/llavatarrendernotifier.h index 264c616543..d4de5ca87f 100644 --- a/indra/newview/llavatarrendernotifier.h +++ b/indra/newview/llavatarrendernotifier.h @@ -68,6 +68,7 @@ private: F32 mLatestOverLimitPct; bool mShowOverLimitAgents; + std::string overLimitMessage(); }; #endif /* ! defined(LL_llavatarrendernotifier_H) */ diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 97c4c924e7..e603e0aebe 100755 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -3302,8 +3302,7 @@ You can use [SECOND_LIFE] normally and other people will see you correctly. AgentComplexityNotice Your visual complexity is [AGENT_COMPLEXITY]. -[OVERLIMIT_PCT]% of nearby users may not fully show you -with complexity this high. +[OVERLIMIT_MSG] [AGEDAYS] old Joined today + + You may not be rendered by everyone around you. + You may not be rendered by over half of those around you. + You may not be rendered by most of those around you. + You may not be rendered by anyone around you. +