Skip to main content

Basic

Basic Widget API

Properties

Button

Widget
Basic.Button: Iris.Button

A clickable button the size of the text with padding. Can listen to the clicked() event to determine if it was pressed.

hasChildren = false
hasState = false
Arguments = {
    Text: string,
    Size: UDim2? = 0,
}
Events = {
    clicked: () -> boolean,
    rightClicked: () -> boolean,
    doubleClicked: () -> boolean,
    ctrlClicked: () -> boolean, -- when the control key is down and clicked.
    hovered: () -> boolean
}

SmallButton

Widget
Basic.SmallButton: Iris.SmallButton

A smaller clickable button, the same as a Iris.Button but without padding. Can listen to the clicked() event to determine if it was pressed.

hasChildren = false
hasState = false
Arguments = {
    Text: string,
    Size: UDim2? = 0,
}
Events = {
    clicked: () -> boolean,
    rightClicked: () -> boolean,
    doubleClicked: () -> boolean,
    ctrlClicked: () -> boolean, -- when the control key is down and clicked.
    hovered: () -> boolean
}

Checkbox

WidgetHasState
Basic.Checkbox: Iris.Checkbox

A checkable box with a visual tick to represent a boolean true or false state.

hasChildren = false
hasState = true
Arguments = {
    Text: string
}
Events = {
    checked: () -> boolean, -- once when checked.
    unchecked: () -> boolean, -- once when unchecked.
    hovered: () -> boolean
}
State = {
    isChecked = State<boolean>? -- whether the box is checked.
}

RadioButton

WidgetHasState
Basic.RadioButton: Iris.RadioButton

A circular selectable button, changing the state to its index argument. Used in conjunction with multiple other RadioButtons sharing the same state to represent one value from multiple options.

hasChildren = false
hasState = true
Arguments = {
    Text: string,
    Index: any -- the state object is set to when clicked.
}
Events = {
    selected: () -> boolean,
    unselected: () -> boolean,
    active: () -> boolean, -- if the state index equals the RadioButton's index.
    hovered: () -> boolean
}
State = {
    index = State<any>? -- the state set by the index of a RadioButton.
}
Show raw api
{
    "functions": [],
    "properties": [
        {
            "name": "Button",
            "desc": "A clickable button the size of the text with padding. Can listen to the `clicked()` event to determine if it was pressed.\n\n```lua\nhasChildren = false\nhasState = false\nArguments = {\n    Text: string,\n    Size: UDim2? = 0,\n}\nEvents = {\n    clicked: () -> boolean,\n    rightClicked: () -> boolean,\n    doubleClicked: () -> boolean,\n    ctrlClicked: () -> boolean, -- when the control key is down and clicked.\n    hovered: () -> boolean\n}\n```\n    ",
            "lua_type": "Iris.Button",
            "tags": [
                "Widget"
            ],
            "source": {
                "line": 478,
                "path": "lib/API.lua"
            }
        },
        {
            "name": "SmallButton",
            "desc": "A smaller clickable button, the same as a [Iris.Button](Basic#Button) but without padding. Can listen to the `clicked()` event to determine if it was pressed.\n\n```lua\nhasChildren = false\nhasState = false\nArguments = {\n    Text: string,\n    Size: UDim2? = 0,\n}\nEvents = {\n    clicked: () -> boolean,\n    rightClicked: () -> boolean,\n    doubleClicked: () -> boolean,\n    ctrlClicked: () -> boolean, -- when the control key is down and clicked.\n    hovered: () -> boolean\n}\n```\n    ",
            "lua_type": "Iris.SmallButton",
            "tags": [
                "Widget"
            ],
            "source": {
                "line": 503,
                "path": "lib/API.lua"
            }
        },
        {
            "name": "Checkbox",
            "desc": "A checkable box with a visual tick to represent a boolean true or false state.\n\n```lua\nhasChildren = false\nhasState = true\nArguments = {\n    Text: string\n}\nEvents = {\n    checked: () -> boolean, -- once when checked.\n    unchecked: () -> boolean, -- once when unchecked.\n    hovered: () -> boolean\n}\nState = {\n    isChecked = State<boolean>? -- whether the box is checked.\n}\n```\n    ",
            "lua_type": "Iris.Checkbox",
            "tags": [
                "Widget",
                "HasState"
            ],
            "source": {
                "line": 529,
                "path": "lib/API.lua"
            }
        },
        {
            "name": "RadioButton",
            "desc": "A circular selectable button, changing the state to its index argument. Used in conjunction with multiple other RadioButtons sharing the same state to represent one value from multiple options.\n\n```lua\nhasChildren = false\nhasState = true\nArguments = {\n    Text: string,\n    Index: any -- the state object is set to when clicked.\n}\nEvents = {\n    selected: () -> boolean,\n    unselected: () -> boolean,\n    active: () -> boolean, -- if the state index equals the RadioButton's index.\n    hovered: () -> boolean\n}\nState = {\n    index = State<any>? -- the state set by the index of a RadioButton.\n}\n```\n    ",
            "lua_type": "Iris.RadioButton",
            "tags": [
                "Widget",
                "HasState"
            ],
            "source": {
                "line": 557,
                "path": "lib/API.lua"
            }
        }
    ],
    "types": [],
    "name": "Basic",
    "desc": "Basic Widget API\n    ",
    "source": {
        "line": 454,
        "path": "lib/API.lua"
    }
}