diff options
Diffstat (limited to 'Runtime/Scripting')
-rw-r--r-- | Runtime/Scripting/GUI/Font.bind.cpp | 10 | ||||
-rw-r--r-- | Runtime/Scripting/Rendering/Shader.bind.cpp | 4 |
2 files changed, 13 insertions, 1 deletions
diff --git a/Runtime/Scripting/GUI/Font.bind.cpp b/Runtime/Scripting/GUI/Font.bind.cpp index 8259a60..733fcf1 100644 --- a/Runtime/Scripting/GUI/Font.bind.cpp +++ b/Runtime/Scripting/GUI/Font.bind.cpp @@ -5,6 +5,7 @@ #include "Runtime/Common/DataBuffer.h"
#include "Runtime/GUI/utf8.h"
#include "Runtime/Utilities/StaticInitiator.h"
+#include "Runtime/GUI/TextMesh.h"
static std::vector<character::Codepoint>* s_Codepoints;
@@ -127,6 +128,15 @@ LUA_BIND_IMPL_METHOD(Font, _GetCharacters) self->RenderCharacters(*s_Codepoints, size);
+ UnicodeString str;
+ str.str = s_Codepoints->data();
+ str.length = s_Codepoints->size();
+
+ WipeGLError();
+
+ TextMesh* tm = new TextMesh(str, self, size, ETextAnchor::TextAnchor_MiddleLeft, ETextAlignment::TextAlignment_Left);
+ tm->Draw();
+
return 0;
}
diff --git a/Runtime/Scripting/Rendering/Shader.bind.cpp b/Runtime/Scripting/Rendering/Shader.bind.cpp index 482efb9..08c96f9 100644 --- a/Runtime/Scripting/Rendering/Shader.bind.cpp +++ b/Runtime/Scripting/Rendering/Shader.bind.cpp @@ -63,7 +63,8 @@ LUA_BIND_IMPL_METHOD(Shader, _New) if (shader != NULL) shader->PushUserdata(state); else - state.PushNil(); + state.PushNil();
+ return 1; } catch (ShaderCompileExecption e) @@ -72,6 +73,7 @@ LUA_BIND_IMPL_METHOD(Shader, _New) state.PushNil(); return 1; } + Assert(false); return 0; } |