Skip to content

FlexContainer

Defined in: ui/FlexContainer.ts:87

Extends

  • _FlexContainer

Type Parameters

T extends Application = Application

Constructors

new FlexContainer()

new FlexContainer<T>(config): FlexContainer<T>

Defined in: ui/FlexContainer.ts:98

Parameters

config

Partial<FlexContainerConfig> = {}

Returns

FlexContainer<T>

Overrides

_FlexContainer.constructor

Properties

add

add: object

Defined in: mixins/factory/Factory.ts:6

animatedSprite()

animatedSprite: (props?) => AnimatedSprite

Parameters
props?

Partial<AnimatedSpriteProps>

Returns

AnimatedSprite

bitmapText()

bitmapText: (props?) => BitmapText

Parameters
props?

Partial<TextProps>

Returns

BitmapText

button()

button: (props?) => Button

Parameters
props?

Partial<ButtonProps>

Returns

Button

container()

container: (props?) => Container

Parameters
props?

Partial<ContainerProps>

Returns

Container

existing()

existing: <TEntity>(entity, props?) => TEntity

Type Parameters

TEntity

Parameters
entity

TEntity

props?

Partial<ExistingProps>

Returns

TEntity

flexContainer()

flexContainer: (props?) => FlexContainer

Parameters
props?

Partial<FlexContainerProps>

Returns

FlexContainer

graphics()

graphics: (props?) => Graphics

Parameters
props?

Partial<GraphicsProps>

Returns

Graphics

htmlText()

htmlText: (props?) => HTMLText

Parameters
props?

Partial<HTMLTextProps>

Returns

HTMLText

particleContainer()

particleContainer: (props?) => ParticleContainer

Parameters
props?

Partial<ParticleContainerProps>

Returns

ParticleContainer

spine()

spine: (props?) => Spine

Parameters
props?

Partial<SpineProps>

Returns

Spine

spineAnimation()

spineAnimation: (props?) => SpineAnimation

Parameters
props?

Partial<SpineProps>

Returns

SpineAnimation

sprite()

sprite: (props?) => Sprite

Parameters
props?

Partial<SpriteProps>

Returns

Sprite

text()

text: (props?) => Text

Parameters
props?

Partial<TextProps>

Returns

Text

texture()

texture: (props?) => Texture = resolveTexture

Parameters
props?

Partial<TextureProps>

Returns

Texture

uiCanvas()

uiCanvas: (props?) => UICanvas

Parameters
props?

Partial<UICanvasFactoryProps>

Returns

UICanvas

svg()

Parameters
props

WithRequiredProps<SvgProps, "ctx">

Returns

Svg

Inherited from

_FlexContainer.add


config

config: FlexContainerConfig

Defined in: ui/FlexContainer.ts:90


debug

debug: boolean = false

Defined in: ui/FlexContainer.ts:89


make

make: object

Defined in: mixins/factory/Factory.ts:7

animatedSprite()

animatedSprite: (props?) => AnimatedSprite

Parameters
props?

Partial<AnimatedSpriteProps>

Returns

AnimatedSprite

bitmapText()

bitmapText: (props?) => BitmapText

Parameters
props?

Partial<TextProps>

Returns

BitmapText

button()

button: (props?) => Button

Parameters
props?

Partial<ButtonProps>

Returns

Button

container()

container: (props?) => Container

Parameters
props?

Partial<ContainerProps>

Returns

Container

existing()

existing: <TEntity>(entity, props?) => TEntity

Type Parameters

TEntity

Parameters
entity

TEntity

props?

Partial<ExistingProps>

Returns

TEntity

flexContainer()

flexContainer: (props?) => FlexContainer

Parameters
props?

Partial<FlexContainerProps>

Returns

FlexContainer

graphics()

graphics: (props?) => Graphics

Parameters
props?

Partial<GraphicsProps>

Returns

Graphics

htmlText()

htmlText: (props?) => HTMLText

Parameters
props?

Partial<HTMLTextProps>

Returns

HTMLText

particleContainer()

particleContainer: (props?) => ParticleContainer

Parameters
props?

Partial<ParticleContainerProps>

Returns

ParticleContainer

spine()

spine: (props?) => Spine

Parameters
props?

Partial<SpineProps>

Returns

Spine

spineAnimation()

spineAnimation: (props?) => SpineAnimation

Parameters
props?

Partial<SpineProps>

Returns

SpineAnimation

sprite()

sprite: (props?) => Sprite

Parameters
props?

Partial<SpriteProps>

Returns

Sprite

text()

text: (props?) => Text

Parameters
props?

Partial<TextProps>

Returns

Text

texture()

texture: (props?) => Texture = resolveTexture

Parameters
props?

Partial<TextureProps>

Returns

Texture

uiCanvas()

uiCanvas: (props?) => UICanvas

Parameters
props?

Partial<UICanvasFactoryProps>

Returns

UICanvas

svg()

Parameters
props

WithRequiredProps<SvgProps, "ctx">

Returns

Svg

Inherited from

_FlexContainer.make


onLayoutComplete

onLayoutComplete: Signal<() => void>

Defined in: ui/FlexContainer.ts:88


signalConnections

signalConnections: SignalConnections

Defined in: mixins/signals.ts:9

Inherited from

_FlexContainer.signalConnections

Accessors

alignItems

Get Signature

get alignItems(): AlignItems

