add StartMaximized flag to WindowCreateInfo
parent
424f410688
commit
40a2b31e90
|
@ -1,4 +1,4 @@
|
||||||
using System;
|
using System;
|
||||||
using SDL2;
|
using SDL2;
|
||||||
|
|
||||||
namespace MoonWorks
|
namespace MoonWorks
|
||||||
|
@ -30,6 +30,11 @@ namespace MoonWorks
|
||||||
windowFlags |= SDL.SDL_WindowFlags.SDL_WINDOW_RESIZABLE;
|
windowFlags |= SDL.SDL_WindowFlags.SDL_WINDOW_RESIZABLE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (windowCreateInfo.StartMaximized)
|
||||||
|
{
|
||||||
|
windowFlags |= SDL.SDL_WindowFlags.SDL_WINDOW_MAXIMIZED;
|
||||||
|
}
|
||||||
|
|
||||||
ScreenMode = windowCreateInfo.ScreenMode;
|
ScreenMode = windowCreateInfo.ScreenMode;
|
||||||
|
|
||||||
Handle = SDL.SDL_CreateWindow(
|
Handle = SDL.SDL_CreateWindow(
|
||||||
|
|
|
@ -7,19 +7,22 @@
|
||||||
public uint WindowHeight;
|
public uint WindowHeight;
|
||||||
public ScreenMode ScreenMode;
|
public ScreenMode ScreenMode;
|
||||||
public bool SystemResizable;
|
public bool SystemResizable;
|
||||||
|
public bool StartMaximized;
|
||||||
|
|
||||||
public WindowCreateInfo(
|
public WindowCreateInfo(
|
||||||
string windowTitle,
|
string windowTitle,
|
||||||
uint windowWidth,
|
uint windowWidth,
|
||||||
uint windowHeight,
|
uint windowHeight,
|
||||||
ScreenMode screenMode,
|
ScreenMode screenMode,
|
||||||
bool systemResizable = false
|
bool systemResizable = false,
|
||||||
|
bool startMaximized = false
|
||||||
) {
|
) {
|
||||||
WindowTitle = windowTitle;
|
WindowTitle = windowTitle;
|
||||||
WindowWidth = windowWidth;
|
WindowWidth = windowWidth;
|
||||||
WindowHeight = windowHeight;
|
WindowHeight = windowHeight;
|
||||||
ScreenMode = screenMode;
|
ScreenMode = screenMode;
|
||||||
SystemResizable = systemResizable;
|
SystemResizable = systemResizable;
|
||||||
|
StartMaximized = startMaximized;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue