diff options
Diffstat (limited to 'src/lua/graphics/luaopen_graphics.cpp')
-rw-r--r-- | src/lua/graphics/luaopen_graphics.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/lua/graphics/luaopen_graphics.cpp b/src/lua/graphics/luaopen_graphics.cpp index 2d1ff57..a394cc3 100644 --- a/src/lua/graphics/luaopen_graphics.cpp +++ b/src/lua/graphics/luaopen_graphics.cpp @@ -27,12 +27,14 @@ namespace lua */ static int l_init(lua_State* L) { - WindowSystem* wnd = WindowSystem::get(); - WindowSystem::Setting setting; + Window* wnd = Window::get(); + Window::Setting setting; setting.width = luax_getfield_integer(L, 1, "width"); setting.height = luax_getfield_integer(L, 1, "height"); setting.title = luax_getfield_string(L, 1, "title"); setting.vsync = luax_getfield_bool(L, 1, "vsync"); + setting.fullscreen = luax_getfield_bool(L, 1, "fullscreen"); + setting.resizable= luax_getfield_bool(L, 1, "resizable"); if (!wnd->init(&setting)) { luax_pushboolean(L, false); @@ -44,7 +46,7 @@ namespace lua static int l_destroy(lua_State* L) { - WindowSystem* wnd = WindowSystem::get(); + Window* wnd = Window::get(); wnd->quit(); return 0; } @@ -54,7 +56,7 @@ namespace lua */ static int l_getSize(lua_State* L) { - WindowSystem* wnd = WindowSystem::get(); + Window* wnd = Window::get(); luax_pushnumber(L, wnd->getW()); luax_pushnumber(L, wnd->getH()); return 2; @@ -131,7 +133,7 @@ namespace lua */ static int l_present(lua_State* L) { - WindowSystem::get()->swapBuffers(); + Window::get()->swapBuffers(); return 0; } |