add StartMaximized flag to WindowCreateInfo

main
cosmonaut 2022-07-28 16:06:37 -07:00
parent 424f410688
commit 40a2b31e90
2 changed files with 10 additions and 2 deletions

View File

@ -1,4 +1,4 @@
using System;
using System;
using SDL2;
namespace MoonWorks
@ -30,6 +30,11 @@ namespace MoonWorks
windowFlags |= SDL.SDL_WindowFlags.SDL_WINDOW_RESIZABLE;
}
if (windowCreateInfo.StartMaximized)
{
windowFlags |= SDL.SDL_WindowFlags.SDL_WINDOW_MAXIMIZED;
}
ScreenMode = windowCreateInfo.ScreenMode;
Handle = SDL.SDL_CreateWindow(

View File

@ -7,19 +7,22 @@
public uint WindowHeight;
public ScreenMode ScreenMode;
public bool SystemResizable;
public bool StartMaximized;
public WindowCreateInfo(
string windowTitle,
uint windowWidth,
uint windowHeight,
ScreenMode screenMode,
bool systemResizable = false
bool systemResizable = false,
bool startMaximized = false
) {
WindowTitle = windowTitle;
WindowWidth = windowWidth;
WindowHeight = windowHeight;
ScreenMode = screenMode;
SystemResizable = systemResizable;
StartMaximized = startMaximized;
}
}
}