KernelAPI reference
Class WindowSizing
Namespace: MicroEngine.Core
Assembly: MicroEngine.dll
Guide: Game lifecycle and time
The window sizes desktop platforms open and allow, shared by every backend so they agree.
public static class WindowSizingInheritance
Fields
MaximumDisplayShare
Share of the display’s usable area a window may take when it opens.
public const float MaximumDisplayShare = 0.9Field Value
Methods
Initial(GameSettings, int, int, int)
The size a window opens at: the canvas times scale, or, when that does not fit in
MaximumDisplayShare of the display’s usable area, the largest size that does: a whole factor of the
canvas when the presentation asks for whole-factor windows (WholeFactorWindows, pixel
art) and one fits, otherwise the canvas’s shape scaled to fit (a 1920×1080 canvas on a 1366×768 laptop).
public static (int Width, int Height) Initial(GameSettings settings, int scale, int usableWidth, int usableHeight)Parameters
settings GameSettings
The game’s canvas and scaling.
scale int
The requested multiple of the canvas (Scale or –scale).
usableWidth int
Width of the display’s usable area; 0 or less when unknown, which keeps the requested size.
usableHeight int
Height of the display’s usable area; 0 or less when unknown.
Returns
Minimum(GameSettings)
The smallest window size: the canvas itself, or a quarter of it for canvases wider than 640 pixels (an HD canvas would otherwise forbid windows smaller than a laptop screen).
public static (int Width, int Height) Minimum(GameSettings settings)Parameters
settings GameSettings