Skip to main content

UI.IWindow

Implemented by

Index

Methods

close

  • close(): void
  • Closes window without container. Use only if the window was opened without container.


    Returns void

frame

  • frame(time: number): void
  • Called up to 66 times a second to update window's content.


    Parameters

    • time: number

      current time in milliseconds

    Returns void

getContainer

getContent

  • Returns WindowContent

    Window's content object (usually specified in the window's constructor).

getElements

  • Gets all the elements in the window.


    Returns HashMap<string, IElement>

    HashMap containing string element name as keys and element instances as values.

getStyle

  • Returns Style

    Object containing current style of the window.

getStyleSafe

  • since: 3.1.0b126 (availabled for all windows, before it appears to be only in

    Returns Style

invalidateDrawing

  • invalidateDrawing(onCurrentThread: boolean): void
  • Forces ui drawables of the window to refresh.


    Parameters

    • onCurrentThread: boolean

      if true, the drawables will be refreshed immediately, otherwise refresh event will be posted; ensure you are in the UI thread if you pass true as the parameter

    Returns void

invalidateElements

  • invalidateElements(onCurrentThread: boolean): void
  • Forces ui elements of the window to refresh.


    Parameters

    • onCurrentThread: boolean

      if true, the drawables will be refreshed immediately, otherwise refresh event will be posted; ensure you are in the UI thread if you pass true as the parameter

    Returns void

isDynamic

  • isDynamic(): boolean
  • Returns boolean

    true if the window can change it's contents position.

isInventoryNeeded

  • isInventoryNeeded(): boolean
  • Returns boolean

    true if the window has an inventory that should be updated.

isOpened

  • isOpened(): boolean
  • Returns boolean

    true if the window is opened, false otherwise.

onBackPressed

  • onBackPressed(): boolean
  • Returns boolean

    Whether the window can be closed on pressing back navigation button.

open

  • open(): void
  • Opens window without container.


    Returns void

setContainer

  • Sets container for the current window. Be careful when calling it manually. You should prefer opening the window via UI.Container.openAs call.


    Parameters

    Returns void

setDebugEnabled

  • setDebugEnabled(debug: boolean): void
  • Turns debug mode for the window on and off.


    Parameters

    • debug: boolean

      if true, additional debug information will be drawn on the window canvas

    Returns void