LuaContainerControl

This type represents the base for containers. Containers are the building blocks for any menu elements and should be used to build complex custom controls that combine two or more subcontrols (e.g. a checkbox and it's label).

circle-info

This is just a container control type and inherits ControlContainer, to learn how to create custom containers, see LuaContainerProto documentation. It is usually best used alongside a Layout.

__call

Constructor

Constructs the custom container.

Arguments

Name

Type

Description

id

ControlID|string

ID.

proto

Metatable for this container

position

Custom offset

size

Custom size

Returns

Type

Description

control_container

Custom container instance.

Example

local container = gui.LuaContainerControl('my_container', gui.LuaContainerProto(), draw.Vec2(), draw.Vec2(100, 24))

CalcMaxX

Method

Calculates the maximum horizontal position inside this container.

Arguments

None.

Returns

Type

Description

number

The X position

Example


CalcMaxY

Method

Calculates the maximum vertical position inside this container.

Arguments

None.

Returns

Type

Description

number

The Y position

Example


Copy

Method

Copies references of all children inside this container to another container.

Arguments

Name

Type

Description

otherContainer

Other container.

Returns

Nothing.

Example

Last updated