diff options
| author | ailurux <ailuruxx@gmail.com> | 2024-03-28 16:17:39 +1100 |
|---|---|---|
| committer | ailurux <ailuruxx@gmail.com> | 2024-03-28 16:17:39 +1100 |
| commit | c8e67cbd80b53a4e889ce0485546042d5490918c (patch) | |
| tree | f06314fef2bb9afaf04b924355b34f5277d69241 /src/lua/lua_screen.cpp | |
| parent | f1c8866b815a92aeda3133fd27051ce7c873cc57 (diff) | |
| parent | 35a822fe602cdc9e3a3482df3913ea33af6fc8c2 (diff) | |
| download | tangara-fw-c8e67cbd80b53a4e889ce0485546042d5490918c.tar.gz | |
Merge branch 'main' into themes
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); |
