From ea75bfd4103c4074a8925e8abb14fa73e79821cc Mon Sep 17 00:00:00 2001 From: Darl Date: Fri, 25 Apr 2025 17:46:38 -0500 Subject: Implement support for PRIM_MEDIA_FIRST_CLICK_INTERACT and autoplay for HUD media --- indra/newview/lltoolpie.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'indra/newview/lltoolpie.h') diff --git a/indra/newview/lltoolpie.h b/indra/newview/lltoolpie.h index b3884a6bfc..f88fc00b4a 100644 --- a/indra/newview/lltoolpie.h +++ b/indra/newview/lltoolpie.h @@ -89,6 +89,26 @@ private: void showVisualContextMenuEffect(); ECursorType cursorFromObject(LLViewerObject* object); + enum MediaFirstClickTypes + { + MEDIA_FIRST_CLICK_NONE = 0, // Special case: Feature is disabled + MEDIA_FIRST_CLICK_HUD = 1 << 0, // 0b00000001 (1) + MEDIA_FIRST_CLICK_OWN = 1 << 1, // 0b00000010 (2) + MEDIA_FIRST_CLICK_GROUP = 1 << 2, // 0b00000100 (4) + MEDIA_FIRST_CLICK_FRIEND = 1 << 3, // 0b00001000 (8) + MEDIA_FIRST_CLICK_LAND = 1 << 4, // 0b00010000 (16) + + // Covers any object with PRIM_MEDIA_FIRST_CLICK_INTERACT (combines all other flags) + MEDIA_FIRST_CLICK_ANY = MEDIA_FIRST_CLICK_HUD & + MEDIA_FIRST_CLICK_OWN & + MEDIA_FIRST_CLICK_GROUP & + MEDIA_FIRST_CLICK_FRIEND & + MEDIA_FIRST_CLICK_LAND, + + // Covers all media regardless of other rules or PRIM_MEDIA_FIRST_CLICK_INTERACT + MEDIA_FIRST_CLICK_ALL = 1 << 30 // 0b01000000000000000000000000000000 (1073741824) + }; + bool shouldAllowFirstMediaInteraction(const LLPickInfo& info, bool moap_flag); bool handleMediaClick(const LLPickInfo& info); bool handleMediaDblClick(const LLPickInfo& info); bool handleMediaHover(const LLPickInfo& info); -- cgit v1.2.3