From 2fadd99877eceb55077957b5bab6353611184c86 Mon Sep 17 00:00:00 2001 From: Monroe Linden Date: Fri, 30 Oct 2009 18:14:20 -0700 Subject: Another experiment: made the selection in the nearby media floater track the media impl the media controls are currently referencing (either focus or hover). --- indra/newview/llviewermediafocus.cpp | 14 ++++++++++++++ indra/newview/llviewermediafocus.h | 3 +++ 2 files changed, 17 insertions(+) diff --git a/indra/newview/llviewermediafocus.cpp b/indra/newview/llviewermediafocus.cpp index ffdac35e71..2f7040aaa3 100644 --- a/indra/newview/llviewermediafocus.cpp +++ b/indra/newview/llviewermediafocus.cpp @@ -503,3 +503,17 @@ void LLViewerMediaFocus::focusZoomOnMedia(LLUUID media_id) } } } + +LLUUID LLViewerMediaFocus::getControlsMediaID() +{ + if(getFocusedMediaImpl()) + { + return mFocusedImplID; + } + else if(getHoverMediaImpl()) + { + return mHoverImplID; + } + + return LLUUID::null; +} diff --git a/indra/newview/llviewermediafocus.h b/indra/newview/llviewermediafocus.h index 07a6f0c47b..e5f36d341c 100644 --- a/indra/newview/llviewermediafocus.h +++ b/indra/newview/llviewermediafocus.h @@ -84,6 +84,9 @@ public: // Try to focus/zoom on the specified media (if it's on an object in world). void focusZoomOnMedia(LLUUID media_id); + + // Return the ID of the media instance the controls are currently attached to (either focus or hover). + LLUUID getControlsMediaID(); protected: /*virtual*/ void onFocusReceived(); -- cgit v1.2.3