Skip to content

FlexContainer

Enhanced PIXI Container that has: a factory for adding children, a reference to the Application instance, a signal connection manager, and auto update / resize capabilities Container

Extends

Constructors

new FlexContainer()

new FlexContainer(settings): FlexContainer

Parameters

settings: Partial<FlexContainerSettings>= {}

Returns

FlexContainer

Overrides

Container.constructor

Source

src/ui/FlexContainer.ts:32

Properties

childrenEditable

childrenEditable: boolean = true

Inherited from

Container.childrenEditable

Source

src/gameobjects/Container.ts:22


debug

debug: boolean = false

Source

src/ui/FlexContainer.ts:20


editable

editable: boolean = true

Inherited from

Container.editable

Source

src/gameobjects/Container.ts:21


onLayoutComplete

onLayoutComplete: Signal<() => void>

Source

src/ui/FlexContainer.ts:19


__dill_pixel_top_level_class

static __dill_pixel_top_level_class: boolean = true

Inherited from

Container.__dill_pixel_top_level_class

Source

src/gameobjects/Container.ts:20

Accessors

add

get add(): Add

Returns

Add

Source

src/gameobjects/Container.ts:120


alignItems

get alignItems(): "center" | "flex-start" | "flex-end"

set alignItems(value): void

Parameters

value: "center" | "flex-start" | "flex-end"

Returns

"center" | "flex-start" | "flex-end"

Source

src/ui/FlexContainer.ts:83


app

get app(): T

Returns

T

Source

src/gameobjects/Container.ts:128


containerHeight

get containerHeight(): number

set containerHeight(value): void

Parameters

value: number

Returns

number

Source

src/ui/FlexContainer.ts:101


containerWidth

get containerWidth(): number

set containerWidth(value): void

Parameters

value: number

Returns

number

Source

src/ui/FlexContainer.ts:110


editMode

get editMode(): boolean

set editMode(value): void

Parameters

value: boolean

Returns

boolean

Source

src/gameobjects/Container.ts:107


flexChildren

get flexChildren(): DisplayObject[]

Returns

DisplayObject[]

Source

src/ui/FlexContainer.ts:130


flexDirection

get flexDirection(): "row" | "column"

set flexDirection(value): void

Parameters

value: "row" | "column"

Returns

"row" | "column"

Source

src/ui/FlexContainer.ts:74


flexWrap

get flexWrap(): "wrap" | "nowrap"

set flexWrap(value): void

Parameters

value: "wrap" | "nowrap"

Returns

"wrap" | "nowrap"

Source

src/ui/FlexContainer.ts:65


focusPosition

get focusPosition(): Point

set focusPosition(value): void

Parameters

value: Point

Returns

Point

Source

src/gameobjects/Container.ts:83


focusSize

get focusSize(): Point

set focusSize(value): void

Parameters

value: Point

Returns

Point

Source

src/gameobjects/Container.ts:91


focusable

get focusable(): boolean

set focusable(value): void

Parameters

value: boolean

Returns

boolean

Source

src/gameobjects/Container.ts:99


gap

get gap(): number

set gap(value): void

Parameters

value: number

Returns

number

Source

src/ui/FlexContainer.ts:56


justifyContent

get justifyContent(): "center" | "flex-start" | "flex-end" | "space-between" | "space-around" | "space-evenly"

set justifyContent(value): void

Parameters

value: "center" | "flex-start" | "flex-end" | "space-between" | "space-around" | "space-evenly"

Returns

"center" | "flex-start" | "flex-end" | "space-between" | "space-around" | "space-evenly"

Source

src/ui/FlexContainer.ts:92


make

get make(): typeof Make

Returns

typeof Make

Source

src/gameobjects/Container.ts:124


size

get size(): object

set size(size): void

Parameters

size: PointLike

Returns

object

height

height: number

width

width: number

Source

src/ui/FlexContainer.ts:119


useAsCaptionTarget

get useAsCaptionTarget(): boolean

set useAsCaptionTarget(value): void

Parameters

value: boolean

Returns

boolean

Source

src/gameobjects/Container.ts:61


voiceover

get voiceover(): string

set voiceover(value): void

Parameters

value: string

Returns

string

Source

src/gameobjects/Container.ts:69

