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 From 5888ae934be6f520b770898ca7f973462217d667 Mon Sep 17 00:00:00 2001 From: WolfGangS Date: Fri, 27 Jun 2025 21:49:56 +0100 Subject: Fixes for first click moap --- indra/newview/lltoolpie.h | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'indra/newview/lltoolpie.h') diff --git a/indra/newview/lltoolpie.h b/indra/newview/lltoolpie.h index f88fc00b4a..b2175a67e8 100644 --- a/indra/newview/lltoolpie.h +++ b/indra/newview/lltoolpie.h @@ -98,15 +98,12 @@ private: 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 any object with PRIM_MEDIA_FIRST_CLICK_INTERACT (combines all previous flags) + MEDIA_FIRST_CLICK_ANY = 1073741823,// 0b00111111111111111111111111111111 + // // Covers all media regardless of other rules or PRIM_MEDIA_FIRST_CLICK_INTERACT - MEDIA_FIRST_CLICK_ALL = 1 << 30 // 0b01000000000000000000000000000000 (1073741824) + MEDIA_FIRST_BYPASS_MOAP_FLAG = 1 << 30 // 0b01000000000000000000000000000000 (1073741824) }; bool shouldAllowFirstMediaInteraction(const LLPickInfo& info, bool moap_flag); bool handleMediaClick(const LLPickInfo& info); -- cgit v1.2.3 From e3ce14d0e866c82dc55b70fa0235dde76c8133ba Mon Sep 17 00:00:00 2001 From: WolfGangS Date: Fri, 27 Jun 2025 21:57:51 +0100 Subject: Fix enum option name --- indra/newview/lltoolpie.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/lltoolpie.h') diff --git a/indra/newview/lltoolpie.h b/indra/newview/lltoolpie.h index b2175a67e8..ce02ea7d60 100644 --- a/indra/newview/lltoolpie.h +++ b/indra/newview/lltoolpie.h @@ -103,7 +103,7 @@ private: // // Covers all media regardless of other rules or PRIM_MEDIA_FIRST_CLICK_INTERACT - MEDIA_FIRST_BYPASS_MOAP_FLAG = 1 << 30 // 0b01000000000000000000000000000000 (1073741824) + MEDIA_FIRST_CLICK_BYPASS_MOAP_FLAG = 1 << 30 // 0b01000000000000000000000000000000 (1073741824) }; bool shouldAllowFirstMediaInteraction(const LLPickInfo& info, bool moap_flag); bool handleMediaClick(const LLPickInfo& info); -- cgit v1.2.3 From 13a8e3b830bfcf67d4376165f74da4def6947fce Mon Sep 17 00:00:00 2001 From: WolfGangS Date: Fri, 27 Jun 2025 22:19:43 +0100 Subject: Reviewed changes --- indra/newview/lltoolpie.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'indra/newview/lltoolpie.h') diff --git a/indra/newview/lltoolpie.h b/indra/newview/lltoolpie.h index ce02ea7d60..ee7945d16f 100644 --- a/indra/newview/lltoolpie.h +++ b/indra/newview/lltoolpie.h @@ -99,8 +99,7 @@ private: MEDIA_FIRST_CLICK_LAND = 1 << 4, // 0b00010000 (16) // Covers any object with PRIM_MEDIA_FIRST_CLICK_INTERACT (combines all previous flags) - MEDIA_FIRST_CLICK_ANY = 1073741823,// 0b00111111111111111111111111111111 - // + MEDIA_FIRST_CLICK_ANY = ~(3<<30), // 0b00111111111111111111111111111111 // Covers all media regardless of other rules or PRIM_MEDIA_FIRST_CLICK_INTERACT MEDIA_FIRST_CLICK_BYPASS_MOAP_FLAG = 1 << 30 // 0b01000000000000000000000000000000 (1073741824) -- cgit v1.2.3 From de73d0f0093a5f5f26d0b36ecab0b4d1717e504a Mon Sep 17 00:00:00 2001 From: WolfGang Date: Wed, 2 Jul 2025 20:56:51 +0100 Subject: Merge pull request #4311 from WolfGangS/media-first-click-fixes-2 Fix bit logic mistake in PRIM_MEDIA_FIRST_CLICK_INTERACT work --- indra/newview/lltoolpie.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/lltoolpie.h') diff --git a/indra/newview/lltoolpie.h b/indra/newview/lltoolpie.h index ee7945d16f..d9daad9515 100644 --- a/indra/newview/lltoolpie.h +++ b/indra/newview/lltoolpie.h @@ -94,8 +94,8 @@ private: 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_FRIEND = 1 << 2, // 0b00000100 (4) + MEDIA_FIRST_CLICK_GROUP = 1 << 3, // 0b00001000 (8) MEDIA_FIRST_CLICK_LAND = 1 << 4, // 0b00010000 (16) // Covers any object with PRIM_MEDIA_FIRST_CLICK_INTERACT (combines all previous flags) -- cgit v1.2.3 From c4204a9687a6f41e49879db1e24dcb53a372d31d Mon Sep 17 00:00:00 2001 From: Darl Date: Wed, 23 Jul 2025 19:07:56 -0500 Subject: Media first click interact large number value fix --- indra/newview/lltoolpie.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/lltoolpie.h') diff --git a/indra/newview/lltoolpie.h b/indra/newview/lltoolpie.h index d9daad9515..9914da905e 100644 --- a/indra/newview/lltoolpie.h +++ b/indra/newview/lltoolpie.h @@ -99,10 +99,10 @@ private: MEDIA_FIRST_CLICK_LAND = 1 << 4, // 0b00010000 (16) // Covers any object with PRIM_MEDIA_FIRST_CLICK_INTERACT (combines all previous flags) - MEDIA_FIRST_CLICK_ANY = ~(3<<30), // 0b00111111111111111111111111111111 + MEDIA_FIRST_CLICK_ANY = (1 << 15) - 1, // 0b0111111111111111 (32767) // Covers all media regardless of other rules or PRIM_MEDIA_FIRST_CLICK_INTERACT - MEDIA_FIRST_CLICK_BYPASS_MOAP_FLAG = 1 << 30 // 0b01000000000000000000000000000000 (1073741824) + MEDIA_FIRST_CLICK_BYPASS_MOAP_FLAG = 1 << 15 // 0b10000000000000000 (65535) }; bool shouldAllowFirstMediaInteraction(const LLPickInfo& info, bool moap_flag); bool handleMediaClick(const LLPickInfo& info); -- cgit v1.2.3 From 6ed99747750685c8a34d595a0c516bbeeeed4299 Mon Sep 17 00:00:00 2001 From: Darl Date: Wed, 23 Jul 2025 21:06:34 -0500 Subject: Fix incorrectly calculated number in comment and where it was referenced --- indra/newview/lltoolpie.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/lltoolpie.h') diff --git a/indra/newview/lltoolpie.h b/indra/newview/lltoolpie.h index 9914da905e..ec54e0207d 100644 --- a/indra/newview/lltoolpie.h +++ b/indra/newview/lltoolpie.h @@ -102,7 +102,7 @@ private: MEDIA_FIRST_CLICK_ANY = (1 << 15) - 1, // 0b0111111111111111 (32767) // Covers all media regardless of other rules or PRIM_MEDIA_FIRST_CLICK_INTERACT - MEDIA_FIRST_CLICK_BYPASS_MOAP_FLAG = 1 << 15 // 0b10000000000000000 (65535) + MEDIA_FIRST_CLICK_BYPASS_MOAP_FLAG = 1 << 15 // 0b10000000000000000 (32768) }; bool shouldAllowFirstMediaInteraction(const LLPickInfo& info, bool moap_flag); bool handleMediaClick(const LLPickInfo& info); -- cgit v1.2.3