BGE/UI

Alias: BGE.UI


Enums

BGE.UI.HorizAlignment

enumstaticreadonly

Properties

  • left (default: "left")
  • center (default: "center")
  • right (default: "right")

BGE.UI.VertAlignment

enumstaticreadonly

Properties

  • top (default: "top")
  • center (default: "center")
  • bottom (default: "bottom")

Other

Label

static

Extends: UiWidget

Parameters

Properties

Returns

  • BGE.UI.Label

DEFAULT_PADDING

staticreadonly

Default: 32

OffsetSize

static

Parameters

  • tOffset (float, optional, default: 0)
  • rOffset (dynamic, optional, default: "invalid")
  • bOffset (dynamic, optional, default: "invalid")
  • lOffset (dynamic, optional, default: "invalid")

Properties

  • top (float)
  • right (float)
  • bottom (float)
  • left (float)

Returns

  • BGE.UI.OffsetSize

UiContainer

static

Extends: BGE.UI.UiWidget

Parameters

Properties

  • backgroundRGBA (integer) — RGBA value for the background of the window/container
  • showBackground (boolean) — RGBA value for the background of the window/container
  • children (dynamic)

Returns

  • BGE.UI.UiContainer

UiWidget

static

Extends: BGE.GameEntity

Base Abstract class for all UI Elements

Parameters

Properties

  • customPosition (boolean) — If position = "custom", then m.customX is horizontal position of this element from the parent position ' and m.customY is the vertical position of this element from the parent position (positive is down)
  • customX (float)
  • customY (float)
  • horizAlign (string) — If customPosition is false, this dictates where horizontally in the container this element should go. Can be: "left", "center" or "right"
  • vertAlign (string) — If customPosition is false, this dictates where vertically in the container this element should go. Can be: "top", "center" or "bottom"
  • width (integer) — Width of the element
  • height (integer) — Height of the element
  • canvas (BGE.Canvas)
  • padding (OffsetSize)
  • margin (OffsetSize)

Returns

  • BGE.UI.UiWidget