From 7ffc9b06c820d70724af2aef361ff9964e584e73 Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Fri, 8 Oct 2010 16:56:02 -0700 Subject: Created a floater for setting display name --- indra/newview/llhints.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra/newview/llhints.cpp') diff --git a/indra/newview/llhints.cpp b/indra/newview/llhints.cpp index d837ed8205..b326fc26f2 100644 --- a/indra/newview/llhints.cpp +++ b/indra/newview/llhints.cpp @@ -210,10 +210,15 @@ void LLHintPopup::draw() } else if (!targetp->isInVisibleChain()) { + setEnabled(false); + setMouseOpaque(false); // if target is invisible, don't draw, but keep alive in case widget comes back } else { + setEnabled(true); + setMouseOpaque(true); + LLRect target_rect; targetp->localRectToOtherView(targetp->getLocalRect(), &target_rect, getParent()); -- cgit v1.2.3 From 3059e130984052091cadd92007413df3c8cea07d Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Fri, 8 Oct 2010 17:01:32 -0700 Subject: Fixed issue where non-visible hint wasn't allowing mouse events to pass through --- indra/newview/llhints.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'indra/newview/llhints.cpp') diff --git a/indra/newview/llhints.cpp b/indra/newview/llhints.cpp index b326fc26f2..7f6df627e0 100644 --- a/indra/newview/llhints.cpp +++ b/indra/newview/llhints.cpp @@ -210,12 +210,14 @@ void LLHintPopup::draw() } else if (!targetp->isInVisibleChain()) { + // if target is invisible, don't draw, but keep alive in case widget comes back + // but do make it so that it allows mouse events to pass through setEnabled(false); setMouseOpaque(false); - // if target is invisible, don't draw, but keep alive in case widget comes back } else { + // revert back enabled and mouse opaque state in case we disabled it before setEnabled(true); setMouseOpaque(true); -- cgit v1.2.3 From 01b28ddf5ddc7118bc8b2047d899aee0293a8721 Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Wed, 6 Oct 2010 20:10:36 -0700 Subject: EXP-156 WIP Implement custom Skylight hints --- indra/newview/llhints.cpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'indra/newview/llhints.cpp') diff --git a/indra/newview/llhints.cpp b/indra/newview/llhints.cpp index d837ed8205..5ffc4ace59 100644 --- a/indra/newview/llhints.cpp +++ b/indra/newview/llhints.cpp @@ -33,6 +33,7 @@ #include "lltextbox.h" #include "llviewerwindow.h" #include "llviewercontrol.h" +#include "lliconctrl.h" #include "llsdparam.h" class LLHintPopup : public LLPanel @@ -80,7 +81,8 @@ public: up_arrow, right_arrow, down_arrow, - lower_left_arrow; + lower_left_arrow, + hint_image; Optional left_arrow_offset, up_arrow_offset, @@ -96,6 +98,7 @@ public: right_arrow("right_arrow"), down_arrow("down_arrow"), lower_left_arrow("lower_left_arrow"), + hint_image("hint_image"), left_arrow_offset("left_arrow_offset"), up_arrow_offset("up_arrow_offset"), right_arrow_offset("right_arrow_offset"), @@ -159,7 +162,15 @@ LLHintPopup::LLHintPopup(const LLHintPopup::Params& p) mDirection = p.target_params.direction; mTarget = p.target_params.target; } - buildFromFile( "panel_hint.xml", NULL, p); + if (p.hint_image.isProvided()) + { + buildFromFile("panel_hint_image.xml", NULL, p); + getChild("hint_image")->setImage(p.hint_image()); + } + else + { + buildFromFile( "panel_hint.xml", NULL, p); + } } BOOL LLHintPopup::postBuild() -- cgit v1.2.3 From 7df167129955f2f44b2048f1e8e89c685f2b7485 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Fri, 15 Oct 2010 14:05:11 -0700 Subject: EXP-229 FIXED Double clicking x on UI hint crashes Skylight Viewer --- indra/newview/llhints.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'indra/newview/llhints.cpp') diff --git a/indra/newview/llhints.cpp b/indra/newview/llhints.cpp index 5ffc4ace59..8edc42e15c 100644 --- a/indra/newview/llhints.cpp +++ b/indra/newview/llhints.cpp @@ -112,7 +112,14 @@ public: /*virtual*/ BOOL postBuild(); - void onClickClose() { hide(); LLNotifications::instance().cancel(mNotification); } + void onClickClose() + { + if (!mHidden) + { + hide(); + LLNotifications::instance().cancel(mNotification); + } + } void draw(); void hide() { if(!mHidden) {mHidden = true; mFadeTimer.reset();} } -- cgit v1.2.3 From 95c998918646777e0f12b6663c364a93d2c8df3c Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Fri, 29 Oct 2010 14:58:35 -0700 Subject: VWR-23444 FIXED Double clicking x on UI hint crashes Skylight Viewer --- indra/newview/llhints.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'indra/newview/llhints.cpp') diff --git a/indra/newview/llhints.cpp b/indra/newview/llhints.cpp index 7f6df627e0..3f0deb98cd 100644 --- a/indra/newview/llhints.cpp +++ b/indra/newview/llhints.cpp @@ -109,7 +109,14 @@ public: /*virtual*/ BOOL postBuild(); - void onClickClose() { hide(); LLNotifications::instance().cancel(mNotification); } + void onClickClose() + { + if (!mHidden) + { + hide(); + LLNotifications::instance().cancel(mNotification); + } + } void draw(); void hide() { if(!mHidden) {mHidden = true; mFadeTimer.reset();} } -- cgit v1.2.3