Class RenderWindowAbstract

Operating system window with a specific position, size and style. Each window serves as a surface that can be rendered into by RenderAPI operations.

Hierarchy (view full)

Constructors

Accessors

  • get gammaCorrection(): boolean
  • Returns boolean

  • get height(): number
  • Height of the render target, in pixels.

    Returns number

  • get isFullscreen(): boolean
  • Determines if the window is fullscreen.

    Returns boolean

  • get priority(): number
  • Controls in what order is the render target rendered to compared to other render targets. Targets with higher priority will be rendered before ones with lower priority.

    Returns number

  • set priority(value): void
  • Parameters

    • value: number

    Returns void

  • get sampleCount(): number
  • Controls how many samples are used for multisampling. (0 or 1 if multisampling is not used).

    Returns number

  • get screen(): Screen
  • Get the screen on which the window is diaplayed.

    Returns Screen

  • get width(): number
  • Width of the render target, in pixels.

    Returns number

  • get x(): number
  • Horizontal origin of the window in pixels.

    Returns number

  • get y(): number
  • Vertical origin of the window in pixels.

    Returns number

Methods

  • Moves the window so that it is positioned in the center of the current screen.

    Returns boolean

    True if the move was succesful. False if something failed, for example if it can not find current Screen for the window.

  • Hides the window.

    Returns void

    This is an "asynchronous method".

  • Maximizes the window over the entire current screen.

    Returns void

  • Minimizes the window to the taskbar.

    Returns void

  • Move the window to specified screen coordinates.

    Parameters

    • left: number

      Position of the left border of the window on the screen.

    • top: number

      Position of the top border of the window on the screen.

    Returns void

    This is an "asynchronous method".

  • Raises the window to be on top of the other ones as the main active one.

    Returns void

  • Resize the window to specified width and height in pixels.

    Parameters

    • width: number

      Width of the window in pixels.

    • height: number

      Height of the window in pixels.

    Returns void

  • Restores the window to original position and size if it is minimized or maximized.

    Returns void

  • Converts screen position in pixels into window local position.

    Parameters

    Returns Vector2

  • Switches the window to fullscreen mode. Child windows cannot go into fullscreen mode.

    Parameters

    • options: {
          dotsPerInch?: number;
          height: number;
          monitorIdx?: number;
          refreshRate?: number;
          width: number;
      } | {
          videoMode: Immutable<VideoModeInformation>;
      }

      Options object for the function call.

    Returns void

    If the exact provided mode isn't available, closest one is used instead.

  • Defines the window maximum width and height in pixels.

    Parameters

    • maxWidth: number
    • maxHeight: number

    Returns void

  • Defines the window minimum width and height in pixels.

    Parameters

    • minWidth: number
    • minHeight: number

    Returns void

  • Switches the window to windowed mode.

    Parameters

    • width: number

      Window width in pixels.

    • height: number

      Window height in pixels.

    Returns void

  • Shows a previously hidden window.

    Returns void

    This is an "asynchronous method".

  • Converts window local position in pixels to screen position.

    Parameters

    Returns Vector2