Libraries.Interface.Layouts.LayoutProperties Documentation

Inherits from: Libraries.Language.Object

Summary

Variable Summary Table

VariablesDescription
integer FIT_FONTThe FIT_FONT layout style is used to ensure a Control's height can fit the Font used in this LayoutProperties, plus padding from the children elements. FIT_FONT is only effective for the vertical layout style, and requires that a Font is present in this LayoutProperties.
integer FIT_CONTENTSThe FIT_CONTENTS layout style will calculate this Control's dimensions as the combined total dimensions of its children elements. Because children elements often need to have some concrete information about the parent's dimensions, it's recommended to only use this in one of the two directions (horizontally or vertically) for the Control. For example, FlowLayouts work well with elements with a predetermined STANDARD horizontal layout style and using FIT_CONTENTS for the vertical layout style.
integer FILLThe FILL layout style will attempt to fill the remaining width or height of the container with this Control. Note that this is only effective if the container's dimensions are already known independently of this element's size -- for example, a FILL layout can't be effectively used if the container's layout style is FIT_CONTENTS.
integer MAINTAIN_ASPECT_RATIOThe MAINTAIN_ASPECT_RATIO layout style is used to calculate one of the dimensions of the Control relative to the other dimension. For example, it can be used to ensure that the width of a Control is always 120% of the height. This style can only be used to calculate one of the two dimensions (width or height) at a time. For example, if the horizontal layout style is MAINTAIN_ASPECT_RATIO, the vertical layout style must be different, such as using the STANDARD style.
integer ALLThe ALL border style will place borders on all four sides of this Control.
integer BOTTOMThe BOTTOM border style will place a border only on the bottom side of this Control.
integer STANDARDThe STANDARD layout style calculates the dimensions and positions of the Control using percentages of the Control's dimensions combined with static pixel values. Because this is dependent on the container's size to calculate the percentages, this is incompatible with container layouts that use the children to determine its own size, such as FIT_CONTENTS.
integer TOPThe TOP border style will place a border only on the top side of this Control.
integer LEFTThe LEFT border style will place a border only on the left side of this Control.
integer NONEThe NONE border style will disable borders on the Control this is applied to.
integer RIGHTThe RIGHT border style will place a border only on the right side of this Control.

Actions Summary Table

