Avorion Script API Documentation

UIGridSplitter

This class gets a rect and creates multiple new rects by splitting the rect into a grid. Considers properties like margin and padding between the new rects.

This object is only available on the client.

function UIGridSplitter(Rect rect, int padding, int margin, int horizontalTiles, int verticalTiles)

Parameters

rect The rect to split
padding
margin
horizontalTiles
verticalTiles

Returns

A new instance of UIGridSplitter

property int horizontalTiles
property Rect inner[read-only]
property int margin[write-only]
property int marginBottom
property int marginLeft
property int marginRight
property int marginTop
property int padding[write-only]
property int paddingBottom
property int paddingInside
property int paddingLeft
property int paddingRight
property int paddingTop
property Rect rect
property int verticalTiles

function Rect getBottomLeftRect(Rect rect)

Aligns the given rect to a specific side

Parameters

rect The given rect

Returns

A copy of the given rect, aligned to the specific side

function Rect getBottomRect(Rect rect)

Aligns the given rect to a specific side

Parameters

rect The given rect

Returns

A copy of the given rect, aligned to the specific side

function Rect getBottomRightRect(Rect rect)

Aligns the given rect to a specific side

Parameters

rect The given rect

Returns

A copy of the given rect, aligned to the specific side

function Rect getCenterRect(Rect rect)

Aligns the given rect to a specific side

Parameters

rect The given rect

Returns

A copy of the given rect, aligned to the specific side

function Rect getLeftRect(Rect rect)

Aligns the given rect to a specific side

Parameters

rect The given rect

Returns

A copy of the given rect, aligned to the specific side

function Rect getRightRect(Rect rect)

Aligns the given rect to a specific side

Parameters

rect The given rect

Returns

A copy of the given rect, aligned to the specific side

function Rect getTopLeftRect(Rect rect)

Aligns the given rect to a specific side

Parameters

rect The given rect

Returns

A copy of the given rect, aligned to the specific side

function Rect getTopRect(Rect rect)

Aligns the given rect to a specific side

Parameters

rect The given rect

Returns

A copy of the given rect, aligned to the specific side

function Rect getTopRightRect(Rect rect)

Aligns the given rect to a specific side

Parameters

rect The given rect

Returns

A copy of the given rect, aligned to the specific side

function Rect partition(int x, var y)

Retrieves one of the new created rects. If y is nil, returns the xth rect in a left-to-right order, walking through the lines

Parameters

x The x index of the retrieved rect, starting at 0
y The y index of the retrieved rect, starting at 0

Returns

A new rect, size was determined by splitting

function UIElement placeElementBottom(UIElement element)

Aligns the given UI element to a specific side

Parameters

element The given UI element

Returns

A reference to the given UI element

function UIElement placeElementBottomLeft(UIElement element)

Aligns the given UI element to a specific side

Parameters

element The given UI element

Returns

A reference to the given UI element

function UIElement placeElementBottomRight(UIElement element)

Aligns the given UI element to a specific side

Parameters

element The given UI element

Returns

A reference to the given UI element

function UIElement placeElementCenter(UIElement element)

Aligns the given UI element to a specific side

Parameters

element The given UI element

Returns

A reference to the given UI element

function UIElement placeElementLeft(UIElement element)

Aligns the given UI element to a specific side

Parameters

element The given UI element

Returns

A reference to the given UI element

function UIElement placeElementRight(UIElement element)

Aligns the given UI element to a specific side

Parameters

element The given UI element

Returns

A reference to the given UI element

function UIElement placeElementTop(UIElement element)

Aligns the given UI element to a specific side

Parameters

element The given UI element

Returns

A reference to the given UI element

function UIElement placeElementTopLeft(UIElement element)

Aligns the given UI element to a specific side

Parameters

element The given UI element

Returns

A reference to the given UI element

function UIElement placeElementTopRight(UIElement element)

Aligns the given UI element to a specific side

Parameters

element The given UI element

Returns

A reference to the given UI element

function var setMargin(int left, int right, int top, int bottom)

Parameters

left margin on the left side
right margin on the right side
top margin on the top side
bottom margin on the bottom side

Returns

nothing

function var setPadding(int left, int right, int top, int bottom)

Parameters

left padding on the left side
right padding on the right side
top padding on the top side
bottom padding on the bottom side

Returns

nothing

Overview
Home Functions Search
Search:

This is the official documentation for the scripting API of Avorion. This documentation is automatically generated and not necessarily complete. Depending on the context in which functions exist, some documentation such as descriptions, return values or variable names or types may be missing.

Work in Progress. Documentation of Avorion Version: 2.5.7 c8e4beec84f7