@dcl/protocol 1.0.0-3766287015.commit-7d88411 → 1.0.0-3808528053.commit-d66d462
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/proto/decentraland/common/border_rect.proto +10 -0
- package/proto/decentraland/sdk/components/{pointer_hover_feedback.proto → pointer_events.proto} +1 -1
- package/proto/decentraland/sdk/components/pointer_events_result.proto +1 -1
- package/proto/decentraland/sdk/components/ui_background.proto +25 -2
- package/proto/decentraland/sdk/components/ui_dropdown.proto +22 -0
- package/proto/decentraland/sdk/components/ui_dropdown_result.proto +11 -0
- package/proto/decentraland/sdk/components/ui_input.proto +19 -0
- package/proto/decentraland/sdk/components/ui_input_result.proto +11 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dcl/protocol",
|
|
3
|
-
"version": "1.0.0-
|
|
3
|
+
"version": "1.0.0-3808528053.commit-d66d462",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -25,5 +25,5 @@
|
|
|
25
25
|
"out-ts",
|
|
26
26
|
"public"
|
|
27
27
|
],
|
|
28
|
-
"commit": "
|
|
28
|
+
"commit": "d66d46238f6713d295d8bd2a9c090ba13345034b"
|
|
29
29
|
}
|
package/proto/decentraland/sdk/components/{pointer_hover_feedback.proto → pointer_events.proto}
RENAMED
|
@@ -14,7 +14,7 @@ enum PointerEventType {
|
|
|
14
14
|
PET_HOVER_LEAVE = 3;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
message
|
|
17
|
+
message PBPointerEvents {
|
|
18
18
|
message Info {
|
|
19
19
|
optional common.InputAction button = 1; // default=InputAction.ANY
|
|
20
20
|
optional string hover_text = 2; // default='Interact'
|
|
@@ -4,7 +4,7 @@ package decentraland.sdk.components;
|
|
|
4
4
|
|
|
5
5
|
import "decentraland/sdk/components/common/id.proto";
|
|
6
6
|
import "decentraland/sdk/components/common/input_action.proto";
|
|
7
|
-
import "decentraland/sdk/components/
|
|
7
|
+
import "decentraland/sdk/components/pointer_events.proto";
|
|
8
8
|
import "decentraland/sdk/components/raycast_result.proto";
|
|
9
9
|
|
|
10
10
|
option (common.ecs_component_id) = 1063;
|
|
@@ -5,7 +5,30 @@ import "decentraland/sdk/components/common/id.proto";
|
|
|
5
5
|
option (common.ecs_component_id) = 1053;
|
|
6
6
|
|
|
7
7
|
import "decentraland/common/colors.proto";
|
|
8
|
+
import "decentraland/common/texture.proto";
|
|
9
|
+
import "decentraland/common/border_rect.proto";
|
|
8
10
|
|
|
9
11
|
message PBUiBackground {
|
|
10
|
-
optional decentraland.common.Color4
|
|
11
|
-
|
|
12
|
+
optional decentraland.common.Color4 color = 1; // default=(1.0, 1.0, 1.0, 1.0), pixel = color * sample2D(texture, uv)
|
|
13
|
+
optional decentraland.common.TextureUnion texture = 2;
|
|
14
|
+
BackgroundTextureMode texture_mode = 3;
|
|
15
|
+
optional decentraland.common.BorderRect texture_slices = 4; // default=(1/3, 1/3, 1/3, 1/3)
|
|
16
|
+
repeated float uvs = 5; // default=[0,0,0,1,1,0,1,0]: starting from bottom-left vertex clock-wise
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
enum BackgroundTextureMode {
|
|
20
|
+
// https://docs.unity3d.com/Manual/UIE-USS-SupportedProperties.html (Slicing section)
|
|
21
|
+
// https://forum.unity.com/threads/how-does-slicing-in-ui-tookkit-works.1235863/
|
|
22
|
+
// https://docs.unity3d.com/Manual/9SliceSprites.html
|
|
23
|
+
// https://developer.mozilla.org/en-US/docs/Web/CSS/border-image-slice
|
|
24
|
+
NINE_SLICES = 0;
|
|
25
|
+
|
|
26
|
+
// CENTER enables the texture to be rendered centered in relation to the
|
|
27
|
+
// element. If the element is smaller than the texture then the background
|
|
28
|
+
// should use the element as stencil to cut off the out-of-bounds area
|
|
29
|
+
CENTER = 1;
|
|
30
|
+
|
|
31
|
+
// STRETCH enables the texture to cover all the area of the container,
|
|
32
|
+
// adopting its aspect ratio.
|
|
33
|
+
STRETCH = 2;
|
|
34
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package decentraland.sdk.components;
|
|
4
|
+
|
|
5
|
+
import "decentraland/common/colors.proto";
|
|
6
|
+
import "decentraland/sdk/components/common/id.proto";
|
|
7
|
+
import "decentraland/sdk/components/common/texts.proto";
|
|
8
|
+
|
|
9
|
+
option (common.ecs_component_id) = 1094;
|
|
10
|
+
|
|
11
|
+
message PBUiDropdown {
|
|
12
|
+
bool accept_empty = 1;
|
|
13
|
+
optional string empty_label = 2;
|
|
14
|
+
repeated string options = 3;
|
|
15
|
+
optional int32 selected_index = 4; // default=null when accept_empty==true; default=0 when accept_empty==false
|
|
16
|
+
bool disabled = 5;
|
|
17
|
+
optional decentraland.common.Color4 color = 6; // default=(0.0,0.0,0.0,1.0)
|
|
18
|
+
|
|
19
|
+
optional common.TextAlignMode text_align = 10; // default='center'
|
|
20
|
+
optional common.Font font = 11; // default=0
|
|
21
|
+
optional int32 font_size = 12; // default=10
|
|
22
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package decentraland.sdk.components;
|
|
4
|
+
|
|
5
|
+
import "decentraland/common/colors.proto";
|
|
6
|
+
import "decentraland/sdk/components/common/id.proto";
|
|
7
|
+
import "decentraland/sdk/components/common/texts.proto";
|
|
8
|
+
|
|
9
|
+
option (common.ecs_component_id) = 1093;
|
|
10
|
+
|
|
11
|
+
message PBUiInput {
|
|
12
|
+
string placeholder = 1;
|
|
13
|
+
optional decentraland.common.Color4 color = 2; // default=(0.0,0.0,0.0,1.0)
|
|
14
|
+
optional decentraland.common.Color4 placeholder_color = 3; // default=(0.3,0.3,0.3,1.0)
|
|
15
|
+
bool disabled = 4;
|
|
16
|
+
optional common.TextAlignMode text_align = 10; // default='center'
|
|
17
|
+
optional common.Font font = 11; // default=0
|
|
18
|
+
optional int32 font_size = 12; // default=10
|
|
19
|
+
}
|