ActionsDescription
Compare(Libraries.Language.Object object)
Equals(Libraries.Language.Object object)This action determines if two objects are equal based on their hash code values.
GetBackgroundColor()
GetBorderColor()
GetBorderStyle()
GetBorderThickness()
GetBottomPadding()
GetFont()
GetFontColor()
GetFontSize()
GetHashCode()This action gets the hash code for an object.
GetHorizontalLayoutMode()
GetIcon()
GetIconColor()
GetInterfaceScale()
GetLabelText()
GetLeftPadding()
GetMaximumContainerHeight()
GetMaximumContainerWidth()
GetMaximumHeight()
GetMaximumWidth()
GetMinimumHeight()
GetMinimumWidth()
GetPercentageHeight()
GetPercentageOriginX()
GetPercentageOriginY()
GetPercentageWidth()
GetPercentageX()
GetPercentageY()
GetPixelHeight()
GetPixelWidth()
GetPixelX()
GetPixelY()
GetRightPadding()
GetSelectionBorderColor()
GetSelectionColor()
GetSelectionFontColor()
GetTopPadding()
GetUnfocusedSelectionColor()
GetVerticalLayoutMode()
GetView2D()
HasBottomBorder()
HasLeftBorder()
HasRightBorder()
HasTopBorder()
IsPositioningInX()
IsPositioningInY()
IsSettingHeight()
IsSettingWidth()
NeedsRendering()
SetBackgroundColor(Libraries.Game.Graphics.ColorGroup color)
SetBorderColor(Libraries.Game.Graphics.ColorGroup color)
SetBorderStyle(integer style)
SetBorderThickness(number thickness)
SetBottomPadding(number padding)
SetFont(Libraries.Game.Graphics.Font font)
SetFontColor(Libraries.Game.Graphics.Color color)
SetFontSize(integer size)
SetHeightSetting(boolean enable)
SetHorizontalLayoutMode(integer mode)The SetHorizontalLayoutMode is used to determine how the width of a Control is calculated.
SetIcon(Libraries.Game.Graphics.Drawable drawable)
SetIcon(Libraries.Game.Graphics.TextureRegion texture)
SetIcon(Libraries.Interface.Controls.Icon icon)
SetIconColor(Libraries.Game.Graphics.ColorGroup color)
SetInterfaceScale(number scale)
SetLabelText(text value)
SetLeftPadding(number padding)
SetMaximumContainerHeight(number maximum)
SetMaximumContainerWidth(number maximum)
SetMaximumHeight(number height)
SetMaximumWidth(number width)
SetMinimumHeight(number height)
SetMinimumWidth(number width)
SetPercentageHeight(number height)
SetPercentageOriginX(number x)
SetPercentageOriginY(number y)
SetPercentageWidth(number width)
SetPercentageX(number x)
SetPercentageY(number y)
SetPixelHeight(number height)
SetPixelWidth(number width)
SetPixelX(number x)
SetPixelY(number y)
SetPositioningInX(boolean enable)
SetPositioningInY(boolean enable)
SetRenderingFlag(boolean shouldRender)
SetRightPadding(number padding)
SetSelectionBorderColor(Libraries.Game.Graphics.ColorGroup color)
SetSelectionColor(Libraries.Game.Graphics.ColorGroup color)
SetSelectionFontColor(Libraries.Game.Graphics.Color color)
SetTopPadding(number padding)
SetUnfocusedSelectionColor(Libraries.Game.Graphics.ColorGroup color)
SetVerticalLayoutMode(integer mode)The GetVerticalLayoutMode is used to determine how the height of a Control is calculated.
SetView2D(Libraries.Interface.Views.View2D view2D)
SetWidthSetting(boolean enable)

Actions Documentation

Compare(Libraries.Language.Object object)

Parameters

Return

integer

Equals(Libraries.Language.Object object)

This action determines if two objects are equal based on their hash code values.

Example Code

use Libraries.Language.Object
        use Libraries.Language.Types.Text
        Object o
        Text t
        boolean result = o:Equals(t)

Parameters

Return

boolean: True if the hash codes are equal and false if they are not equal.

GetBackgroundColor()

Return

Libraries.Game.Graphics.ColorGroup

GetBorderColor()

Return

Libraries.Game.Graphics.ColorGroup

GetBorderStyle()

Return

integer

GetBorderThickness()

Return

number

GetBottomPadding()

Return

number

GetFont()

Return

Libraries.Game.Graphics.Font

GetFontColor()

Return

Libraries.Game.Graphics.Color

GetFontSize()

Return

integer

GetHashCode()

This action gets the hash code for an object.

Example Code

Object o
        integer hash = o:GetHashCode()

Return

integer: The integer hash code of the object.

GetHorizontalLayoutMode()

Return

integer

GetIcon()

Return

Libraries.Game.Graphics.TextureRegion

GetIconColor()

Return

Libraries.Game.Graphics.ColorGroup

GetInterfaceScale()

Return

number

GetLabelText()

Return

text

GetLeftPadding()

Return

number

GetMaximumContainerHeight()

Return

number

GetMaximumContainerWidth()

Return

number

GetMaximumHeight()

Return

number

GetMaximumWidth()

Return

number

GetMinimumHeight()

Return

number

GetMinimumWidth()

Return

number

GetPercentageHeight()

Return

number

GetPercentageOriginX()

Return

number

GetPercentageOriginY()

Return

number

GetPercentageWidth()

Return

number

GetPercentageX()

Return

number

GetPercentageY()

Return

number

GetPixelHeight()

Return

number

GetPixelWidth()

Return

number

GetPixelX()

Return

number

GetPixelY()

Return

number

GetRightPadding()

Return

number

GetSelectionBorderColor()

Return

Libraries.Game.Graphics.ColorGroup

GetSelectionColor()

Return

Libraries.Game.Graphics.ColorGroup

GetSelectionFontColor()

