From ea74422160e1a603800974fb1da0d072c8809b48 Mon Sep 17 00:00:00 2001 From: "Mateo \"Kuruk\" Miccino" Date: Wed, 20 May 2026 20:49:51 -0300 Subject: [PATCH 1/3] feat: add scroll bar support to UI transform Cherry-picks scroll-related additions from protocol-squad: - New PBUiScrollResult component (ecs_component_id 1100) - ShowScrollBar enum and ScrollPositionValue message - element_id, scroll_position, scroll_visible fields on PBUiTransform --- .../sdk/components/ui_scroll_result.proto | 12 +++++++++++ .../sdk/components/ui_transform.proto | 20 +++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 proto/decentraland/sdk/components/ui_scroll_result.proto diff --git a/proto/decentraland/sdk/components/ui_scroll_result.proto b/proto/decentraland/sdk/components/ui_scroll_result.proto new file mode 100644 index 00000000..911a5be0 --- /dev/null +++ b/proto/decentraland/sdk/components/ui_scroll_result.proto @@ -0,0 +1,12 @@ +syntax = "proto3"; + +package decentraland.sdk.components; + +import "decentraland/sdk/components/common/id.proto"; +import "decentraland/common/vectors.proto"; + +option (common.ecs_component_id) = 1100; + +message PBUiScrollResult { + decentraland.common.Vector2 value = 1; +} diff --git a/proto/decentraland/sdk/components/ui_transform.proto b/proto/decentraland/sdk/components/ui_transform.proto index 0e3c9f0c..429a4123 100644 --- a/proto/decentraland/sdk/components/ui_transform.proto +++ b/proto/decentraland/sdk/components/ui_transform.proto @@ -4,6 +4,7 @@ package decentraland.sdk.components; import "decentraland/sdk/components/common/id.proto"; import "decentraland/common/colors.proto"; +import "decentraland/common/vectors.proto"; option (common.ecs_component_id) = 1050; @@ -80,6 +81,20 @@ enum PointerFilterMode { PFM_BLOCK = 1; } +enum ShowScrollBar { + SSB_BOTH = 0; + SSB_ONLY_VERTICAL = 1; + SSB_ONLY_HORIZONTAL = 2; + SSB_HIDDEN = 3; +} + +message ScrollPositionValue { + oneof value { + decentraland.common.Vector2 position = 1; + string reference = 2; + } +} + message PBUiTransform { int32 parent = 1; int32 right_of = 2; @@ -174,5 +189,10 @@ message PBUiTransform { optional decentraland.common.Color4 border_right_color = 72; optional float opacity = 73; // default: 1 + + optional string element_id = 74; // reference for scroll_position. default empty + optional ScrollPositionValue scroll_position = 75; // default position=(0,0) + optional ShowScrollBar scroll_visible = 76; // default ShowScrollBar.SSB_BOTH + optional int32 z_index = 77; // default: 0 — controls render stacking order. Higher values appear in front of lower values. } From 65d9da37c36635bc0e1d3915646895cd81c39669 Mon Sep 17 00:00:00 2001 From: "Mateo \"Kuruk\" Miccino" Date: Wed, 20 May 2026 20:54:08 -0300 Subject: [PATCH 2/3] docs: clarify element_id and scroll field comments MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit element_id is the element's own unique name (HTML-id-like), registered in a named-node table consumed by ScrollPositionValue.reference and the UI focus RPC — not merely a "reference for scroll_position". --- .../sdk/components/ui_transform.proto | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/proto/decentraland/sdk/components/ui_transform.proto b/proto/decentraland/sdk/components/ui_transform.proto index 429a4123..2b6d548d 100644 --- a/proto/decentraland/sdk/components/ui_transform.proto +++ b/proto/decentraland/sdk/components/ui_transform.proto @@ -190,9 +190,21 @@ message PBUiTransform { optional float opacity = 73; // default: 1 - optional string element_id = 74; // reference for scroll_position. default empty - optional ScrollPositionValue scroll_position = 75; // default position=(0,0) - optional ShowScrollBar scroll_visible = 76; // default ShowScrollBar.SSB_BOTH + // Unique name for this UI element (HTML-`id`-like). Registered in a + // named-element table so other components/RPCs can refer to it: today + // consumed by ScrollPositionValue.reference (scroll a named child into view) + // and the UI focus RPC. default empty + optional string element_id = 74; + + // Scroll offset for this node's scroll viewport (only meaningful when + // overflow = YGO_SCROLL). Either a literal Vector2 position, or a string + // referencing another element's element_id to scroll into view. + // default position=(0,0) + optional ScrollPositionValue scroll_position = 75; + + // Which scroll bars to render when this node is scrollable. + // default ShowScrollBar.SSB_BOTH + optional ShowScrollBar scroll_visible = 76; optional int32 z_index = 77; // default: 0 — controls render stacking order. Higher values appear in front of lower values. } From df8368049193eca0f05a0f2ee9ae2b7b9dd11449 Mon Sep 17 00:00:00 2001 From: "Mateo \"Kuruk\" Miccino" Date: Wed, 20 May 2026 21:05:38 -0300 Subject: [PATCH 3/3] chore: use ecs_component_id 1202 for PBUiScrollResult Match the value already in use on protocol-squad so the two branches agree on the component ID. --- proto/decentraland/sdk/components/ui_scroll_result.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proto/decentraland/sdk/components/ui_scroll_result.proto b/proto/decentraland/sdk/components/ui_scroll_result.proto index 911a5be0..df9b8814 100644 --- a/proto/decentraland/sdk/components/ui_scroll_result.proto +++ b/proto/decentraland/sdk/components/ui_scroll_result.proto @@ -5,7 +5,7 @@ package decentraland.sdk.components; import "decentraland/sdk/components/common/id.proto"; import "decentraland/common/vectors.proto"; -option (common.ecs_component_id) = 1100; +option (common.ecs_component_id) = 1202; message PBUiScrollResult { decentraland.common.Vector2 value = 1;