* 非绘图代码控制
This commit is contained in:
@@ -76,6 +76,7 @@ namespace dl
|
||||
|
||||
void lua_register_system(lua_State* L)
|
||||
{
|
||||
#ifndef DL_DISABLE_RENDER
|
||||
luabridge::getGlobalNamespace(L)
|
||||
.beginClass<ParamWindow>("ParamWindow")
|
||||
.addConstructor<void (*)()>() // 忽略这个构造会出错……
|
||||
@@ -90,6 +91,7 @@ namespace dl
|
||||
|
||||
auto result = luabridge::push(L, g_system);
|
||||
lua_setglobal(L, "g_system");
|
||||
#endif
|
||||
}
|
||||
|
||||
void lua_register_file(lua_State* L)
|
||||
@@ -124,6 +126,7 @@ namespace dl
|
||||
|
||||
void lua_register_gfx(lua_State* L)
|
||||
{
|
||||
#ifndef DL_DISABLE_RENDER
|
||||
luabridge::getGlobalNamespace(L)
|
||||
.beginClass<Graphics>("Graphics")
|
||||
.addFunction("Rectangle2D", &Graphics::Rectangle2D)
|
||||
@@ -131,10 +134,12 @@ namespace dl
|
||||
|
||||
auto result = luabridge::push(L, g_gfx);
|
||||
lua_setglobal(L, "g_gfx");
|
||||
#endif
|
||||
}
|
||||
|
||||
void lua_register_ui(lua_State* L)
|
||||
{
|
||||
#ifndef DL_DISABLE_RENDER
|
||||
using namespace UI;
|
||||
luabridge::getGlobalNamespace(L)
|
||||
.beginClass<Panel>("UIPanel")
|
||||
@@ -156,6 +161,7 @@ namespace dl
|
||||
|
||||
auto result = luabridge::push(L, g_ui);
|
||||
lua_setglobal(L, "g_ui");
|
||||
#endif
|
||||
}
|
||||
|
||||
void lua_register_factory(lua_State* L)
|
||||
|
||||
Reference in New Issue
Block a user