Skip to content
Benedict Allen edited this page Nov 17, 2015 · 4 revisions

Image Class

The Image is a clickable object with bitmap image content.

Extends Sheet

Style options

  • shader - The shader to apply.
  • shader.pressed - The shader to apply when pressed.

Constructor

Image( number x, number y, string imagePath )
Image( number x, number y, string imageContent )
Image( number x, number y, table image )

Note: table image should be formatted like

image[y][x] = { backgroundColour, textColour, character }

Callbacks

Note, this element uses the onPreDraw() and onMouseEvent() callbacks of Sheet.

onClick

Image:onClick( number button, number x, number y )

Called when the button is clicked.

onHold

Image:onHold( number button, number x, number y )

Called when the button is held.

Properties

text

Image.text - string

The text shown by the button.

Clone this wiki locally