diff options
author | James Cook <james@lindenlab.com> | 2009-10-06 17:14:30 +0000 |
---|---|---|
committer | James Cook <james@lindenlab.com> | 2009-10-06 17:14:30 +0000 |
commit | ff56ff81638f5fde4199f60be9e52d0af8cad3d8 (patch) | |
tree | c9f953c34838907eafeeb352a0fd2e4440f09b16 /indra/newview | |
parent | 4f353dd3e7a4ead940ba21cbdd038f93974f75fc (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')
-rw-r--r-- | indra/newview/app_settings/settings.xml | 12 | ||||
-rw-r--r-- | indra/newview/lltoolpie.cpp | 18 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/menu_viewer.xml | 30 |
3 files changed, 42 insertions, 18 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 7f96e0761e..806f96a654 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -6117,6 +6117,18 @@ <real>1.0</real> </map> + <key>RenderHighlightEnable</key> + <map> + <key>Comment</key> + <string>Show glow effect when hovering on interactive objects.</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> + <key>RenderHighlightFadeTime</key> <map> <key>Comment</key> 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; } diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 2c77f61da6..7612fa6367 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -2503,7 +2503,6 @@ tear_off="true"> <menu_item_check label="Axes" - layout="topleft" name="Axes"> <menu_item_check.on_check function="CheckControl" @@ -2514,7 +2513,6 @@ </menu_item_check> <menu_item_check label="Tangent Basis" - layout="topleft" name="Tangent Basis"> <menu_item_check.on_check function="CheckControl" @@ -2525,7 +2523,6 @@ </menu_item_check> <menu_item_call label="Selected Texture Info Basis" - layout="topleft" name="Selected Texture Info Basis" shortcut="control|alt|shift|T"> <menu_item_call.on_click @@ -2533,7 +2530,6 @@ </menu_item_call> <menu_item_check label="Wireframe" - layout="topleft" name="Wireframe" shortcut="control|shift|R"> <menu_item_check.on_check @@ -2544,7 +2540,6 @@ </menu_item_check> <menu_item_check label="Object-Object Occlusion" - layout="topleft" name="Object-Object Occlusion" shortcut="control|shift|O"> <menu_item_check.on_check @@ -2558,7 +2553,6 @@ </menu_item_check> <menu_item_check label="Framebuffer Objects" - layout="topleft" name="Framebuffer Objects"> <menu_item_check.on_check function="CheckControl" @@ -2571,7 +2565,6 @@ </menu_item_check> <menu_item_check label="Deferred Rendering" - layout="topleft" name="Deferred Rendering"> <menu_item_check.on_check function="CheckControl" @@ -2584,7 +2577,6 @@ </menu_item_check> <menu_item_check label="Global Illumintation" - layout="topleft" name="Global Illumination"> <menu_item_check.on_check function="CheckControl" @@ -2595,10 +2587,11 @@ <menu_item_check.on_enable function="Advanced.EnableRenderDeferredGI" /> </menu_item_check> - + + <menu_item_separator /> + <menu_item_check label="Debug GL" - layout="topleft" name="Debug GL"> <menu_item_check.on_check function="CheckControl" @@ -2609,7 +2602,6 @@ </menu_item_check> <menu_item_check label="Debug Pipeline" - layout="topleft" name="Debug Pipeline"> <menu_item_check.on_check function="CheckControl" @@ -2620,7 +2612,6 @@ </menu_item_check> <menu_item_check label="Fast Alpha" - layout="topleft" name="Fast Alpha"> <menu_item_check.on_check function="CheckControl" @@ -2631,7 +2622,6 @@ </menu_item_check> <menu_item_check label="Animation Textures" - layout="topleft" name="Animation Textures"> <menu_item_check.on_check function="CheckControl" @@ -2642,7 +2632,6 @@ </menu_item_check> <menu_item_check label="Disable Textures" - layout="topleft" name="Disable Textures"> <menu_item_check.on_check function="Advanced.CheckDisableTextures" @@ -2652,7 +2641,6 @@ </menu_item_check> <menu_item_check label="Texture Atlas" - layout="topleft" name="Texture Atlas"> <menu_item_check.on_check function="Advanced.CheckTextureAtlas" @@ -2662,7 +2650,6 @@ </menu_item_check> <menu_item_check label="Render Attached Lights" - layout="topleft" name="Render Attached Lights"> <menu_item_check.on_check function="CheckControl" @@ -2673,7 +2660,6 @@ </menu_item_check> <menu_item_check label="Render Attached Particles" - layout="topleft" name="Render Attached Particles"> <menu_item_check.on_check function="CheckControl" @@ -2682,6 +2668,16 @@ function="Advanced.HandleAttchedLightParticles" parameter="RenderAttachedParticles" /> </menu_item_check> + <menu_item_check + label="Hover Highlight Objects" + name="Hover Highlight Objects"> + <menu_item_check.on_check + function="CheckControl" + parameter="RenderHighlightEnable" /> + <menu_item_check.on_click + function="ToggleControl" + parameter="RenderHighlightEnable" /> + </menu_item_check> </menu> <menu create_jump_keys="true" |