diff --git a/SakuraCore/src/Window.cpp b/SakuraCore/src/Window.cpp index e2a2859..778dfb7 100644 --- a/SakuraCore/src/Window.cpp +++ b/SakuraCore/src/Window.cpp @@ -12,9 +12,14 @@ namespace SakuraVNE { Window::Window(const WindowData &data) : m_Data(data) {} Window::~Window() { Destroy(); } -void Window::Create() { +void Window::Create(std::span flags) { // TODO: maybe get an unknow amount of parameters / an array of window flags? or just provide a seperate function for it SDL_WindowFlags windowFlags = (SDL_WindowFlags)(SDL_WINDOW_RESIZABLE | SDL_WINDOW_HIGH_PIXEL_DENSITY); + + for (auto &flag : flags) { + windowFlags |= flag; + } + m_Handle = SDL_CreateWindow(m_Data.title.c_str(), m_Data.width, m_Data.height, windowFlags); if (!m_Handle) { diff --git a/SakuraCore/src/Window.h b/SakuraCore/src/Window.h index a7a8879..7eff857 100644 --- a/SakuraCore/src/Window.h +++ b/SakuraCore/src/Window.h @@ -5,6 +5,7 @@ #include "imgui_impl_sdl3.h" #include #include +#include #include namespace SakuraVNE { @@ -26,7 +27,7 @@ public: Window(const WindowData &data = WindowData()); ~Window(); - void Create(); + void Create(std::span flags = {}); void Destroy(); void Update();