SFML community forums

Help => Window => Topic started by: Hunter259 on January 12, 2016, 10:19:59 pm

Title: Start Screen
Post by: Hunter259 on January 12, 2016, 10:19:59 pm
I have been trying for a few hours to understand how to pause the rendering for user input on a start screen. I have tried using window.waitEvent but it did not work either. How would one go about creating a start screen?
Title: Re: Start Screen
Post by: zsbzsb on January 12, 2016, 10:38:48 pm
Don't pause the rendering, your drawing code should be separate from your logic code. Every frame redraw everything and handle events. When an event occurs simply update what you are drawing.
Title: Re: Start Screen
Post by: Hunter259 on January 12, 2016, 11:06:08 pm
How would I go about doing this? I'm new to graphics development.
Title: Re: Start Screen
Post by: eXpl0it3r on January 13, 2016, 02:03:28 am
Generally your game will render around 60 frames per second (or more) and that's by far not what the CPU can deliver, so there's enough time to handle input between frames.
Have you read the official tutorials on event handling (and opening and managing SFML window)?