Scripting API

Scripting API

GamePictureArea

Record struct in Abyss.Core, from Abyss.Core.

Where a game's picture is: a rectangle of one of the engine's windows, in its logical pixels; and the size of the game it shows, which a cursor over it is measured in, where the game is drawn at a size of its own and scaled to fit, as an editor's Game view set to a resolution draws it.

public readonly record struct GamePictureArea

Constructors

GamePictureArea

public GamePictureArea(WindowId Window, float X, float Y, float Width, float Height, float GameWidth = 0, float GameHeight = 0)

Where a game's picture is: a rectangle of one of the engine's windows, in its logical pixels; and the size of the game it shows, which a cursor over it is measured in, where the game is drawn at a size of its own and scaled to fit, as an editor's Game view set to a resolution draws it.

Parameters

  • Window: The window it is in.
  • X: Its left edge, from the window's.
  • Y: Its top edge, from the window's.
  • Width: How wide it is.
  • Height: How tall it is.
  • GameWidth: How wide the game it shows is, in the game's logical pixels; zero for the picture's own width.
  • GameHeight: How tall the game it shows is, in the game's logical pixels; zero for the picture's own height.

Properties

Window

public WindowId Window { get; init; }

The window it is in.

X

public float X { get; init; }

Its left edge, from the window's.

Y

public float Y { get; init; }

Its top edge, from the window's.

Width

public float Width { get; init; }

How wide it is.

Height

public float Height { get; init; }

How tall it is.

GameWidth

public float GameWidth { get; init; }

How wide the game it shows is, in the game's logical pixels; zero for the picture's own width.

GameHeight

public float GameHeight { get; init; }

How tall the game it shows is, in the game's logical pixels; zero for the picture's own height.