UITile

UITile - A UI object that displays a tile image

Constructor

new UITile(posopt, sizeopt, tileInfoopt, coloropt, angleopt, mirroropt)

Create a UITile object

Parameters:
NameTypeAttributesDefaultDescription
posVector2<optional>
sizeVector2<optional>
tileInfoTileInfo<optional>
colorColor<optional>
WHITE
anglenumber<optional>
0
mirrorboolean<optional>
false

Extends

Members

angle

Properties
TypeDescription
number

Angle to rotate in radians

children

Properties
TypeDescription
Array.<UIObject>

color

Properties
TypeDescription
Color

font

Properties
TypeDescription
string
Overrides

hoverColor

Properties
TypeDescription
Color

lineColor

Properties
TypeDescription
Color

lineWidth

Properties
TypeDescription
number

localPos

Properties
TypeDescription
Vector2

Local position of the object

mirror

Properties
TypeDescription
boolean

Should it be mirrored?

parent

Properties
TypeDescription
UIObject

pos

Properties
TypeDescription
Vector2

Screen space position of the object

Overrides

size

Properties
TypeDescription
Vector2

Screen space size of the object

Overrides

textColor

Properties
TypeDescription
Color

tileInfo

Properties
TypeDescription
TileInfo

Tile image to use

visible

Properties
TypeDescription
boolean

Methods

addChild(child)

Add a child UIObject to this object

Parameters:
NameTypeDescription
childUIObject

onChange()

Called when the state of this object changes

onEnter()

Called when the mouse enters the object

onLeave()

Called when the mouse leaves the object

onPress()

Called when the mouse is pressed while over the object

onRelease()

Called when the mouse is released while over the object

removeChild(child)

Remove a child UIObject from this object

Parameters:
NameTypeDescription
childUIObject

render()

Render the object, called automatically by plugin once each frame

update()

Update the object, called automatically by plugin once each frame