MoonWorks/src/WindowCreateInfo.cs

56 lines
1.5 KiB
C#
Raw Normal View History

2022-02-25 21:23:31 +00:00
namespace MoonWorks
2021-01-19 19:24:23 +00:00
{
2023-09-19 20:19:41 +00:00
/// <summary>
/// All the information required for window creation.
/// </summary>
2022-02-23 05:14:32 +00:00
public struct WindowCreateInfo
{
2023-09-19 20:19:41 +00:00
/// <summary>
/// The name of the window that will be displayed in the operating system.
/// </summary>
2022-02-23 05:14:32 +00:00
public string WindowTitle;
2023-09-19 20:19:41 +00:00
/// <summary>
/// The width of the window.
/// </summary>
2022-02-23 05:14:32 +00:00
public uint WindowWidth;
2023-09-19 20:19:41 +00:00
/// <summary>
/// The height of the window.
/// </summary>
2022-02-23 05:14:32 +00:00
public uint WindowHeight;
2023-09-19 20:19:41 +00:00
/// <summary>
/// Specifies if the window will be created in windowed mode or a fullscreen mode.
/// </summary>
2022-02-23 05:14:32 +00:00
public ScreenMode ScreenMode;
2023-09-19 20:19:41 +00:00
/// <summary>
/// Specifies the presentation mode for the window. Roughly equivalent to V-Sync.
/// </summary>
2022-09-30 20:02:51 +00:00
public PresentMode PresentMode;
2023-09-19 20:19:41 +00:00
/// <summary>
/// Whether the window can be resized using the operating system's window dragging feature.
/// </summary>
public bool SystemResizable;
2023-09-19 20:19:41 +00:00
/// <summary>
/// Specifies if the window will open at the maximum desktop resolution.
/// </summary>
public bool StartMaximized;
2022-03-02 22:46:55 +00:00
public WindowCreateInfo(
string windowTitle,
uint windowWidth,
uint windowHeight,
ScreenMode screenMode,
2022-09-30 20:02:51 +00:00
PresentMode presentMode,
bool systemResizable = false,
bool startMaximized = false
2022-03-02 22:46:55 +00:00
) {
WindowTitle = windowTitle;
WindowWidth = windowWidth;
WindowHeight = windowHeight;
ScreenMode = screenMode;
2022-09-30 20:02:51 +00:00
PresentMode = presentMode;
SystemResizable = systemResizable;
StartMaximized = startMaximized;
2022-03-02 22:46:55 +00:00
}
2022-02-23 05:14:32 +00:00
}
2021-01-19 19:24:23 +00:00
}