Dev - Lua Libraries

Lua Command: s3sprite.alignInRect

Parameters

Return Values

void

- no return values

Signature

s3sprite.alignInRect(int spriteID, int rectX, int rectY, int rectW, int rectH, int alignX = 1, int alignY = 1)

Description

Aligns the sprite instance with the given spriteID in a rectangle on the screen which is specified in pixels with rectX, rectY, rectW and rectH.

The alignment mode is controlled with alignX and alignY.

The following values are possible for alignX:
• 0 = left
• 1 = horizontal center (default)
• 2 = right

For alignY:
• 0 = top
• 1 = vertical center (default)
• 2 = bottom