OSRS Plugin API
    Preparing search index...

    Interface Renderable

    A UI element that has a visible appearance and effect on the positioning of other UI components.

    interface Renderable {
        visible: boolean;
    }

    Hierarchy (View Summary)

    Implemented by

    Index

    Properties

    Properties

    visible: boolean

    Boolean indicating whether this UI element should draw itself.

    true
    
    -- Create new container
    local newWindow = osrs.Ui.window({title = "Example Window"})

    -- Create a button that is renderable, and one that is not
    local button1 = osrs.Ui.textButton(
    {
    text = "Peek-a-Boo",
    visible = false,
    onClick = function()
    osrs.print("BOO!")
    end
    }
    )
    local button2 = osrs.Ui.textButton(
    {
    text = "Render",
    onClick = function()
    button1.visible = not button1.visible
    end
    }
    )

    -- Add buttons to the container
    newWindow:addChild(button1)
    newWindow:addChild(button2)

    -- Add container to the canvas
    osrs.Ui.canvas:addChild(newWindow)