diff options
Diffstat (limited to 'src/lua/lua_screen.cpp')
| -rw-r--r-- | src/lua/lua_screen.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/lua/lua_screen.cpp b/src/lua/lua_screen.cpp index 27843bc7..f17f6b1a 100644 --- a/src/lua/lua_screen.cpp +++ b/src/lua/lua_screen.cpp @@ -50,11 +50,15 @@ static auto screen_noop(lua_State* state) -> int { return 0; } -static const struct luaL_Reg kScreenFuncs[] = {{"new", screen_new}, - {"createUi", screen_noop}, - {"onShown", screen_noop}, - {"onHidden", screen_noop}, - {NULL, NULL}}; +static auto screen_true(lua_State* state) -> int { + lua_pushboolean(state, true); + return 1; +} + +static const struct luaL_Reg kScreenFuncs[] = { + {"new", screen_new}, {"createUi", screen_noop}, + {"onShown", screen_noop}, {"onHidden", screen_noop}, + {"canPop", screen_true}, {NULL, NULL}}; static auto lua_screen(lua_State* state) -> int { luaL_newlib(state, kScreenFuncs); |
