Double switch structure? whats that? I know that using a switch structure in the main while(isOpen) loop will allow you to detect cases .
In my main function, i will eventually have a switch case that detects what time of event it is (keypressed, closed etc etc) but then when i want to specifically check which key has been pressed, i use the inputManager functions which returns true or false based on which key has been pressed.
also sorry for asking multiple questions, but, in your opinions, if i have ScreenManager, GameScreen, SplashScreen, TitleScreen, InputManager, and Animation classes, which class should keep info about the time between frames?
I was thinking the ScreenManager should have a sf::Time member which holds the time between each frame. I want to keep track of the time between each frame such that if i want to control movement/ fading animations, i can change alpha values.
oh and yea my inputManager had S and T keys that change between screens but i changed it to the Return key.
and expl0it3r. so you're saying i should first check if the key is pressed by doing
sf::Keyboard::isKeypressed
and then i should check the actual key pressed by doing
event.key.code == key
and the reason to do this is because the event may be delayed so there might be a time difference?