The window.visible property is also affected by the Window:show() and Window:hide() methods.
Window.visible
Get or set the window visibility on screen, a true value means that the window is shown, a false value means that the window is hidden.
Example
--! luart-extensions
import ui
-- create a simple window
local win = ui.Window("Window.visible sample", 320, 200)
local button = ui.Button(win, "Click to hide window")
local can_exit = false
-- hides the window and shows it again after 1 sec
function button:onClick()
win.visible = false
sleep(1000)
win.visible = true
end
await win:showasync()