UiContainer

Extends: BGE.UI.UiWidget

Properties

  • backgroundRGBA (integer)
  • showBackground (boolean) — RGBA value for the background of the window/container
  • children (Array.<UiWidget>)
  • theme (BGE.UI.Theme) — This container's own theme override. When invalid, effectiveTheme()
  • focusEnabled (boolean) — Does this container register its focusable children with the shared

Constructor

new UiContainer(game: BGE.Game): UiContainer

Parameters


Instance Methods

onRemove(): void

Returns

  • void

addChild(element: UiWidget): void

Parameters

Returns

  • void

childCount(): integer

Gets the number of children currently added to this container

Returns

  • integer

removeChild(element: UiWidget): void

Parameters

Returns

  • void

clearChildren(): void

Returns

  • void

onUpdate(deltaTime: float): void

Parameters

  • deltaTime (float)

Returns

  • void

setCanvas(canvas?: BGE.Canvas): void

Parameters

  • canvas (BGE.Canvas, optional, default: "invalid")

Returns

  • void

draw(parent?: UiWidget): void

Parameters

  • parent (UiWidget, optional, default: "invalid")

Returns

  • void

getValue(): void

Returns

  • void

effectiveTheme(): BGE.UI.Theme

The theme this container's widgets should pull colors/fonts from: this container's own m.theme if set, else the game's defaultTheme.

Returns

  • BGE.UI.Theme

isContainer(): boolean

Returns

  • boolean

onInput(input: BGE.GameInput): void

Parameters

Returns

  • void

onECPKeyboard(char: integer): void

Parameters

  • char (integer)

Returns

  • void

onECPInput(data: roInputEvent): void

Parameters

  • data (roInputEvent)

Returns

  • void

onAudioEvent(msg: roAudioPlayerEvent): void

Parameters

  • msg (roAudioPlayerEvent)

Returns

  • void

onPause(): void

Returns

  • void

onResume(pauseTimeMs: integer): void

Parameters

  • pauseTimeMs (integer)

Returns

  • void

onUrlEvent(msg: roUrlEvent): void

Parameters

  • msg (roUrlEvent)

Returns

  • void

onGameEvent(eventName: string, data: roAssociativeArray): void

Parameters

  • eventName (string)
  • data (roAssociativeArray)

Returns

  • void

onQualityChanged(level: BGE.RenderQualityLevel): void

Parameters

Returns

  • void

onChangeScene(newScene: BGE.GameScene): void

Parameters

Returns

  • void

onDestroy(): void

Returns

  • void