mirror of
https://github.com/britzl/monarch.git
synced 2025-09-27 18:12:22 +02:00
Added monarch.is_loaded()
This commit is contained in:
@@ -228,6 +228,17 @@ function M.is_visible(id)
|
||||
end
|
||||
|
||||
|
||||
--- Check if a screen is loaded
|
||||
-- @param id (string|hash)
|
||||
-- @return true if the screen is loaded
|
||||
function M.is_loaded(id)
|
||||
assert(id, "You must provide a screen id")
|
||||
id = tohash(id)
|
||||
assert(screens[id], ("There is no screen registered with id %s"):format(tostring(id)))
|
||||
return screens[id].loaded
|
||||
end
|
||||
|
||||
|
||||
--- Check if a screen is a popup
|
||||
-- @param id Screen id
|
||||
-- @return true if the screen is a popup
|
||||
|
Reference in New Issue
Block a user