1
Feature requests / Pausable clock...?
« on: September 23, 2015, 07:32:54 pm »
There have been already a couple of discussions on this, but none has a definitive answer, so I'm proposing this again.
I think the sf::Clock class would greatly benefit from a pause() and resume() method, since more often than not games can be paused and resumed as well, and this usually needs some internal timers to be paused when the game pauses and resumed later.
Of course, one can use a third party implementation - and it's pretty trivial to implement this by oneself - but having a standard API would be a better option.
Adding these two method would not break compatibility, but if sf::Clock is not to be changed, a new class could be added with the same interface as sf::Clock plus these methods.
(If API change is problematic, this may be considered for SFML 3)
I think the sf::Clock class would greatly benefit from a pause() and resume() method, since more often than not games can be paused and resumed as well, and this usually needs some internal timers to be paused when the game pauses and resumed later.
Of course, one can use a third party implementation - and it's pretty trivial to implement this by oneself - but having a standard API would be a better option.
Adding these two method would not break compatibility, but if sf::Clock is not to be changed, a new class could be added with the same interface as sf::Clock plus these methods.
(If API change is problematic, this may be considered for SFML 3)