Libraries.Interface.Layouts.LayoutProperties Documentation

Inherits from: Libraries.Language.Object

Variables Table

VariablesDescription
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 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 FIT_FONTThe FIT_FONT layout style is used to ensure a Control's height can fit the Font used in this LayoutProperties, plus margin 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 TOPThe TOP border style will place a border only on the top side of this Control.
integer ALLThe ALL border style will place borders on all four sides of this Control.
integer RIGHTThe RIGHT border style will place a border only on the right side of this Control.
integer NONEThe NONE border style will disable borders on the Control this is applied to.
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 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 BOTTOMThe BOTTOM border style will place a border only on the bottom side of this Control.
integer LEFTThe LEFT border style will place a border only on the left side of this Control.

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.

Parameters

Return

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

Example

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

GetBackgroundColor()

GetBorderStyle()

Return

integer

GetBorderThickness()

Return

number

GetBottomLeftPixelRounding()

Return

number

GetBottomLeftRounding()

Return

number

GetBottomMargin()

Return

number

GetBottomPadding()

Return

number

GetBottomRightPixelRounding()

Return

number

GetBottomRightRounding()

Return

number

GetColorProperty(text property)

Parameters

  • text property

Return

Libraries.Game.Graphics.ColorGroup

GetContainerGridHeight()

Return

integer

GetContainerGridWidth()

Return

integer

GetFocusBorderColor()

GetFocusFontColor()

GetFontOutlineColor()

GetFontOutlineThickness()

Return

number

GetFontSize()

Return

integer

GetForegroundColor()

GetForegroundSelectionColor()

GetGridHeight()

Return

integer

GetGridWidth()

Return

integer

GetGridX()

Return

integer

GetGridY()

Return

integer

GetHashCode()

This action gets the hash code for an object.

Return

integer: The integer hash code of the object.

Example

Object o
integer hash = o:GetHashCode()

GetHorizontalLayoutMode()

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.

Return

integer:

GetInterfaceOptionsKey()

Return

text

GetInterfaceScale()

Return

number

GetLabelText()

Return

text

GetLayoutRows()

This action returns how many rows this element should occupy, if the layout supports it. This effectively makes the control taller. This is most commonly used in conjunction with FormRowLayout (or StackedRowPage which uses that layout).

Return

number:

GetLeftMargin()

Return

number

GetLeftPadding()

Return

number

GetMaximumContainerHeight()

Return

number

GetMaximumContainerWidth()

Return

number

GetMaximumHeight()

Return

number

GetMaximumWidth()

Return

number

GetMinimumHeight()

Return

number

GetMinimumWidth()

Return

number

GetMouseDownColor()

GetMouseDownFontColor()

GetMouseDownGlowColor()

GetMouseOverColor()

GetMouseOverFontColor()

GetMouseOverGlowColor()

GetNumberProperty(text property)

Parameters

  • text property

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

GetRightMargin()

Return

number

GetRightPadding()

Return

number

GetSelectionBorderColor()

GetSelectionColor()

GetSelectionFontColor()

GetShadowEdgeFade()

Return

number

GetShadowHeight()

Return

number

GetShadowWidth()

Return

number

GetShadowX()

Return

number

GetShadowY()

Return

number

GetTopLeftPixelRounding()

Return

number

GetTopLeftRounding()

Return

number

GetTopMargin()

Return

number

GetTopPadding()

Return

number

GetTopRightPixelRounding()

Return

number

GetTopRightRounding()

Return

number

GetUnfocusedSelectionBorderColor()

GetUnfocusedSelectionColor()

GetUnfocusedSelectionFontColor()

GetVerticalLayoutMode()

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.

Return

integer:

HasBorderThickness()

Return

boolean

HasBottomBorder()

Return

boolean

HasBottomLeftPixelRounding()

Return

boolean

HasBottomLeftRounding()

Return

boolean

HasBottomRightPixelRounding()

Return

boolean

HasBottomRightRounding()

Return

boolean

HasColorProperty(text property)

This action sets how many rows this element should occupy, if the layout supports it. This effectively makes the control taller. This is most commonly used in conjunction with FormRowLayout (or StackedRowPage which uses that layout).

Parameters

  • text property

Return

boolean:

HasColorPropertyOverride(text property)

This action sets how much rounding to apply to the four corners of a rectangular control. This action takes the amount of rounding to apply as a number of pixels.

Parameters

  • text property

Return

boolean:

HasFontOutlineThickness()

Return

boolean

HasLeftBorder()

Return

boolean

HasNumberProperty(text property)

