1
Window / SFML.Net Window.Close() clearing events
« on: March 13, 2020, 02:52:28 am »
Hello,
I've been trying to get fullscreen toggling to work in SFML.Net, and here's my code for that:
But when I close() the window, all my events seem to get cleared. How do I fix this?
Thanks,
Gus
I've been trying to get fullscreen toggling to work in SFML.Net, and here's my code for that:
public void ToggleFullscreen()
{
WindowStyle ^= Styles.Fullscreen;
IsFullscreen = !IsFullscreen;
if (window != null && window.IsOpen)
{
window.Close ();
}
window = new RenderWindow ((IsFullscreen ? VideoMode.DesktopMode : WindowMode), WindowTitle, WindowStyle);
}
{
WindowStyle ^= Styles.Fullscreen;
IsFullscreen = !IsFullscreen;
if (window != null && window.IsOpen)
{
window.Close ();
}
window = new RenderWindow ((IsFullscreen ? VideoMode.DesktopMode : WindowMode), WindowTitle, WindowStyle);
}
But when I close() the window, all my events seem to get cleared. How do I fix this?
Thanks,
Gus