Class WindowSettings¶
Namespace: Apogee.Host
Assembly: Apogee.Host.dll
Keeps a window and the window.* settings together: fullscreen follows the setting, and the size the player gives the window while it is not fullscreen is stored.
public sealed class WindowSettings : IDisposable
Inheritance¶
Implements¶
Inherited Members¶
object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()
Constructors¶
WindowSettings(SettingsStore, bool)¶
Follows a window that is not there: for tests, which feed
public WindowSettings(SettingsStore store, bool trackSize = true)
Parameters¶
store SettingsStore
trackSize bool
Fields¶
SettledFrames¶
How many frames a size has to stay the same before it is stored: the player is still dragging, or the window manager is still settling after a mode change.
public const int SettledFrames = 20
Field Value¶
Methods¶
Dispose()¶
Stops following the settings.
public void Dispose()
Observe(int, int)¶
Takes the window's size of this frame. It is stored (as window.width and window.height) when it differs from the stored one, has not changed for
public void Observe(int width, int height)
Parameters¶
width int
The width in points.
height int
The height in points.
Update()¶
Call once a frame: stores the window's size once the player has left it alone for a moment.
public void Update()