Interface IWindow

interface IWindow {
    close(): void;
    frame(time: number): void;
    getContainer(): UiAbstractContainer;
    getContent(): WindowContent;
    getElements(): HashMap<string, IElement>;
    getStyle(): Style;
    invalidateDrawing(onCurrentThread: boolean): void;
    invalidateElements(onCurrentThread: boolean): void;
    isDynamic(): boolean;
    isInventoryNeeded(): boolean;
    isOpened(): boolean;
    onBackPressed(): boolean;
    open(): void;
    setContainer(container: UiAbstractContainer): void;
    setDebugEnabled(debug: boolean): void;
}

Implemented by

Methods

  • Closes window without container. Use only if the window was opened without container.

    Returns void

  • Called up to 66 times a second to update window's content.

    Parameters

    • time: number

      current time in milliseconds

    Returns 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

    onCurrentThread: false
    
  • 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

    onCurrentThread: false
    
  • Returns boolean

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

  • Returns boolean

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

  • Returns boolean

    true if the window is opened, false otherwise.

  • Returns boolean

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

  • 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

  • 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

Copyright © 2024 Nernar. Copyright © 2020 #mineprogramming. Built with ❤ and TypeDoc.