KernelAPI reference
Class DisplayInfo
Namespace: MicroEngine.Core
Assembly: MicroEngine.dll
Guide: Game lifecycle and time
A display (monitor) as the system reports it.
public sealed record DisplayInfo : IEquatable<DisplayInfo>Inheritance
Implements
Constructors
DisplayInfo(int, string, int, int, double, float, bool)
A display (monitor) as the system reports it.
public DisplayInfo(int Index, string Name, int Width, int Height, double RefreshRate, float Scale, bool Primary)Parameters
Index int
Position in Displays, used by Display and MoveToDisplay.
Name string
The system’s name for it (“LG FHD”); may be empty.
Width int
Width of its current mode in pixels.
Height int
Height of its current mode in pixels.
RefreshRate double
Refresh rate of its current mode in hertz; 0 when unknown.
Scale float
The system’s content scale for it (1.5 for 150%).
Primary bool
Whether it is the system’s primary display.
Properties
Height
Height of its current mode in pixels.
public int Height { get; init; }Property Value
Index
Position in Displays, used by Display and MoveToDisplay.
public int Index { get; init; }Property Value
Name
The system’s name for it (“LG FHD”); may be empty.
public string Name { get; init; }Property Value
Primary
Whether it is the system’s primary display.
public bool Primary { get; init; }Property Value
RefreshRate
Refresh rate of its current mode in hertz; 0 when unknown.
public double RefreshRate { get; init; }Property Value
Scale
The system’s content scale for it (1.5 for 150%).
public float Scale { get; init; }Property Value
Width
Width of its current mode in pixels.
public int Width { get; init; }Property Value
Methods
<Clone>$()
public DisplayInfo <Clone>$()Returns
Deconstruct(out int, out string, out int, out int, out double, out float, out bool)
public void Deconstruct(out int Index, out string Name, out int Width, out int Height, out double RefreshRate, out float Scale, out bool Primary)Parameters
Index int
Name string
Width int
Height int
RefreshRate double
Scale float
Primary bool
Equals(object?)
public override bool Equals(object? obj)Parameters
obj object?
Returns
Equals(DisplayInfo?)
public bool Equals(DisplayInfo? other)Parameters
other DisplayInfo?
Returns
GetHashCode()
public override int GetHashCode()Returns
ToString()
public override string ToString()Returns
Operators
operator ==(DisplayInfo?, DisplayInfo?)
public static bool operator ==(DisplayInfo? left, DisplayInfo? right)Parameters
left DisplayInfo?
right DisplayInfo?
Returns
operator !=(DisplayInfo?, DisplayInfo?)
public static bool operator !=(DisplayInfo? left, DisplayInfo? right)Parameters
left DisplayInfo?
right DisplayInfo?