API Docs for:
Show:

Component_LayoutBehavior Class

Module: gs

The base class of all layout-components. A layout-component is used to layout assigned sub-objects in a specific way depending on the layout-type. For example: A grid-layout layouts its sub-objects like a grid using rows and columns. The game object needs a container-component.

A layout can also be configured as scrollable. In that case, layout's content can be larger than the layout-bounds and is automatically clipped. The content can be scrolled using mouse-wheel or touch-gesture.

Methods

dispose

()

Disposes the layout and all its sub-objects.

setup

()

Initializes the layout.

sizeToFit

()

Sizes the layout to fit its content.

sort_

(
  • a
  • b
)
protected

Sort-Function to sort sub-objects by order-index.

Parameters:

  • a gs.Object_Base

    Object A

  • b gs.Object_Base

    Object B

update

()

Updates the layout.

updateContent

()

Updates the layout's content.

updateContentSize

() protected

Updates the content size of the layout. Only works if scrolling is enabled.

updateControl

(
  • control
)
protected

Updates a specified control.

Parameters:

  • control gs.Object_Base

    The control to update

updateScroll

()

Updates scrolling.

Properties

contentSize

gs.Size

Content size of the layout.