diff --git a/Hypercube.Client/Graphics/Windows/Manager/GlfwWindowManager.Window.cs b/Hypercube.Client/Graphics/Windows/Manager/GlfwWindowManager.Window.cs index 74dc1c1..5a77a5c 100644 --- a/Hypercube.Client/Graphics/Windows/Manager/GlfwWindowManager.Window.cs +++ b/Hypercube.Client/Graphics/Windows/Manager/GlfwWindowManager.Window.cs @@ -85,6 +85,10 @@ public WindowCreateResult WindowCreate(ContextInfo? context, WindowCreateSetting if (settings.StencilBits is not null) GLFW.WindowHint(WindowHintInt.StencilBits, settings.StencilBits.Value); + GLFW.WindowHint(WindowHintBool.Resizable, settings.Resizable); + GLFW.WindowHint(WindowHintBool.TransparentFramebuffer, settings.TransparentFramebuffer); + GLFW.WindowHint(WindowHintBool.Decorated, settings.Decorated); + var window = GLFW.CreateWindow( settings.Width, settings.Height, @@ -97,12 +101,7 @@ public WindowCreateResult WindowCreate(ContextInfo? context, WindowCreateSetting Terminate(); return new WindowCreateResult(null, GLFWHelper.GetError()); } - - // Apply GLFW WindowStyle - if (settings.NoTitleBar) - GLFW.WindowHint(WindowHintBool.Decorated, false); - return new WindowCreateResult(WindowSetup(window), null); } diff --git a/Hypercube.Client/Graphics/Windows/WindowCreateSettings.cs b/Hypercube.Client/Graphics/Windows/WindowCreateSettings.cs index 813a230..50a996a 100644 --- a/Hypercube.Client/Graphics/Windows/WindowCreateSettings.cs +++ b/Hypercube.Client/Graphics/Windows/WindowCreateSettings.cs @@ -7,16 +7,15 @@ public class WindowCreateSettings { public int Width => Size.X; public int Height => Size.Y; - - public bool NoTitleBar => Styles.HasFlag(WindowStyles.NoTitleBar); - public bool NoTitleOptions => Styles.HasFlag(WindowStyles.NoTitleOptions); public string Title = "Hypercube Window"; public Vector2Int Size = new(1280, 720); - public WindowStyles Styles; - public Version Version; - + public IMonitorHandle? Monitor; + + public bool Resizable = true; + public bool TransparentFramebuffer = false; + public bool Decorated = true; public int? RedBits = 8; public int? GreenBits = 8; diff --git a/Hypercube.Client/Graphics/Windows/WindowStyles.cs b/Hypercube.Client/Graphics/Windows/WindowStyles.cs deleted file mode 100644 index 68a9ec2..0000000 --- a/Hypercube.Client/Graphics/Windows/WindowStyles.cs +++ /dev/null @@ -1,23 +0,0 @@ -namespace Hypercube.Client.Graphics.Windows; - -/// -/// Specifies window styling options for an OS window. -/// -[Flags] -public enum WindowStyles -{ - /// - /// No special styles set. - /// - None = 0, - - /// - /// Hide title buttons such as close and minimize. - /// - NoTitleOptions = 1 << 0, - - /// - /// Completely hide the title bar - /// - NoTitleBar = 1 << 1, -} \ No newline at end of file