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

  1. x number Top left X coordinate.
  2. y number Top left Y coordinate.
  3. w number Width.
  4. h number Height.
  5. fcol string | number Colour to draw as, accepts blit or colours. colour.
  6. bcol string | number Border colour to draw, accepts blit or colours. colour.
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

  1. x number X coordinate of the button.
  2. y number Y coordinate of the button.
  3. w number Width of the button.
  4. h number Height of the button.
  5. cols { borderOn = number, borderOff = number, backOn = number, backOff = number, text = number } Colours of the button when it is on or off.
  6. text string The text that is centered (and wrapped) in the button.
  7. func function The function that is ran when the button is toggled, with a state argument.
  8. state? boolean = false The starting state of the button, defaults to off.

Returns

  1. string The ID of the button.