mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 11:01:49 +00:00
lua: hud.pause/resume + menu:back() method
This commit is contained in:
parent
f64a851a24
commit
0c0d850d5d
3 changed files with 42 additions and 10 deletions
|
|
@ -99,6 +99,16 @@ static int l_hud_close(lua_State* L) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int l_hud_pause(lua_State* L) {
|
||||
scripting::hud->setPause(true);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int l_hud_resume(lua_State* L) {
|
||||
scripting::hud->setPause(false);
|
||||
return 0;
|
||||
}
|
||||
|
||||
const luaL_Reg hudlib [] = {
|
||||
{"open_inventory", lua_wrap_errors<l_hud_open_inventory>},
|
||||
{"close_inventory", lua_wrap_errors<l_hud_close_inventory>},
|
||||
|
|
@ -106,5 +116,7 @@ const luaL_Reg hudlib [] = {
|
|||
{"open_permanent", lua_wrap_errors<l_hud_open_permanent>},
|
||||
{"show_overlay", lua_wrap_errors<l_hud_show_overlay>},
|
||||
{"close", lua_wrap_errors<l_hud_close>},
|
||||
{"pause", lua_wrap_errors<l_hud_pause>},
|
||||
{"resume", lua_wrap_errors<l_hud_resume>},
|
||||
{NULL, NULL}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue