summaryrefslogtreecommitdiff
path: root/indra/newview/lltoolpie.cpp
diff options
context:
space:
mode:
authorJames Cook <james@lindenlab.com>2009-10-06 17:14:30 +0000
committerJames Cook <james@lindenlab.com>2009-10-06 17:14:30 +0000
commitff56ff81638f5fde4199f60be9e52d0af8cad3d8 (patch)
treec9f953c34838907eafeeb352a0fd2e4440f09b16 /indra/newview/lltoolpie.cpp
parent4f353dd3e7a4ead940ba21cbdd038f93974f75fc (diff)
EXT-1335 Enable hover glow for interactive objects. Tied to Develop > Rendering > Hover Highlight Objects and off by default for now, pending a fix to EXT-1336, a problem with Low graphics settings. Reviewed with Leyla.
Diffstat (limited to 'indra/newview/lltoolpie.cpp')
-rw-r--r--indra/newview/lltoolpie.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp
index 5525c359fc..aa55d54dbb 100644
--- a/indra/newview/lltoolpie.cpp
+++ b/indra/newview/lltoolpie.cpp
@@ -70,6 +70,7 @@
#include "llworld.h"
#include "llui.h"
#include "llweb.h"
+#include "pipeline.h" // setHighlightObject
extern BOOL gDebugClicks;
@@ -472,7 +473,9 @@ void LLToolPie::selectionPropertiesReceived()
BOOL LLToolPie::handleHover(S32 x, S32 y, MASK mask)
{
mHoverPick = gViewerWindow->pickImmediate(x, y, FALSE);
-
+
+ // Show screen-space highlight glow effect
+ bool show_highlight = false;
LLViewerObject *parent = NULL;
LLViewerObject *object = mHoverPick.getObject();
@@ -483,24 +486,28 @@ BOOL LLToolPie::handleHover(S32 x, S32 y, MASK mask)
if (object && useClickAction(mask, object, parent))
{
+ show_highlight = true;
ECursorType cursor = cursor_from_object(object);
gViewerWindow->setCursor(cursor);
lldebugst(LLERR_USER_INPUT) << "hover handled by LLToolPie (inactive)" << llendl;
}
else if (handleMediaHover(mHoverPick))
{
+ show_highlight = true;
// cursor set by media object
lldebugst(LLERR_USER_INPUT) << "hover handled by LLToolPie (inactive)" << llendl;
}
else if ((object && !object->isAvatar() && object->usePhysics())
|| (parent && !parent->isAvatar() && parent->usePhysics()))
{
+ show_highlight = true;
gViewerWindow->setCursor(UI_CURSOR_TOOLGRAB);
lldebugst(LLERR_USER_INPUT) << "hover handled by LLToolPie (inactive)" << llendl;
}
else if ( (object && object->flagHandleTouch())
|| (parent && parent->flagHandleTouch()))
{
+ show_highlight = true;
gViewerWindow->setCursor(UI_CURSOR_HAND);
lldebugst(LLERR_USER_INPUT) << "hover handled by LLToolPie (inactive)" << llendl;
}
@@ -519,6 +526,15 @@ BOOL LLToolPie::handleHover(S32 x, S32 y, MASK mask)
}
}
+ static LLCachedControl<bool> enable_highlight(
+ gSavedSettings, "RenderHighlightEnable", false);
+ LLDrawable* drawable = NULL;
+ if (enable_highlight && show_highlight && object)
+ {
+ drawable = object->mDrawable;
+ }
+ gPipeline.setHighlightObject(drawable);
+
return TRUE;
}