Represents window of required size that can be opened in container to provide any required UI facilities.

Implements

Constructors

Methods

  • Adds another window as adjacent window, so that several windows open at the same time. This allows to divide window into separate parts and treat them separately.

    Parameters

    • window: Window

      another window to be added as adjacent

    Returns void

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

    Returns void

  • Writes debug information about current window to the log.

    Returns void

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

    Parameters

    • time: number

      current time in milliseconds

    Returns void

  • Gets custom property by it's name. Custom properties can be used to store some values containing window's current state. Note that these properties are not saved between Inner Core launches.

    Type Parameters

    • T

    Parameters

    • name: string

      custom property name

    Returns T

    Value set by UI.Window.putProperty or null if no value was specified for this name.

  • Returns number

    Unit size (in pixel) in the window's bounds.

  • 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 window blocks background.

  • Returns boolean

    true if the window is game overlay, false otherwise.

  • Returns boolean

    true if the window is touchable, false otherwise.

  • Sets custom property value.

    Type Parameters

    • T

    Parameters

    • name: string

      custom property name

    • value: T

      custom property value

    Returns void

  • Removes adjacent window from the adjacent windows list.

    Parameters

    • window: Window

      another window that was added as adjacent

    Returns void

  • Parameters

    • async: boolean

    Returns void

  • Allows window to be displayed as game overlay without blocking Minecraft sounds. Note that this drops window's FPS.

    Parameters

    • inGameOverlay: boolean

      if true, the window is opened in PopupWindow to avoid blocking Minecraft sounds

    Returns void

    false
    
  • Set background color of window.

    Parameters

    • color: number

      integer color value (you can specify it using hex value)

    Returns void

  • Specifies whether the window should darken and block background.

    Parameters

    • blockingBackground: boolean

      pass true if you want the window to block background

    Returns void

    false
    
  • Gives the property to be closed on pressing back navigation button to the given window.

    Parameters

    • val: boolean

    Returns void

  • Specifies the content of the window.

    Parameters

    • content: WindowContent

      content object to be applied to the window

    Returns 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

  • Parameters

    • dynamic: boolean

      specify true, if the window contains dynamic (animated) elements, false otherwise. By default all windows are dynamic. Make them static for better performance

    Returns void

  • Parameters

    • inventoryNeeded: boolean

      specify true if the window requires player's inventory

    Returns void

    false
    
  • Sets any window as current window's parent. If current window closes, parent window closes too.

    Parameters

    • parent: IWindow

      window to be used as parent window for the current window.

    Returns void

  • Overrides style properties of the current style by the values specified in the style parameter.

    Parameters

    • style: BindingSet

      js object where keys represent binding names and values represent texture gui names

    Returns void

  • Sets new style object as current window's style. If the new style is a different object then an old one, forces window invalidation.

    Parameters

    Returns void

  • Specifies whether touch events should be handled by this window or passed to underlying windows (to the game). By default all windows are touchable.

    Parameters

    • touchable: boolean

      pass true if the window should handle touch events, false otherwise

    Returns void

  • Returns void

    2.2.1b96

Properties

closeOnBackPressed: boolean
content: WindowContent
elementProvider: IElementProvider
elementView: ImageView
isBackgroundDirty: boolean
isForegroundDirty: boolean
layout: ViewGroup
location: WindowLocation

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