From 08ddd44b634d4da78edd0964f539a310544c7883 Mon Sep 17 00:00:00 2001 From: chai Date: Wed, 3 Nov 2021 18:52:30 +0800 Subject: ! UI9Slicing --- Runtime/GUI/UIMesh.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'Runtime/GUI/UIMesh.h') diff --git a/Runtime/GUI/UIMesh.h b/Runtime/GUI/UIMesh.h index dd83e6e..8b6b56d 100644 --- a/Runtime/GUI/UIMesh.h +++ b/Runtime/GUI/UIMesh.h @@ -11,11 +11,20 @@ struct UIVertexLayout { + UIVertexLayout(Vector2 pos = Vector2::zero, Vector2 texCoord = Vector2::zero, Color32 col = Color32()) + { + position = pos; + uv = texCoord; + color = col; + } + Vector2 position; Vector2 uv; Color32 color; }; +typedef uint16 UIIndex; + CustomException(UIMeshException); // 所有的UIMesh都是左上角为原点 -- cgit v1.1-26-g67d0