Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - gusg21

Pages: [1]
Window / SFML.Net Window.Close() clearing events
« on: March 13, 2020, 02:52:28 am »

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);

But when I close() the window, all my events seem to get cleared. How do I fix this?


Pages: [1]