Button.visible read/write property


Get or set the button visibility on screen, a true value means that the Button is shown, a false value means that the Button is hidden.

Example

local ui = require "ui" -- create a simple button local win = ui.Window("Button.visible sample", 320, 200) local button = ui.Button(win, "Try to click !", 120, 70) -- hides the button when mouse cursor hovers it function button:onHover() self:hide() end win:show() -- update the user interface until the user closes the button repeat ui.update() until not win.visible