mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 19:11:50 +00:00
core.delete_world and pages refreshing
This commit is contained in:
parent
c457bdb293
commit
06efdac106
5 changed files with 33 additions and 8 deletions
|
|
@ -28,6 +28,12 @@ static int l_open_world(lua_State* L) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int l_delete_world(lua_State* L) {
|
||||
auto name = lua_tostring(L, 1);
|
||||
menus::delete_world(name, scripting::engine);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int l_quit(lua_State* L) {
|
||||
Window::setShouldClose(true);
|
||||
return 0;
|
||||
|
|
@ -36,6 +42,7 @@ static int l_quit(lua_State* L) {
|
|||
const luaL_Reg corelib [] = {
|
||||
{"get_worlds_list", lua_wrap_errors<l_get_worlds_list>},
|
||||
{"open_world", lua_wrap_errors<l_open_world>},
|
||||
{"delete_world", lua_wrap_errors<l_delete_world>},
|
||||
{"quit", lua_wrap_errors<l_quit>},
|
||||
{NULL, NULL}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue