From 1d1210d7932b287d66e27157701b92df764528cb Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 5 Nov 2018 07:33:41 +0800 Subject: =?UTF-8?q?+=E7=8A=B6=E6=80=81=E6=9C=BA=E6=B5=8B=E8=AF=95=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/lua/modules/graphics/je_lua_graphics.cpp | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'src/lua/modules/graphics/je_lua_graphics.cpp') 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 }, -- cgit v1.1-26-g67d0