Перейти к основному содержанию

UI.AdaptiveWindow

Class representing several windows opened at the same. For example, UI.StandardWindow is a window group that consists of several separate windows.

Hierarchy

Index

Constructors

constructor

Properties

closeOnBackPressed

closeOnBackPressed: boolean

Methods

addWindow

  • Creates a new window using provided description and adds it to the group.


    Parameters

    • name: string

      window name

    • content: WindowContent

      window description object

    Returns Window

    Created UI.Window object.

addWindowInstance

  • addWindowInstance(name: string, window: IWindow): void
  • Adds window instance with specified name to the group.


    Parameters

    • name: string

      window name

    • window: IWindow

      window to be added to the group

    Returns void

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

getAllWindows

  • Returns Collection<Window>

    Collection object containing all the UI.Windows in the group.

getContainer

  • Returns UiAbstractContainer

    Currently UI.Container that was used to open this window or null, if the window wasn't opened in container.

getContent

getElements

  • Gets all the elements in the window.


    Returns HashMap<string, IElement>

    Hashes 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

    Returns Style

getWindow

  • getWindow(name: string): Window
  • Parameters

    • name: string

      window name

    Returns Window

    Window from the group by it's name or null if no window with such a name was added.

getWindowContent

  • Parameters

    • name: string

      window name

    Returns WindowContent

    Window's description object if a window with specified name exists or null otherwise.

getWindowNames

  • Returns Collection<string>

    Collection object containing string names of the windows in the group.

invalidateAllContent

  • invalidateAllContent(): void
  • Returns void

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.

moveOnTop

  • moveOnTop(name: string): void
  • Moves window with specified name to the top of the group.


    Parameters

    • name: string

      window name

    Returns void

onBackPressed

  • onBackPressed(): boolean
  • Returns boolean

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

open

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


    Returns void

refreshAll

  • refreshAll(): void
  • Forces refresh for all windows.


    Returns void

refreshWindow

  • refreshWindow(name: string): void
  • Forces window refresh by it's name.


    Parameters

    • name: string

      name of the window to refresh

    Returns void

removeWindow

  • removeWindow(name: string): void
  • Removes window from group by it's name.


    Parameters

    • name: string

      window name

    Returns void

setBlockingBackground

  • setBlockingBackground(bb: boolean): void
  • Parameters

    • bb: boolean

    Returns void

setCloseOnBackPressed

  • setCloseOnBackPressed(val: boolean): void
  • Gives the property to be closed on pressing back navigation button to the given window group.


    Parameters

    • val: boolean

    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

setContent

setDebugEnabled

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


    Parameters

    • enabled: boolean

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

    Returns void

setForcedProfile

  • setForcedProfile(profile: 0 | 1): void
  • Forces UI.AdaptiveWindow to be displayed using some profile.


    Parameters

    • profile: 0 | 1

      0 for classic profile, 1 for default profile or -1 not to force any profile. By default forced profile is -1

    Returns void

setProfile

  • setProfile(profile: 0 | 1): void
  • Sets style profile for the current UI.AdaptiveWindow.


    Parameters

    • profile: 0 | 1

      0 for classic profile, 1 for default profile

    Returns void

setStyle

  • Parameters

    Returns void

setWindowContent

  • Sets content for the window by it's name.


    Parameters

    Returns void