Class: UISprite

UISprite(sprite, position, size, uvPos) → {UISprite}

new UISprite(sprite, position, size, uvPos) → {UISprite}

A sprite for UI
Parameters:
Name Type Description
sprite texture The sprite sheet to map the UISprite to
position Array.<Array> The base location for the UISprite
size Array.<Array> The size of the UISprite
uvPos Array.<Array> The UV location for the texture
Source:
Returns:
Type
UISprite

Methods

setElementPixelPositions(left, right, bottom, top)

Sets the PixelPosition that the UISprite grabs from the Sprite Sheet
Parameters:
Name Type Description
left float The left position
right float The right Position
bottom float The bottom position
top float The top position
Source:

setElementUVCoordinate(left, right, bottom, top)

Sets the UVCoordinates that the UISprite grabs from the Sprite Sheet
Parameters:
Name Type Description
left float The left position
right float The right Position
bottom float The bottom position
top float The top position
Source: