diff options
Diffstat (limited to 'Runtime/Scripting/GUI')
-rw-r--r-- | Runtime/Scripting/GUI/Font.bind.cpp | 2 | ||||
-rw-r--r-- | Runtime/Scripting/GUI/GUI.bind.cpp | 25 |
2 files changed, 23 insertions, 4 deletions
diff --git a/Runtime/Scripting/GUI/Font.bind.cpp b/Runtime/Scripting/GUI/Font.bind.cpp index 699b97f..7d7e3f2 100644 --- a/Runtime/Scripting/GUI/Font.bind.cpp +++ b/Runtime/Scripting/GUI/Font.bind.cpp @@ -137,7 +137,7 @@ LUA_BIND_IMPL_METHOD(Font, _GetCharacters) WipeGLError();
- UITextMesh* tm = new UITextMesh(str, self, size, size + 3, TextAnchor_UpperLeft, TextAlignment_Left, wordwrap, preferred);
+ UITextMesh* tm = new UITextMesh(str, self, size, size + 3, Color32::white, TextAnchor_UpperLeft, TextAlignment_Left, wordwrap, preferred);
tm->Draw();
return 0;
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<Font>(); 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; |