summaryrefslogtreecommitdiff
path: root/indra/newview/llfirstuse.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfirstuse.cpp')
-rw-r--r--indra/newview/llfirstuse.cpp75
1 files changed, 49 insertions, 26 deletions
diff --git a/indra/newview/llfirstuse.cpp b/indra/newview/llfirstuse.cpp
index b08c113923..4d252dc662 100644
--- a/indra/newview/llfirstuse.cpp
+++ b/indra/newview/llfirstuse.cpp
@@ -41,35 +41,36 @@
// static
-std::set<std::string> LLFirstUse::sConfigVariables;
+//std::set<std::string> LLFirstUse::sConfigVariables;
+std::set<std::string> LLFirstUse::sConfigVariablesEnabled;
// static
-void LLFirstUse::addConfigVariable(const std::string& var)
-{
- sConfigVariables.insert(var);
-}
+//void LLFirstUse::addConfigVariable(const std::string& var)
+//{
+// sConfigVariables.insert(var);
+//}
// static
-void LLFirstUse::disableFirstUse()
-{
- // Set all first-use warnings to disabled
- for (std::set<std::string>::iterator iter = sConfigVariables.begin();
- iter != sConfigVariables.end(); ++iter)
- {
- gWarningSettings.setBOOL(*iter, FALSE);
- }
-}
+//void LLFirstUse::disableFirstUse()
+//{
+// // Set all first-use warnings to disabled
+// for (std::set<std::string>::iterator iter = sConfigVariables.begin();
+// iter != sConfigVariables.end(); ++iter)
+// {
+// gWarningSettings.setBOOL(*iter, FALSE);
+// }
+//}
// static
-void LLFirstUse::resetFirstUse()
-{
- // Set all first-use warnings to disabled
- for (std::set<std::string>::iterator iter = sConfigVariables.begin();
- iter != sConfigVariables.end(); ++iter)
- {
- gWarningSettings.setBOOL(*iter, TRUE);
- }
-}
+//void LLFirstUse::resetFirstUse()
+//{
+// // Set all first-use warnings to disabled
+// for (std::set<std::string>::iterator iter = sConfigVariables.begin();
+// iter != sConfigVariables.end(); ++iter)
+// {
+// gWarningSettings.setBOOL(*iter, TRUE);
+// }
+//}
// static
void LLFirstUse::otherAvatarChatFirst(bool enable)
@@ -100,9 +101,16 @@ void LLFirstUse::useSandbox()
void LLFirstUse::notUsingDestinationGuide(bool enable)
{
// not doing this yet
- //firstUseNotification("FirstNotUseDestinationGuide", enable, "HintDestinationGuide", LLSD(), LLSD().with("target", "dest_guide_btn").with("direction", "left"));
+ firstUseNotification("FirstNotUseDestinationGuide", enable, "HintDestinationGuide", LLSD(), LLSD().with("target", "dest_guide_btn").with("direction", "top"));
+}
+
+void LLFirstUse::notUsingAvatarPicker(bool enable)
+{
+ // not doing this yet
+ firstUseNotification("FirstNotUseAvatarPicker", enable, "HintAvatarPicker", LLSD(), LLSD().with("target", "avatar_picker_btn").with("direction", "top"));
}
+
// static
void LLFirstUse::notUsingSidePanel(bool enable)
{
@@ -113,7 +121,15 @@ void LLFirstUse::notUsingSidePanel(bool enable)
// static
void LLFirstUse::notMoving(bool enable)
{
+ // fire off 2 notifications and rely on filtering to select the relevant one
firstUseNotification("FirstNotMoving", enable, "HintMove", LLSD(), LLSD().with("target", "move_btn").with("direction", "top"));
+ firstUseNotification("FirstNotMoving", enable, "HintMoveArrows", LLSD(), LLSD().with("target", "bottom_tray").with("direction", "top").with("hint_image", "arrow_keys.png").with("down_arrow", ""));
+}
+
+// static
+void LLFirstUse::viewPopup(bool enable)
+{
+ firstUseNotification("FirstViewPopup", enable, "HintView", LLSD(), LLSD().with("target", "view_popup").with("direction", "right"));
}
// static
@@ -136,13 +152,21 @@ void LLFirstUse::firstUseNotification(const std::string& control_var, bool enabl
if (enable)
{
+ if(sConfigVariablesEnabled.find(control_var) != sConfigVariablesEnabled.end())
+ {
+ return ; //already added
+ }
+
if (gSavedSettings.getBOOL("EnableUIHints"))
{
LL_DEBUGS("LLFirstUse") << "Trigger first use notification " << notification_name << LL_ENDL;
// if notification doesn't already exist and this notification hasn't been disabled...
if (gWarningSettings.getBOOL(control_var))
- { // create new notification
+ {
+ sConfigVariablesEnabled.insert(control_var) ;
+
+ // create new notification
LLNotifications::instance().add(LLNotification::Params().name(notification_name).substitutions(args).payload(payload.with("control_var", control_var)));
}
}
@@ -154,7 +178,6 @@ void LLFirstUse::firstUseNotification(const std::string& control_var, bool enabl
// redundantly clear settings var here, in case there are no notifications to cancel
gWarningSettings.setBOOL(control_var, FALSE);
}
-
}
// static