1
General discussions / Re: SFML 3 - What is your vision?
« on: April 25, 2014, 01:07:37 pm »* a technique to insert an event (example: my_triple_mouse_click) to the event loopWhy would you need that? You can easily have a custom event queue on top of SFML's...
There is a little overhead in adding an own event queue. Just call window.pushEvent(myEvent) would be nice.
* timer eventsCan you elaborate?
Lets say, you would like to close a window after some seconds, check for network after some time, save a game state on disk every hour and so on. I know, that these things can be done by a thread or checking for the clock every iteration. But I think, that would by a nice to have.
// start timer numer 3, just once after 60 ms
timer3.start(60, false);
...
if (event.type == sf::Event::Closed)
window.close();
else if(event.type == sf::Event::Timer)
{
// which timer?
// do something
}
...