summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Linden <none@none>2010-10-21 17:14:25 -0700
committerRichard Linden <none@none>2010-10-21 17:14:25 -0700
commit50e77faaf784d970d80d6463e7e2dbcf73d194d8 (patch)
treea799c2692279ce2af17bd3ec63fd5cc573438ceb
parenta0e3c4380d3cbfbb5e0589d081a7068c1525ebce (diff)
parente638204dc2d8b409f17f7cdf8938deb97d137dbc (diff)
merge
-rw-r--r--indra/llui/lllayoutstack.cpp17
-rw-r--r--indra/llui/lllayoutstack.h4
-rw-r--r--indra/newview/app_settings/ignorable_dialogs.xml11
-rw-r--r--indra/newview/app_settings/settings.xml11
-rw-r--r--indra/newview/llbottomtray.cpp1
-rw-r--r--indra/newview/llfirstuse.cpp7
-rw-r--r--indra/newview/llfirstuse.h1
-rw-r--r--indra/newview/llviewermenu.cpp36
-rw-r--r--indra/newview/llviewerwindow.cpp4
-rw-r--r--indra/newview/skins/default/xui/en/notifications.xml8
10 files changed, 81 insertions, 19 deletions
diff --git a/indra/llui/lllayoutstack.cpp b/indra/llui/lllayoutstack.cpp
index 940c7e7e18..ac30fce392 100644
--- a/indra/llui/lllayoutstack.cpp
+++ b/indra/llui/lllayoutstack.cpp
@@ -97,6 +97,8 @@ LLLayoutStack::Params::Params()
: orientation("orientation"),
animate("animate", true),
clip("clip", true),
+ open_time_constant("open_time_constant", 0.02f),
+ close_time_constant("close_time_constant", 0.03f),
border_size("border_size", LLCachedControl<S32>(*LLUI::sSettingGroups["config"], "UIResizeBarHeight", 0))
{
name="stack";
@@ -110,7 +112,9 @@ LLLayoutStack::LLLayoutStack(const LLLayoutStack::Params& p)
mOrientation((p.orientation() == "vertical") ? VERTICAL : HORIZONTAL),
mAnimate(p.animate),
mAnimatedThisFrame(false),
- mClip(p.clip)
+ mClip(p.clip),
+ mOpenTimeConstant(p.open_time_constant),
+ mCloseTimeConstant(p.close_time_constant)
{}
LLLayoutStack::~LLLayoutStack()
@@ -303,9 +307,6 @@ void LLLayoutStack::updateLayout(BOOL force_resize)
S32 total_width = 0;
S32 total_height = 0;
- const F32 ANIM_OPEN_TIME = 0.02f;
- const F32 ANIM_CLOSE_TIME = 0.03f;
-
e_panel_list_t::iterator panel_it;
for (panel_it = mPanels.begin(); panel_it != mPanels.end(); ++panel_it)
{
@@ -316,7 +317,7 @@ void LLLayoutStack::updateLayout(BOOL force_resize)
{
if (!mAnimatedThisFrame)
{
- (*panel_it)->mVisibleAmt = lerp((*panel_it)->mVisibleAmt, 1.f, LLCriticalDamp::getInterpolant(ANIM_OPEN_TIME));
+ (*panel_it)->mVisibleAmt = lerp((*panel_it)->mVisibleAmt, 1.f, LLCriticalDamp::getInterpolant(mOpenTimeConstant));
if ((*panel_it)->mVisibleAmt > 0.99f)
{
(*panel_it)->mVisibleAmt = 1.f;
@@ -334,7 +335,7 @@ void LLLayoutStack::updateLayout(BOOL force_resize)
{
if (!mAnimatedThisFrame)
{
- (*panel_it)->mVisibleAmt = lerp((*panel_it)->mVisibleAmt, 0.f, LLCriticalDamp::getInterpolant(ANIM_CLOSE_TIME));
+ (*panel_it)->mVisibleAmt = lerp((*panel_it)->mVisibleAmt, 0.f, LLCriticalDamp::getInterpolant(mCloseTimeConstant));
if ((*panel_it)->mVisibleAmt < 0.001f)
{
(*panel_it)->mVisibleAmt = 0.f;
@@ -349,11 +350,11 @@ void LLLayoutStack::updateLayout(BOOL force_resize)
if ((*panel_it)->mCollapsed)
{
- (*panel_it)->mCollapseAmt = lerp((*panel_it)->mCollapseAmt, 1.f, LLCriticalDamp::getInterpolant(ANIM_CLOSE_TIME));
+ (*panel_it)->mCollapseAmt = lerp((*panel_it)->mCollapseAmt, 1.f, LLCriticalDamp::getInterpolant(mCloseTimeConstant));
}
else
{
- (*panel_it)->mCollapseAmt = lerp((*panel_it)->mCollapseAmt, 0.f, LLCriticalDamp::getInterpolant(ANIM_CLOSE_TIME));
+ (*panel_it)->mCollapseAmt = lerp((*panel_it)->mCollapseAmt, 0.f, LLCriticalDamp::getInterpolant(mCloseTimeConstant));
}
if (mOrientation == HORIZONTAL)
diff --git a/indra/llui/lllayoutstack.h b/indra/llui/lllayoutstack.h
index e19ef403ef..2fc6164d7a 100644
--- a/indra/llui/lllayoutstack.h
+++ b/indra/llui/lllayoutstack.h
@@ -46,6 +46,8 @@ public:
Optional<S32> border_size;
Optional<bool> animate,
clip;
+ Optional<F32> open_time_constant,
+ close_time_constant;
Params();
};
@@ -137,6 +139,8 @@ private:
bool mAnimatedThisFrame;
bool mAnimate;
bool mClip;
+ F32 mOpenTimeConstant;
+ F32 mCloseTimeConstant;
}; // end class LLLayoutStack
class LLLayoutPanel : public LLPanel
diff --git a/indra/newview/app_settings/ignorable_dialogs.xml b/indra/newview/app_settings/ignorable_dialogs.xml
index f800d836fa..505d852587 100644
--- a/indra/newview/app_settings/ignorable_dialogs.xml
+++ b/indra/newview/app_settings/ignorable_dialogs.xml
@@ -23,6 +23,17 @@
<key>Value</key>
<integer>1</integer>
</map>
+ <key>FirstNotUseAvatarPicker</key>
+ <map>
+ <key>Comment</key>
+ <string>Shows hint when resident doesn't activate avatar picker</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>1</integer>
+ </map>
<key>FirstNotUseSidePanel</key>
<map>
<key>Comment</key>
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index f53c060c1f..f23b57e62c 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -12069,6 +12069,17 @@
<key>Value</key>
<real>1200.0</real>
</map>
+ <key>AvatarPickerHintTimeout</key>
+ <map>
+ <key>Comment</key>
+ <string>Number of seconds to wait before telling resident about avatar picker.</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>F32</string>
+ <key>Value</key>
+ <real>600.0</real>
+ </map>
<key>SidePanelHintTimeout</key>
<map>
<key>Comment</key>
diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp
index 758bc7be64..1ba2a69289 100644
--- a/indra/newview/llbottomtray.cpp
+++ b/indra/newview/llbottomtray.cpp
@@ -521,6 +521,7 @@ BOOL LLBottomTray::postBuild()
{
LLHints::registerHintTarget("bottom_tray", LLView::getHandle());
LLHints::registerHintTarget("dest_guide_btn", getChild<LLUICtrl>("destinations_btn")->getHandle());
+ LLHints::registerHintTarget("avatar_picker_btn", getChild<LLUICtrl>("avatar_picker_btn")->getHandle());
LLUICtrl::CommitCallbackRegistry::currentRegistrar().add("NearbyChatBar.Action", boost::bind(&LLBottomTray::onContextMenuItemClicked, this, _2));
LLUICtrl::EnableCallbackRegistry::currentRegistrar().add("NearbyChatBar.EnableMenuItem", boost::bind(&LLBottomTray::onContextMenuItemEnabled, this, _2));
diff --git a/indra/newview/llfirstuse.cpp b/indra/newview/llfirstuse.cpp
index 5d6197c688..e12a8c2528 100644
--- a/indra/newview/llfirstuse.cpp
+++ b/indra/newview/llfirstuse.cpp
@@ -103,6 +103,13 @@ void LLFirstUse::notUsingDestinationGuide(bool enable)
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)
{
diff --git a/indra/newview/llfirstuse.h b/indra/newview/llfirstuse.h
index 3886df4ee9..04783544b9 100644
--- a/indra/newview/llfirstuse.h
+++ b/indra/newview/llfirstuse.h
@@ -87,6 +87,7 @@ public:
static void otherAvatarChatFirst(bool enable = true);
static void sit(bool enable = true);
static void notUsingDestinationGuide(bool enable = true);
+ static void notUsingAvatarPicker(bool enable = true);
static void notUsingSidePanel(bool enable = true);
static void notMoving(bool enable = true);
static void viewPopup(bool enable = true);
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 0454d4a249..ca9cc8e987 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -847,24 +847,37 @@ class LLAdvancedCheckFeature : public view_listener_t
void LLDestinationGuideToggle()
{
LLView* destination_guide = gViewerWindow->getRootView()->getChildView("destination_guide_container");
- if ( destination_guide )
+ LLView* avatar_picker = gViewerWindow->getRootView()->getChildView("avatar_picker_container");
+
+ if ( destination_guide->getVisible() )
{
- if ( destination_guide->getVisible() )
- {
- destination_guide->setVisible( FALSE );
- }
- else
- {
- LLFirstUse::notUsingDestinationGuide(false);
- destination_guide->setVisible( true );
- }
+ destination_guide->setVisible( FALSE );
+ }
+ else
+ {
+ LLFirstUse::notUsingDestinationGuide(false);
+ destination_guide->setVisible( true );
+ avatar_picker->setVisible( false );
+ }
+};
+
+void LLAvatarPickerToggle()
+{
+ LLView* avatar_picker = gViewerWindow->getRootView()->getChildView("avatar_picker_container");
+ LLView* destination_guide = gViewerWindow->getRootView()->getChildView("destination_guide_container");
+ if ( avatar_picker->getVisible() )
+ {
+ avatar_picker->setVisible( false );
}
else
{
- llwarns << "ERROR: unable to find destination guide container" << llendl;
+ LLFirstUse::notUsingAvatarPicker(false);
+ avatar_picker->setVisible( true );
+ destination_guide->setVisible( false );
}
};
+
//////////////////
// INFO DISPLAY //
//////////////////
@@ -8297,4 +8310,5 @@ void initialize_menus()
view_listener_t::addMenu(new LLToggleUIHints(), "ToggleUIHints");
commit.add("DestinationGuide.toggle", boost::bind(&LLDestinationGuideToggle));
+ commit.add("AvatarPicker.toggle", boost::bind(&LLAvatarPickerToggle));
}
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 9f272fc845..62e8f4223e 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -2460,6 +2460,10 @@ void LLViewerWindow::updateUI()
{
LLFirstUse::notUsingDestinationGuide();
}
+ if (gLoggedInTime.getElapsedTimeF32() > gSavedSettings.getF32("AvatarPickerHintTimeout"))
+ {
+ LLFirstUse::notUsingAvatarPicker();
+ }
if (gLoggedInTime.getElapsedTimeF32() > gSavedSettings.getF32("SidePanelHintTimeout"))
{
LLFirstUse::notUsingSidePanel();
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 834fe6f966..b32a33b59a 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -6448,6 +6448,14 @@ Mute everyone?
</notification>
<notification
+ name="HintAvatarPicker"
+ label="Change your Look"
+ type="hint"
+ unique="true">
+ Would you like to try a new look? Click the button below to see more Avatars.
+ </notification>
+
+ <notification
name="HintSidePanel"
label="Side Panel"
type="hint"