summaryrefslogtreecommitdiff
path: root/Runtime/GUI/UIMesh.h
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2021-11-03 18:52:30 +0800
committerchai <chaifix@163.com>2021-11-03 18:52:30 +0800
commit08ddd44b634d4da78edd0964f539a310544c7883 (patch)
tree108317d9138c3e8a19f3cc3f2ffcfba4768f22d5 /Runtime/GUI/UIMesh.h
parent6f62a3d5ad405dbab5ac031fb8eeb03bdb395904 (diff)
! UI9Slicing
Diffstat (limited to 'Runtime/GUI/UIMesh.h')
-rw-r--r--Runtime/GUI/UIMesh.h9
1 files changed, 9 insertions, 0 deletions
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都是左上角为原点