summaryrefslogtreecommitdiff
path: root/indra/newview/lltoast.cpp
diff options
context:
space:
mode:
authorSteven Bennetts <steve@lindenlab.com>2009-08-03 22:25:48 +0000
committerSteven Bennetts <steve@lindenlab.com>2009-08-03 22:25:48 +0000
commitdb5cda26676f376f18816013c0c5e3fbad5b20d0 (patch)
treeb50e52262d34f55b4eaf35a3a1952007ef0a69de /indra/newview/lltoast.cpp
parent3c85899ee0db4a90d03ec687e514a31c1befe34e (diff)
merge https://svn.aws.productengine.com/secondlife/export-from-ll/viewer-2-0@1211 https://svn.aws.productengine.com/secondlife/pe/stable-1@1228 -> viewer-2.0.0-3
QA: New movement and camera controls. Test all movement and camera behavior against spec and expected behaviors, including sitting & standing. Many other changes to the bottom bar. Changes to local chat behavior.
Diffstat (limited to 'indra/newview/lltoast.cpp')
-rw-r--r--indra/newview/lltoast.cpp24
1 files changed, 19 insertions, 5 deletions
diff --git a/indra/newview/lltoast.cpp b/indra/newview/lltoast.cpp
index 6f5b25214e..0d4c75b507 100644
--- a/indra/newview/lltoast.cpp
+++ b/indra/newview/lltoast.cpp
@@ -36,6 +36,7 @@
#include "llbutton.h"
#include "llfocusmgr.h"
+#include "llviewercontrol.h"
using namespace LLNotificationsUI;
@@ -48,7 +49,8 @@ LLToast::LLToast(LLPanel* panel) :
mCanFade(true),
mHideBtn(NULL),
mIsModal(false),
- mCanBeStored(true)
+ mCanBeStored(true),
+ mHideBtnPressed(false)
{
LLUICtrlFactory::getInstance()->buildPanel(this, "panel_toast.xml");
@@ -104,8 +106,7 @@ bool LLToast::timerHasExpired()
if (mTimer.getStarted())
{
F32 elapsed_time = mTimer.getElapsedTimeF32();
- // after 4 seconds a toast should start fade
- if (elapsed_time > 4)
+ if (elapsed_time > gSavedSettings.getS32("ToastOpaqueTime"))
{
setBackgroundOpaque(FALSE);
}
@@ -218,6 +219,7 @@ void LLToast::onMouseEnter(S32 x, S32 y, MASK mask)
//--------------------------------------------------------------------------
void LLToast::onMouseLeave(S32 x, S32 y, MASK mask)
{
+ llinfos << "MOUSE LEAVE: x = " << x << "y = " << y << llendl;
mOnToastHover(this, MOUSE_LEAVE);
if(mCanFade && !mIsViewed)
@@ -226,14 +228,26 @@ void LLToast::onMouseLeave(S32 x, S32 y, MASK mask)
}
if(mHideBtn && mHideBtn->getEnabled())
{
- if( mHideBtn->getRect().pointInRect(x, y) )
+ if( mHideBtnPressed )
+ {
+ mHideBtnPressed = false;
return;
- mHideBtn->setVisible(FALSE);
+ }
+ mHideBtn->setVisible(FALSE);
}
}
//--------------------------------------------------------------------------
+BOOL LLToast::handleMouseDown(S32 x, S32 y, MASK mask)
+{
+ if(mHideBtn && mHideBtn->getEnabled())
+ {
+ mHideBtnPressed = mHideBtn->getRect().pointInRect(x, y);
+ }
+
+ return LLFloater::handleMouseDown(x, y, mask);
+}