SFML community forums
Help => General => Topic started by: Gus Gus on March 21, 2016, 04:29:31 pm
-
Hello everyone,
I'm working on a very small project on SFML, where I spawn square shapes in the render window using left mouse button. However, I have been trying for days to find a way to assign the R button for basically erase or destroy every object on the render window and start again. basically a restart button , without being forced to close the render window.
I appreciate your help:).
-
Wouldn't that be as simple as; 0. Detect a RMB down event. 1. clear() the screen (which you should be doing every frame anyway). 2. Clear the container holding the objects you draw every frame.
??
-
[instruction list starting with zero]
You've been coding too long ;)
-
[instruction list starting with zero]
You've been coding too long ;)
This is a problem if you are a Lua programmer. ::)
..Just saying.