This action returns how many rows this element should occupy, if the layout supports it. This effectively makes the control taller. This is most commonly used in conjunction with FormRowLayout (or StackedRowPage which uses that layout).

Parameters

  • text property

Return

boolean:

HasNumberPropertyOverride(text property)

This action sets how much rounding to apply to the four corners of a rectangular control. The expected values are between 0 and 1, where 0 indicates no rounding, and 1 indicates full rounding. (If all four corners are set to have full rounding, the result will appear to be a circle.)

Parameters

  • text property

Return

boolean:

HasRightBorder()

Return

boolean

HasShadowEdgeFade()

Return

boolean

HasShadowHeight()

Return

boolean

HasShadowWidth()

Return

boolean

HasShadowX()

Return

boolean

HasShadowY()

Return

boolean

HasTopBorder()

Return

boolean

HasTopLeftPixelRounding()

Return

boolean

HasTopLeftRounding()

Return

boolean

HasTopRightPixelRounding()

Return

boolean

HasTopRightRounding()

Return

boolean

IsPositioningInX()

Return

boolean

IsPositioningInY()

Return

boolean

IsSettingHeight()

Return

boolean

IsSettingWidth()

Return

boolean

NeedsRendering()

Return

boolean

SetAccentColor(Libraries.Game.Graphics.ColorGroup value)

SetBackgroundColor(Libraries.Game.Graphics.ColorGroup value)

SetBorderColor(Libraries.Game.Graphics.ColorGroup value)

SetBorderStyle(integer style)

Parameters

  • integer style

SetBorderThickness(number value)

Parameters

  • number value

SetBottomLeftPixelRounding(number value)

Parameters

  • number value

SetBottomLeftRounding(number value)

Parameters

  • number value

SetBottomMargin(number margin)

Parameters

  • number margin

SetBottomPadding(number padding)

Parameters

  • number padding

SetBottomRightPixelRounding(number value)

Parameters

  • number value

SetBottomRightRounding(number value)

Parameters

  • number value

SetColorProperty(text property, Libraries.Game.Graphics.ColorGroup value)

Parameters

SetContainerGridHeight(integer containerGridHeight)

Parameters

  • integer containerGridHeight

SetContainerGridWidth(integer containerGridWidth)

Parameters

  • integer containerGridWidth

SetCornerPixelRounding(number bottomLeft, number bottomRight, number topLeft, number topRight)

This action sets how much rounding to apply to the four corners of a rectangular control. This action takes the amount of rounding to apply as a number of pixels.

Parameters

  • number bottomLeft: The rounding value to be applied to the bottom left corner, in pixels.
  • number bottomRight: The rounding value to be applied to the bottom right corner, in pixels.
  • number topLeft: The rounding value to be applied to the top left corner, in pixels.
  • number topRight: The rounding value to be applied to the top right corner, in pixels.

SetCornerRounding(number bottomLeft, number bottomRight, number topLeft, number topRight)

This action sets how much rounding to apply to the four corners of a rectangular control. The expected values are between 0 and 1, where 0 indicates no rounding, and 1 indicates full rounding. (If all four corners are set to have full rounding, the result will appear to be a circle.)

Parameters

  • number bottomLeft: The rounding value to be applied to the bottom left corner (between 0 and 1).
  • number bottomRight: The rounding value to be applied to the bottom right corner (between 0 and 1).
  • number topLeft: The rounding value to be applied to the top left corner (between 0 and 1).
  • number topRight: The rounding value to be applied to the top right corner (between 0 and 1).

SetFocusBorderColor(Libraries.Game.Graphics.ColorGroup value)

SetFocusColor(Libraries.Game.Graphics.ColorGroup value)

SetFocusFontColor(Libraries.Game.Graphics.ColorGroup value)

SetFont(Libraries.Game.Graphics.Font font)

SetFontColor(Libraries.Game.Graphics.ColorGroup value)

SetFontOutlineColor(Libraries.Game.Graphics.ColorGroup value)

SetFontOutlineThickness(number value)

Parameters

  • number value

SetFontSize(integer size)

Parameters

  • integer size

SetForegroundColor(Libraries.Game.Graphics.ColorGroup value)

SetForegroundSelectionColor(Libraries.Game.Graphics.ColorGroup value)

SetGlowColor(Libraries.Game.Graphics.ColorGroup value)

SetGridHeight(integer gridHeight)

Parameters

  • integer gridHeight

SetGridPosition(integer gridX, integer gridY)

Parameters

  • integer gridX
  • integer gridY

SetGridSize(integer gridWidth, integer gridHeight)

Parameters

  • integer gridWidth
  • integer gridHeight

SetGridWidth(integer gridWidth)

Parameters

  • integer gridWidth

