summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llviewermediafocus.cpp14
-rw-r--r--indra/newview/llviewermediafocus.h3
2 files changed, 17 insertions, 0 deletions
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();