Return

Libraries.Game.Graphics.Color

GetTopPadding()

Return

number

GetUnfocusedSelectionColor()

Return

Libraries.Game.Graphics.ColorGroup

GetVerticalLayoutMode()

Return

integer

GetView2D()

Return

Libraries.Interface.Views.View2D

HasBottomBorder()

Return

boolean

HasLeftBorder()

Return

boolean

HasRightBorder()

Return

boolean

HasTopBorder()

Return

boolean

IsPositioningInX()

Return

boolean

IsPositioningInY()

Return

boolean

IsSettingHeight()

Return

boolean

IsSettingWidth()

Return

boolean

NeedsRendering()

Return

boolean

SetBackgroundColor(Libraries.Game.Graphics.ColorGroup color)

Parameters

SetBorderColor(Libraries.Game.Graphics.ColorGroup color)

Parameters

SetBorderStyle(integer style)

Parameters

SetBorderThickness(number thickness)

Parameters

SetBottomPadding(number padding)

Parameters

SetFont(Libraries.Game.Graphics.Font font)

Parameters

SetFontColor(Libraries.Game.Graphics.Color color)

Parameters

SetFontSize(integer size)

Parameters

SetHeightSetting(boolean enable)

Parameters

SetHorizontalLayoutMode(integer mode)

The SetHorizontalLayoutMode is used to determine how the width of a Control is calculated. It should be one of the following constants: STANDARD, which will calculate the width as a set number of pixels plus a percentage of the container's width. FILL, which will make the width fill the remaining width of the container. FIT_CONTENTS, which will calculate the width to fit the children contents.

Parameters

SetIcon(Libraries.Game.Graphics.Drawable drawable)

Parameters

SetIcon(Libraries.Game.Graphics.TextureRegion texture)

Parameters

SetIcon(Libraries.Interface.Controls.Icon icon)

Parameters

SetIconColor(Libraries.Game.Graphics.ColorGroup color)

Parameters

SetInterfaceScale(number scale)

Parameters

SetLabelText(text value)

Parameters

SetLeftPadding(number padding)

Parameters

SetMaximumContainerHeight(number maximum)

Parameters

SetMaximumContainerWidth(number maximum)

Parameters

SetMaximumHeight(number height)

Parameters

SetMaximumWidth(number width)

Parameters

SetMinimumHeight(number height)

Parameters

SetMinimumWidth(number width)

Parameters

SetPercentageHeight(number height)

Parameters

SetPercentageOriginX(number x)

Parameters

SetPercentageOriginY(number y)

Parameters

SetPercentageWidth(number width)

Parameters

SetPercentageX(number x)

Parameters

SetPercentageY(number y)

Parameters

SetPixelHeight(number height)

Parameters

SetPixelWidth(number width)

Parameters

SetPixelX(number x)

Parameters

SetPixelY(number y)

Parameters

SetPositioningInX(boolean enable)

Parameters

SetPositioningInY(boolean enable)

Parameters

SetRenderingFlag(boolean shouldRender)

Parameters

SetRightPadding(number padding)

Parameters

SetSelectionBorderColor(Libraries.Game.Graphics.ColorGroup color)

Parameters

SetSelectionColor(Libraries.Game.Graphics.ColorGroup color)

Parameters

SetSelectionFontColor(Libraries.Game.Graphics.Color color)

Parameters

SetTopPadding(number padding)

Parameters

SetUnfocusedSelectionColor(Libraries.Game.Graphics.ColorGroup color)

Parameters

SetVerticalLayoutMode(integer mode)

The GetVerticalLayoutMode is used to determine how the height of a Control is calculated. It should be one of the following constants: STANDARD, which will calculate the height as a set number of pixels plus a percentage of the container's height. FILL, which will make the height fill the remaining height of the container. FIT_CONTENTS, which will calculate the height to fit the children contents. FIT_FONT, which will fit the height of the Control to the line height of the Font set in this LayoutProperties.

Parameters

SetView2D(Libraries.Interface.Views.View2D view2D)

Parameters

SetWidthSetting(boolean enable)

Parameters