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

UI.StandartWindow

Legacy misspelled standard UI, which is works under classic styling and must be used only in unsupported mods.

That feature is obsolete

In 2.0.4b40, use UI.StandardWindow instead.

Hierarchy

Index

Constructors

constructor

  • Constructs new UI.StandartWindow with specified content. Content is applied to the main window, header and inventory remain the same.


    Parameters

    Returns StandartWindow

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

setStyle

  • Parameters

    Returns void

setWindowContent

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


    Parameters

    Returns void