Methods

addChildAt()

addChildAt<U>(child, index): U

Adds a child to the container at the specified index Override because we need to ensure it sets the child index properly

Type parameters

U extends DisplayObject = DisplayObject

Parameters

child: DisplayObject

index: number

Returns

U

Overrides

Container.addChildAt

Source

src/ui/FlexContainer.ts:193


destroy()

destroy(_options?): void

Parameters

_options?: boolean | IDestroyOptions

Returns

void

Overrides

Container.destroy

Source

src/ui/FlexContainer.ts:134


disableEditMode()

disableEditMode(): void

Returns

void

Inherited from

Container.disableEditMode

Source

src/gameobjects/Container.ts:173


enableEditMode()

enableEditMode(): void

Returns

void

Inherited from

Container.enableEditMode

Source

src/gameobjects/Container.ts:169


getChildAt()

getChildAt(index): DisplayObject

Gets the child at the specified index Override due to re-parenting

Parameters

index: number

Returns

DisplayObject

Overrides

Container.getChildAt

Source

src/ui/FlexContainer.ts:235


getChildIndex()

getChildIndex(child): number

Gets the index of a child in the container Override because we need to ensure it targets the parent container that we added

Parameters

child: DisplayObject

Returns

number

Overrides

Container.getChildIndex

Source

src/ui/FlexContainer.ts:222


getFocusPosition()

getFocusPosition(): Point

Gets the position in global coordinate space that the focus should be centred around.

Returns

Point

The position that the focus should be centred around.

Inherited from

Container.getFocusPosition

Source

src/gameobjects/Container.ts:157


getFocusSize()

getFocusSize(): IPoint

Gets the size of the area in global coordinate space that the focus should surround.

Returns

IPoint

The size of the area that the focus should surround.

Inherited from

Container.getFocusSize

Source

src/gameobjects/Container.ts:161


isFocusable()

isFocusable(): boolean

Returns

boolean

true if this focusable can be focused Defaults to this.interactive && this.worldVisible

Inherited from

Container.isFocusable

Source

src/gameobjects/Container.ts:165


layout()

layout(): void

Public method to manually trigger a layout

Returns

void

Source

src/ui/FlexContainer.ts:242


onFocusActivated()

onFocusActivated(): void

Called when this Focusable is focussed and then activated.

Returns

void

Inherited from

Container.onFocusActivated

Source

src/gameobjects/Container.ts:155


onFocusBegin()

onFocusBegin(): void

Called when this Focusable is focussed.

Returns

void

Inherited from

Container.onFocusBegin

Source

src/gameobjects/Container.ts:143


onFocusEnd()

onFocusEnd(): void

Called when this Focusable is no longer focussed.

Returns

void

Inherited from

Container.onFocusEnd

Source

src/gameobjects/Container.ts:149


onResize()

onResize(_size): void

Parameters

_size: IPoint

Returns

void

Overrides

Container.onResize

Source

src/ui/FlexContainer.ts:141


removeChild()

removeChild(…children): DisplayObject

Removes one or more children from the container Override because we need to ensure it returns the proper re-parented children

Parameters

• …children: DisplayObject[]

Returns

DisplayObject

Overrides

Container.removeChild

Source

src/ui/FlexContainer.ts:172


removeChildAt()

removeChildAt(index): DisplayObject

Removes a child from the container at the specified index Override because we need to remove from the inner container

Parameters

index: number

Returns

DisplayObject

Overrides

Container.removeChildAt

Source

src/ui/FlexContainer.ts:151


removeChildren()

removeChildren(): DisplayObject[]

Removes all the children from the container Override because we need to ensure it returns the proper re-parented children

Returns

DisplayObject[]

Overrides

Container.removeChildren

Source

src/ui/FlexContainer.ts:160


setChildIndex()

setChildIndex(child, index): void

Sets the index of the child in the container Override because we need to ensure it targets the parent container that we added

Parameters

child: DisplayObject

index: number

Returns

void

Overrides

Container.setChildIndex

Source

src/ui/FlexContainer.ts:206


update()

update(_deltaTime): void

Parameters

_deltaTime: number

Returns

void

Inherited from

Container.update

Source

src/gameobjects/Container.ts:183