My first bug…
Good god, not a single couple hours in and I just have myself a frigging bug.
Apparently, mousePressed’s are way too fast to be used for button handling.
I don’t wanna implement mouseReleased, I ain’t got time for this and mouseReleased is for wimps!
Comments
Viscis
20. Aug 2011 · 03:08 UTC
The trick is to process the mousePressed once per game loop. So the mousePressed sets a boolean to true (wasMousePressed = true) and the game loop checks (once per frame) if it has changed and resets it.