From 02076764ddb107b44860529e7195450183f4b9cc Mon Sep 17 00:00:00 2001 From: Lean Mendoza Date: Wed, 18 Sep 2024 06:54:52 -0300 Subject: [PATCH] in-world UI (#212) * inworld ui * add import * change name * update ui canvas component id --------- Co-authored-by: robtfm <50659922+robtfm@users.noreply.github.com> --- proto/decentraland/common/texture.proto | 9 ++++++++- .../decentraland/sdk/components/ui_canvas.proto | 16 ++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 proto/decentraland/sdk/components/ui_canvas.proto diff --git a/proto/decentraland/common/texture.proto b/proto/decentraland/common/texture.proto index 5cd109b3..bb5767aa 100644 --- a/proto/decentraland/common/texture.proto +++ b/proto/decentraland/common/texture.proto @@ -31,10 +31,17 @@ message VideoTexture { optional TextureFilterMode filter_mode = 3; // default = FilterMode.Bilinear } +message UiCanvasTexture { + uint32 ui_canvas_entity = 1; + optional TextureWrapMode wrap_mode = 2; // default = TextureWrapMode.Clamp + optional TextureFilterMode filter_mode = 3; // default = FilterMode.Bilinear +} + message TextureUnion { oneof tex { Texture texture = 1; // default = null AvatarTexture avatar_texture = 2; // default = null VideoTexture video_texture = 3; // default = null + UiCanvasTexture ui_texture = 4; } -} \ No newline at end of file +} diff --git a/proto/decentraland/sdk/components/ui_canvas.proto b/proto/decentraland/sdk/components/ui_canvas.proto new file mode 100644 index 00000000..3790d96c --- /dev/null +++ b/proto/decentraland/sdk/components/ui_canvas.proto @@ -0,0 +1,16 @@ +syntax = "proto3"; + +import "decentraland/sdk/components/common/id.proto"; +package decentraland.sdk.components; + +option (common.ecs_component_id) = 1203; + +import "decentraland/common/colors.proto"; + +// The UiCanvas component can be attached to a ui root entity to specify properties of the ui texture. +message PBUiCanvas { + uint32 width = 1; + uint32 height = 2; + + optional decentraland.common.Color4 color = 3; // default = (0.0, 0.0, 0.0, 0.0) / transparent +}