Defined in: ui/FlexContainer.ts:146

Returns

AlignItems

Set Signature

set alignItems(value): void

Defined in: ui/FlexContainer.ts:150

Parameters
value

AlignItems

Returns

void


app

Get Signature

get app(): T

Defined in: ui/FlexContainer.ts:197

Get the application instance.

Returns

T


containerHeight

Get Signature

get containerHeight(): number

Defined in: ui/FlexContainer.ts:164

Returns

number

Set Signature

set containerHeight(value): void

Defined in: ui/FlexContainer.ts:168

Parameters
value

number

Returns

void


containerWidth

Get Signature

get containerWidth(): number

Defined in: ui/FlexContainer.ts:173

Returns

number

Set Signature

set containerWidth(value): void

Defined in: ui/FlexContainer.ts:177

Parameters
value

number

Returns

void


flexChildren

Get Signature

get flexChildren(): Container[]

Defined in: ui/FlexContainer.ts:115

Returns

Container[]


flexDirection

Get Signature

get flexDirection(): FlexDirection

Defined in: ui/FlexContainer.ts:137

Returns

FlexDirection

Set Signature

set flexDirection(value): void

Defined in: ui/FlexContainer.ts:141

Parameters
value

FlexDirection

Returns

void


flexWrap

Get Signature

get flexWrap(): FlexWrap

Defined in: ui/FlexContainer.ts:128

Returns

FlexWrap

Set Signature

set flexWrap(value): void

Defined in: ui/FlexContainer.ts:132

Parameters
value

FlexWrap

Returns

void


gap

Get Signature

get gap(): number

Defined in: ui/FlexContainer.ts:119

Returns

number

Set Signature

set gap(value): void

Defined in: ui/FlexContainer.ts:123

Parameters
value

number

Returns

void


justifyContent

Get Signature

get justifyContent(): JustifyContent

Defined in: ui/FlexContainer.ts:155

Returns

JustifyContent

Set Signature

set justifyContent(value): void

Defined in: ui/FlexContainer.ts:159

Parameters
value

JustifyContent

Returns

void


size

Get Signature

get size(): object

Defined in: ui/FlexContainer.ts:182

Returns

object

height

height: number

width

width: number

Set Signature

set size(size): void

Defined in: ui/FlexContainer.ts:186

Parameters
size

PointLike

Returns

void

Methods

addChildAt()

addChildAt<U>(child, index): U

Defined in: ui/FlexContainer.ts:223

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 Container

Parameters

child

U

index

number

Returns

U

Overrides

_FlexContainer.addChildAt


added()

added(): void

Defined in: ui/FlexContainer.ts:328

Returns

void


addSignalConnection()

addSignalConnection(…args): void

Defined in: mixins/signals.ts:13

Parameters

args

SignalConnection[]

Returns

void

Inherited from

_FlexContainer.addSignalConnection


connectAction()

connectAction(…args): void

Defined in: mixins/signals.ts:15

Parameters

args

SignalConnection[]

Returns

void

Inherited from

_FlexContainer.connectAction


connectSignal()

connectSignal(…args): void

Defined in: mixins/signals.ts:14

Parameters

args

SignalConnection[]

Returns

void

Inherited from

_FlexContainer.connectSignal


destroy()

destroy(_options?): void

Defined in: ui/FlexContainer.ts:264

Removes all internal references and listeners as well as removes children from the display list. Do not use a Container after calling destroy.

Parameters

_options?

DestroyOptions

Returns

void

Overrides

_FlexContainer.destroy


getChildAt()

getChildAt<U>(index): U

Defined in: ui/FlexContainer.ts:260

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

Type Parameters

U extends Container

Parameters

index

number

Returns

U

Overrides

_FlexContainer.getChildAt


getChildByLabel()

getChildByLabel(label, deep): null | Container

Defined in: ui/FlexContainer.ts:291

Parameters

label

string | RegExp

deep

boolean = true

Returns

null | Container

Overrides

_FlexContainer.getChildByLabel


getChildIndex()

getChildIndex<U>(child): number

Defined in: ui/FlexContainer.ts:249

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

Type Parameters

U extends Container

Parameters

child

U

Returns

number

Overrides

_FlexContainer.getChildIndex


layout()

layout(): void

Defined in: ui/FlexContainer.ts:318

Public method to manually trigger a layout

Returns

void


removeChild()

removeChild(…children): Container

Defined in: ui/FlexContainer.ts:276

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

Parameters

children

Container[]

Returns

Container

Overrides

_FlexContainer.removeChild


removeChildAt()

removeChildAt<U>(index): U

Defined in: ui/FlexContainer.ts:215

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

Type Parameters

U extends Container

Parameters

index

number

Returns

U

Overrides

_FlexContainer.removeChildAt


removeChildren()

removeChildren<U>(): U[]

Defined in: ui/FlexContainer.ts:205

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

Type Parameters

U extends Container

Returns

U[]

Overrides

_FlexContainer.removeChildren


resize()

resize(): void

Defined in: ui/FlexContainer.ts:322

Returns

void


setChildIndex()

setChildIndex<U>(child, index): void

Defined in: ui/FlexContainer.ts:233

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

Type Parameters

U extends Container

Parameters

child

U

index

number

Returns

void

Overrides

_FlexContainer.setChildIndex


update()

update(): void

Defined in: ui/FlexContainer.ts:326

Returns

void