SetGridX(integer gridX)

Parameters

  • integer gridX

SetGridY(integer gridY)

Parameters

  • integer gridY

SetHeightSetting(boolean enable)

Parameters

  • boolean enable

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

  • integer mode: A layout mode constant, one of STANDARD, FILL, or FILL_CONTENTS.

SetIcon(Libraries.Game.Graphics.Drawable drawable)

SetIcon(Libraries.Game.Graphics.TextureRegion texture)

SetIcon(Libraries.Interface.Controls.Icon icon)

SetIconColor(Libraries.Game.Graphics.ColorGroup value)

SetInterfaceOptionsKey(text key)

Parameters

  • text key

SetInterfaceScale(number scale)

Parameters

  • number scale

SetLabelText(text value)

Parameters

  • text value

SetLayoutRows(number layoutRows)

This action sets how many rows this element should occupy, if the layout supports it. This effectively makes the control taller. This is most commonly used in conjunction with FormRowLayout (or StackedRowPage which uses that layout).

Parameters

  • number layoutRows

SetLeftMargin(number margin)

Parameters

  • number margin

SetLeftPadding(number padding)

Parameters

  • number padding

SetMaximumContainerHeight(number maximum)

Parameters

  • number maximum

SetMaximumContainerWidth(number maximum)

Parameters

  • number maximum

SetMaximumHeight(number height)

Parameters

  • number height

SetMaximumWidth(number width)

Parameters

  • number width

SetMinimumHeight(number height)

Parameters

  • number height

SetMinimumWidth(number width)

Parameters

  • number width

SetMouseDownColor(Libraries.Game.Graphics.ColorGroup value)

SetMouseDownFontColor(Libraries.Game.Graphics.ColorGroup value)

SetMouseDownGlowColor(Libraries.Game.Graphics.ColorGroup value)

SetMouseOverColor(Libraries.Game.Graphics.ColorGroup value)

SetMouseOverFontColor(Libraries.Game.Graphics.ColorGroup value)

SetMouseOverGlowColor(Libraries.Game.Graphics.ColorGroup value)

SetNumberProperty(text property, number value)

Parameters

  • text property
  • number value

SetPercentageHeight(number height)

Parameters

  • number height

SetPercentageOriginX(number x)

Parameters

  • number x

SetPercentageOriginY(number y)

Parameters

  • number y

SetPercentageWidth(number width)

Parameters

  • number width

SetPercentageX(number x)

Parameters

  • number x

SetPercentageY(number y)

Parameters

  • number y

SetPixelHeight(number height)

Parameters

  • number height

SetPixelWidth(number width)

Parameters

  • number width

SetPixelX(number x)

Parameters

  • number x

SetPixelY(number y)

Parameters

  • number y

SetPositioningInX(boolean enable)

Parameters

  • boolean enable

SetPositioningInY(boolean enable)

Parameters

  • boolean enable

SetRenderingFlag(boolean shouldRender)

Parameters

  • boolean shouldRender

SetRightMargin(number margin)

Parameters

  • number margin

SetRightPadding(number padding)

Parameters

  • number padding

SetSelectionBorderColor(Libraries.Game.Graphics.ColorGroup value)

SetSelectionColor(Libraries.Game.Graphics.ColorGroup value)

SetSelectionFontColor(Libraries.Game.Graphics.ColorGroup value)

SetShadowColor(Libraries.Game.Graphics.ColorGroup value)

SetShadowEdgeFade(number value)

Parameters

  • number value

SetShadowHeight(number value)

Parameters

  • number value

SetShadowWidth(number value)

Parameters

  • number value

SetShadowX(number value)

Parameters

  • number value

SetShadowY(number value)

Parameters

  • number value

SetTopLeftPixelRounding(number value)

Parameters

  • number value

SetTopLeftRounding(number value)

Parameters

  • number value

SetTopMargin(number margin)

Parameters

  • number margin

SetTopPadding(number padding)

Parameters

  • number padding

SetTopRightPixelRounding(number value)

Parameters

  • number value

SetTopRightRounding(number value)

Parameters

  • number value

SetUnfocusedSelectionBorderColor(Libraries.Game.Graphics.ColorGroup value)

SetUnfocusedSelectionColor(Libraries.Game.Graphics.ColorGroup value)

SetUnfocusedSelectionFontColor(Libraries.Game.Graphics.ColorGroup value)

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

  • integer mode: A layout mode constant, one of STANDARD, FILL, FILL_CONTENTS, or FIT_FONT.

SetView2D(Libraries.Interface.Views.View2D view2D)

SetWidthSetting(boolean enable)

Parameters

  • boolean enable