Class Window
- Namespace
- MohawkGame2D
- Assembly
- GAME 10003 Game Development Foundations - 2D Game Template.dll
Access window information.
public static class Window
- Inheritance
-
Window
- Inherited Members
Properties
CurrentFPS
How many frames-per-second the window is running at.
public static float CurrentFPS { get; }
Property Value
Height
Height of window in pixels.
public static int Height { get; set; }
Property Value
Size
Size of window in pixels.
public static Vector2 Size { get; set; }
Property Value
TargetFPS
How many frames-per-second (FPS) the game tries to output every second.
public static int TargetFPS { get; set; }
Property Value
Title
Title displayed on top of program window.
public static string Title { get; set; }
Property Value
Width
Width of window in pixels.
public static int Width { get; set; }
Property Value
Methods
CentreWindow()
Centre window within the current monitor.
public static void CentreWindow()
ClearBackground(Color)
Clears the window canvas to the specified color
.
public static void ClearBackground(Color color)
Parameters
color
ColorThe background color to paint.
SetFpsToMonitorRefreshRate()
VSync. Sets the FPS target to the monitor's refresh rate.
public static void SetFpsToMonitorRefreshRate()
Remarks
The monitor selected is based on which monitor the window is currently in.
SetSize(int, int)
Set the window size in pixels.
public static void SetSize(int width, int height)
Parameters
SetTitle(string)
Set the program window title.
public static void SetTitle(string value)
Parameters
value
stringThe new title to display.