Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions proto/decentraland/sdk/components/ui_scroll_result.proto
Original file line number Diff line number Diff line change
@@ -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) = 1202;

message PBUiScrollResult {
decentraland.common.Vector2 value = 1;
}
32 changes: 32 additions & 0 deletions proto/decentraland/sdk/components/ui_transform.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -174,5 +189,22 @@ message PBUiTransform {
optional decentraland.common.Color4 border_right_color = 72;

optional float opacity = 73; // default: 1

// 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.
}
Loading