diff options
Diffstat (limited to 'src/script/graphics/luaopen_graphics.cpp')
-rw-r--r-- | src/script/graphics/luaopen_graphics.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/script/graphics/luaopen_graphics.cpp b/src/script/graphics/luaopen_graphics.cpp index 948e28a..40bdaa1 100644 --- a/src/script/graphics/luaopen_graphics.cpp +++ b/src/script/graphics/luaopen_graphics.cpp @@ -38,6 +38,13 @@ namespace lua luax_pushboolean(L, wnd->init(&setting)); return 1; } + + static int l_destroy(lua_State* L) + { + Window* wnd = Window::get(); + wnd->quit(); + return 0; + } /** * Get windows size. @@ -488,6 +495,8 @@ namespace lua {"circle", l_drawCircle}, {"triangle", l_drawTriangle}, {"polygon", l_drawPolygon}, + // + {"destroy", l_destroy}, {0, 0} }; |