3
0
mirror of https://github.com/britzl/monarch.git synced 2025-09-27 10:02:21 +02:00

Merge pull request #5 from subsoap/master

Adding monarch.screen_exists(id)
This commit is contained in:
Björn Ritzl
2017-11-27 21:16:13 +01:00
committed by GitHub
2 changed files with 16 additions and 1 deletions

View File

@@ -167,6 +167,13 @@ function M.data(id)
return screens[id].data
end
--- Checks to see if a screen id is registered
-- @param id Id of the screen to check if is registered
-- @return True or False if the screen id is registered or not
function M.screen_exists(id)
return screens[id] ~= nil
end
--- Show a new screen
-- @param id Id of the screen to show
-- @param options Table with options when showing the screen (can be nil). Valid values: