SFML community forums

Help => Window => Topic started by: schlepper_64bit on April 12, 2024, 04:59:56 pm

Title: Restart Window inside isOpen loop
Post by: schlepper_64bit on April 12, 2024, 04:59:56 pm
Hello,
I was wondering if it's possible to close and reopen/restart a game window through an event poll inside its while(isOpen()) loop. Anything I attempt just results in closing the window, as that seems to make anything after it in accessible.
Title: Re: Restart Window inside isOpen loop
Post by: eXpl0it3r on April 12, 2024, 06:45:08 pm
If you close and directly re-create the window, you won't just drop out of the loop, but by the time you hit the while condition again, it will already be reported as open again, so you won't leave the loop :)