diff options
author | chai <chaifix@163.com> | 2018-11-05 07:33:41 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2018-11-05 07:33:41 +0800 |
commit | 1d1210d7932b287d66e27157701b92df764528cb (patch) | |
tree | 0f6ff1178abb3eec2976cfdee80e201283d949b5 /src/lua/modules/graphics/je_lua_graphics.cpp | |
parent | 91641bccdf744e0dc29f015fbffc64be46d2ad2c (diff) |
+状态机测试代码
Diffstat (limited to 'src/lua/modules/graphics/je_lua_graphics.cpp')
-rw-r--r-- | src/lua/modules/graphics/je_lua_graphics.cpp | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/src/lua/modules/graphics/je_lua_graphics.cpp b/src/lua/modules/graphics/je_lua_graphics.cpp index 7efb2e7..c45a939 100644 --- a/src/lua/modules/graphics/je_lua_graphics.cpp +++ b/src/lua/modules/graphics/je_lua_graphics.cpp @@ -42,6 +42,7 @@ namespace JinEngine setting.width = luax_getfieldinteger(L, 1, "width"); setting.height = luax_getfieldinteger(L, 1, "height"); setting.title = luax_getfieldstring(L, 1, "title"); + setting.icon = luax_getfieldstring(L, 1, "icon"); setting.vsync = luax_getfieldbool(L, 1, "vsync"); setting.fullscreen = luax_getfieldbool(L, 1, "fullscreen"); setting.resizable = luax_getfieldbool(L, 1, "resizable"); @@ -77,7 +78,21 @@ namespace JinEngine wnd->quit(); return 0; } - + + LUA_IMPLEMENT int l_showWindow(lua_State* L) + { + Window* wnd = Window::get(); + wnd->show(); + return 0; + } + + LUA_IMPLEMENT int l_hideWindow(lua_State* L) + { + Window* wnd = Window::get(); + wnd->hide(); + return 0; + } + LUA_IMPLEMENT int l_getSize(lua_State* L) { Window* wnd = Window::get(); @@ -742,7 +757,9 @@ namespace JinEngine { "getSize", l_getSize }, { "getWidth", l_getWidth }, { "getHeight", l_getHeight }, - { "destroy", l_destroy }, + { "destroy", l_destroy }, + { "hideWindow", l_hideWindow }, + { "showWindow", l_showWindow }, /* creators */ { "newBitmap", l_newBitmap }, { "newTexture", l_newTexture }, |