MenuButton
A button added to the ESC menu by a script.
since 0.1.30-alpha
ESC menu buttons are created with addMenuButton. In the examples button is any MenuButton.
Methods
setText
since 0.1.30-alpha
button:setText(text)Changes the text of the button (an open ESC menu shows it at once).
| Parameter | Type | Description |
|---|---|---|
text | string | New text. |
Returns: boolean - false when the button was removed.
setEnabled
since 0.1.30-alpha
button:setEnabled(enabled)Enables or greys out the button.
| Parameter | Type | Description |
|---|---|---|
enabled | boolean | false = greyed out, cannot be clicked. |
Returns: boolean - false when the button was removed.
setVisible
since 0.1.30-alpha
button:setVisible(visible)Shows or hides the button.
| Parameter | Type | Description |
|---|---|---|
visible | boolean |
Returns: boolean - false when the button was removed.
remove
since 0.1.30-alpha
button:remove()Removes the button from the ESC menu.
Returns: boolean - false when it was already removed.
isValid
since 0.1.30-alpha
button:isValid()Tells whether the button still exists.
Returns: boolean
