diff options
author | Dmitry Oleshko <doleshko@productengine.com> | 2009-10-30 13:24:49 +0200 |
---|---|---|
committer | Dmitry Oleshko <doleshko@productengine.com> | 2009-10-30 13:24:49 +0200 |
commit | f4424f8867eec64f770715d1d44ea4276c8129af (patch) | |
tree | 3bd24faaa41c0adf9ef7bcbc3224514882af142a /indra/newview | |
parent | 07dabef250596a68328fdadad4ba41b62d9b482b (diff) |
fixed normal bug (EXT-1971) Add fade time period for nearby chat bubbles
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/app_settings/settings.xml | 25 | ||||
-rw-r--r-- | indra/newview/llnearbychathandler.cpp | 2 | ||||
-rw-r--r-- | indra/newview/lltoast.cpp | 6 | ||||
-rw-r--r-- | indra/newview/lltoast.h | 4 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_chat_item.xml | 6 |
5 files changed, 36 insertions, 7 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 5fc0cb6ff8..af702db5f0 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -4886,7 +4886,7 @@ <key>Value</key> <integer>10</integer> </map> - <key>ToastOpaqueTime</key> + <key>ToastFadingTime</key> <map> <key>Comment</key> <string>Number of seconds while a toast is fading </string> @@ -4898,6 +4898,29 @@ <integer>1</integer> </map> <key>StartUpToastLifeTime</key> + <key>NearbyToastFadingTime</key> + <map> + <key>Comment</key> + <string>Number of seconds while a nearby chat toast is fading </string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>S32</string> + <key>Value</key> + <integer>3</integer> + </map> + <key>NearbyToastLifeTime</key> + <map> + <key>Comment</key> + <string>Number of seconds while a nearby chat toast exists</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>S32</string> + <key>Value</key> + <integer>23</integer> + </map> + <key>StartUpToastLifeTime</key> <map> <key>Comment</key> <string>Number of seconds while a StartUp toast exist</string> diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp index 6b0d6d61e0..aef0886be4 100644 --- a/indra/newview/llnearbychathandler.cpp +++ b/indra/newview/llnearbychathandler.cpp @@ -162,6 +162,8 @@ bool LLNearbyChatScreenChannel::createPoolToast() LLToast::Params p; p.panel = panel; + p.lifetime_secs = gSavedSettings.getS32("NearbyToastLifeTime"); + p.fading_time_secs = gSavedSettings.getS32("NearbyToastFadingTime"); LLToast* toast = new LLToast(p); diff --git a/indra/newview/lltoast.cpp b/indra/newview/lltoast.cpp index 24824a095c..903df21e78 100644 --- a/indra/newview/lltoast.cpp +++ b/indra/newview/lltoast.cpp @@ -49,13 +49,15 @@ LLToast::Params::Params() enable_hide_btn("enable_hide_btn", true), force_show("force_show", false), force_store("force_store", false), + fading_time_secs("fading_time_secs", gSavedSettings.getS32("ToastFadingTime")), lifetime_secs("lifetime_secs", gSavedSettings.getS32("NotificationToastLifeTime")) {}; LLToast::LLToast(const LLToast::Params& p) : LLModalDialog(LLSD(), p.is_modal), mPanel(p.panel), - mToastLifetime(p.lifetime_secs), + mToastLifetime(p.lifetime_secs), + mToastFadingTime(p.fading_time_secs), mNotificationID(p.notif_id), mSessionID(p.session_id), mCanFade(p.can_fade), @@ -127,7 +129,7 @@ bool LLToast::lifetimeHasExpired() if (mTimer.getStarted()) { F32 elapsed_time = mTimer.getElapsedTimeF32(); - if ((mToastLifetime - elapsed_time) <= gSavedSettings.getS32("ToastOpaqueTime")) + if ((mToastLifetime - elapsed_time) <= mToastFadingTime) { setBackgroundOpaque(FALSE); } diff --git a/indra/newview/lltoast.h b/indra/newview/lltoast.h index 0698c94880..b670f47045 100644 --- a/indra/newview/lltoast.h +++ b/indra/newview/lltoast.h @@ -63,7 +63,8 @@ public: Optional<LLUUID> notif_id, //notification ID session_id; //im session ID Optional<LLNotificationPtr> notification; - Optional<F32> lifetime_secs; + Optional<F32> lifetime_secs, + fading_time_secs; // Number of seconds while a toast is fading Optional<toast_callback_t> on_delete_toast, on_mouse_enter; Optional<bool> can_fade, @@ -157,6 +158,7 @@ private: // timer counts a lifetime of a toast LLTimer mTimer; F32 mToastLifetime; // in seconds + F32 mToastFadingTime; // in seconds LLPanel* mPanel; LLButton* mHideBtn; diff --git a/indra/newview/skins/default/xui/en/panel_chat_item.xml b/indra/newview/skins/default/xui/en/panel_chat_item.xml index 78f53562cd..05b04bbf8e 100644 --- a/indra/newview/skins/default/xui/en/panel_chat_item.xml +++ b/indra/newview/skins/default/xui/en/panel_chat_item.xml @@ -5,10 +5,10 @@ name="instant_message" width="300" height="180" - background_opaque="false" - background_visible="true" + background_opaque="true" + background_visible="false" follows="left|top|right|bottom" - bg_alpha_color="0.3 0.3 0.3 1.0"> + bg_alpha_color="0.3 0.3 0.3 0"> <panel width="250" height="30" background_visible="true" background_opaque="false" bg_alpha_color="0.0 0.0 0.0 1.0" name="msg_caption"> <avatar_icon top="25" left="10" width="20" height="20" follows="left|top" |