summaryrefslogtreecommitdiff
path: root/indra/newview/lltoast.cpp
diff options
context:
space:
mode:
authorLoren Shih <seraph@lindenlab.com>2009-12-10 14:04:45 -0500
committerLoren Shih <seraph@lindenlab.com>2009-12-10 14:04:45 -0500
commit9dfcc83098efec8590c3bdb19da76092955b7e0a (patch)
tree7bb5f7c32c99f79d36d648fda6d732769503ed53 /indra/newview/lltoast.cpp
parent0d186b07121b110bf86a36cd157359f0733a5ee4 (diff)
parentf6a1858884958a67e68227d8078076681e7d478d (diff)
automated merge viewer2.0->viewer2.0
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)