summaryrefslogtreecommitdiff
path: root/Runtime/Scripting/GUI/GUI.bind.cpp
blob: fcc28483e7843671c056d16c1a830436c6c2ecff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include "Runtime/Lua/LuaHelper.h"
#include "Runtime/Debug/Log.h"
#include "Runtime/Common/DataBuffer.h"
#include "Runtime/FileSystem/FileJobs.h"
#include "Runtime/GUI/Font.h"

using namespace std;
using namespace LuaBind;

int luaopen_GameLab_Engine_GUI(lua_State* L)
{
    log_info_tag("Scripting", "luaopen_GameLab_Engine_GUI()");

    LUA_BIND_STATE(L);

    state.PushGlobalNamespace();
    state.PushNamespace("GameLab");
    state.PushNamespace("Engine");
    state.PushNamespace("GUI");

    state.RegisterNativeClass<Font>();

    LUA_BIND_REGISTER_ENUM(state, "EEncoding",
        { "ASCII", EEncoding::Encoding_ASCII },
        { "UTF8", EEncoding::Encoding_UTF8 },
        { "UTF16", EEncoding::Encoding_UTF16 }
    );

    return 1;
}