frame
Boxes with drawing character frames around them. Also a button!
frame(x, y, w, h, fcol, bcol) | Draw a frame with the specified colours |
---|---|
button(x, y, w, h, cols, text, func [, state=false]) | Draws a clickable button with text inside. |
- frame(x, y, w, h, fcol, bcol)Source
Draw a frame with the specified colours
Parameters
- button(x, y, w, h, cols, text, func [, state=false])Source
Draws a clickable button with text inside. The button toggles when you click it. This requires the
button
extension to be installed.Parameters
- x number X coordinate of the button.
- y number Y coordinate of the button.
- w number Width of the button.
- h number Height of the button.
- cols { borderOn = number, borderOff = number, backOn = number, backOff = number, text = number } Colours of the button when it is on or off.
- text string The text that is centered (and wrapped) in the button.
- func function The function that is ran when the button is toggled, with a state argument.
- state? boolean =
false
The starting state of the button, defaults to off.
Returns
- string The ID of the button.