Welcome,
Guest
. Please
login
or
register
. Did you miss your
activation email?
French forum
Home
Help
Search
Login
Register
SFML community forums
»
Help
»
Window
»
Restart Window inside isOpen loop
Print
Pages: [
1
]
Author
Topic: Restart Window inside isOpen loop (Read 3713 times)
0 Members and 1 Guest are viewing this topic.
schlepper_64bit
Newbie
Posts: 1
Restart Window inside isOpen loop
«
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.
Logged
eXpl0it3r
SFML Team
Hero Member
Posts: 11034
Re: Restart Window inside isOpen loop
«
Reply #1 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
Logged
Official FAQ:
https://www.sfml-dev.org/faq.php
Official Discord Server:
https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog:
https://duerrenberger.dev/blog/
Print
Pages: [
1
]
SFML community forums
»
Help
»
Window
»
Restart Window inside isOpen loop