mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 03:21:49 +00:00
add hud.is_open(layoutid) --> bool
This commit is contained in:
parent
65bba0088b
commit
db05527fcf
3 changed files with 18 additions and 0 deletions
|
|
@ -189,6 +189,11 @@ static int l_reload_script(lua::State* L) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int l_is_open(lua::State* L) {
|
||||
auto layoutid = lua::require_string(L, 1);
|
||||
return lua::pushboolean(L, hud->isOpen(layoutid));
|
||||
}
|
||||
|
||||
const luaL_Reg hudlib[] = {
|
||||
{"open_inventory", wrap_hud<l_open_inventory>},
|
||||
{"close_inventory", wrap_hud<l_close_inventory>},
|
||||
|
|
@ -208,5 +213,6 @@ const luaL_Reg hudlib[] = {
|
|||
{"_set_debug_cheats", wrap_hud<l_set_debug_cheats>},
|
||||
{"set_allow_pause", wrap_hud<l_set_allow_pause>},
|
||||
{"reload_script", wrap_hud<l_reload_script>},
|
||||
{"is_open", wrap_hud<l_is_open>},
|
||||
{nullptr, nullptr}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue