summaryrefslogtreecommitdiff
path: root/indra/newview/lltoast.cpp
diff options
context:
space:
mode:
authorskolb <none@none>2009-12-11 08:49:37 -0800
committerskolb <none@none>2009-12-11 08:49:37 -0800
commit6542ffe2f05c47d74dfbe659041d956d609f91f3 (patch)
tree7794c0737c5a78b0339c2c34b47c9d32c44de749 /indra/newview/lltoast.cpp
parent431bfca2ade364dc1165e402537e5e2d3616ebfd (diff)
parenteda8634b17133df5f3104d96ad56d3626a90aad8 (diff)
Merge viewer 2-0 into media
Diffstat (limited to 'indra/newview/lltoast.cpp')
-rw-r--r--indra/newview/lltoast.cpp23
1 files changed, 22 insertions, 1 deletions
diff --git a/indra/newview/lltoast.cpp b/indra/newview/lltoast.cpp
index fc7c029a17..4131e2755a 100644
--- a/indra/newview/lltoast.cpp
+++ b/indra/newview/lltoast.cpp
@@ -67,7 +67,8 @@ LLToast::LLToast(const LLToast::Params& p)
mHideBtn(NULL),
mNotification(p.notification),
mIsHidden(false),
- mHideBtnPressed(false)
+ mHideBtnPressed(false),
+ mIsTip(p.is_tip)
{
LLUICtrlFactory::getInstance()->buildFloater(this, "panel_toast.xml", NULL);
@@ -98,10 +99,30 @@ BOOL LLToast::postBuild()
mTimer.stop();
}
+ if (mIsTip)
+ {
+ mTextEditor = mPanel->getChild<LLTextEditor>("text_editor_box");
+
+ if (mTextEditor)
+ {
+ mTextEditor->setMouseUpCallback(boost::bind(&LLToast::hide,this));
+ mPanel->setMouseUpCallback(boost::bind(&LLToast::handleTipToastClick, this, _2, _3, _4));
+ }
+ }
+
return TRUE;
}
//--------------------------------------------------------------------------
+void LLToast::handleTipToastClick(S32 x, S32 y, MASK mask)
+{
+ if (!mTextEditor->getRect().pointInRect(x, y))
+ {
+ hide();
+ }
+}
+
+//--------------------------------------------------------------------------
void LLToast::setHideButtonEnabled(bool enabled)
{
if(mHideBtn)