From 50dfa4050343a25a5a34816cc276ec6ec9cf33ce Mon Sep 17 00:00:00 2001 From: chai Date: Thu, 4 Nov 2021 19:03:53 +0800 Subject: *MISC --- Runtime/Scripting/GUI/GUI.bind.cpp | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) (limited to 'Runtime/Scripting/GUI/GUI.bind.cpp') diff --git a/Runtime/Scripting/GUI/GUI.bind.cpp b/Runtime/Scripting/GUI/GUI.bind.cpp index fcc2848..a4ee772 100644 --- a/Runtime/Scripting/GUI/GUI.bind.cpp +++ b/Runtime/Scripting/GUI/GUI.bind.cpp @@ -3,6 +3,7 @@ #include "Runtime/Common/DataBuffer.h" #include "Runtime/FileSystem/FileJobs.h" #include "Runtime/GUI/Font.h" +#include "Runtime/GUI/UITextMesh.h" using namespace std; using namespace LuaBind; @@ -21,9 +22,27 @@ int luaopen_GameLab_Engine_GUI(lua_State* L) state.RegisterNativeClass(); LUA_BIND_REGISTER_ENUM(state, "EEncoding", - { "ASCII", EEncoding::Encoding_ASCII }, - { "UTF8", EEncoding::Encoding_UTF8 }, - { "UTF16", EEncoding::Encoding_UTF16 } + { "ASCII", Encoding_ASCII }, + { "UTF8", Encoding_UTF8 }, + { "UTF16", Encoding_UTF16 } + ); + + LUA_BIND_REGISTER_ENUM(state, "ETextAnchor", + { "UpperLeft", TextAnchor_UpperLeft }, + { "UpperCenter", TextAnchor_UpperCenter }, + { "UpperRight", TextAnchor_UpperRight }, + { "MiddleLeft", TextAnchor_MiddleLeft }, + { "MiddleCenter", TextAnchor_MiddleCenter }, + { "MiddleRight", TextAnchor_MiddleRight }, + { "LowerLeft", TextAnchor_LowerLeft }, + { "LowerCenter", TextAnchor_LowerCenter }, + { "LowerRight", TextAnchor_LowerRight } + ); + + LUA_BIND_REGISTER_ENUM(state, "ETextAlignment", + { "Left", TextAlignment_Left }, + { "Center", TextAlignment_Center }, + { "Right", TextAlignment_Right } ); return 1; -- cgit v1.1-26-g67d0