1
General / Re: Problem with Event Keyboard Input
« on: November 08, 2018, 09:38:44 pm »
Alright, thanks for the advice.
After a second look I realized that it was in the 'window open' loop, but not inside the poll.event loop.
So I moved the event handler function into the event loop (also the global check for 'Escape' to close the window or go back to title menu, depending on state). And now it works fine.
.. at first I just moved all the main functions into the loop, but realized that makes everything pause as long as there's no event (was kinda funny, the animations and progression always paused unless I kept moving the mouse) but then moved the parts not relevant to events back out ^^
Now everything works as intended, thanks!
After a second look I realized that it was in the 'window open' loop, but not inside the poll.event loop.
So I moved the event handler function into the event loop (also the global check for 'Escape' to close the window or go back to title menu, depending on state). And now it works fine.
.. at first I just moved all the main functions into the loop, but realized that makes everything pause as long as there's no event (was kinda funny, the animations and progression always paused unless I kept moving the mouse) but then moved the parts not relevant to events back out ^^
Now everything works as intended, thanks!