Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: sf::Clock start() and stop() functions  (Read 4309 times)

0 Members and 1 Guest are viewing this topic.

Edoren

  • Newbie
  • *
  • Posts: 3
    • View Profile
sf::Clock start() and stop() functions
« on: April 13, 2014, 02:09:51 am »
Hi  :),
I think that it will be really useful if you can stop and start the sf::Clock, I have implemented what I say https://github.com/edoren/SFML/commit/bbf03755be1d041aaffac01f4eca873d173bf359, just tell me to make a pull request :D. So, what do you think guys?.

Mario

  • SFML Team
  • Hero Member
  • *****
  • Posts: 879
    • View Profile
Re: sf::Clock start() and stop() functions
« Reply #1 on: April 13, 2014, 08:44:08 am »
Added comments to the commit. I'd think again about the names for those members. :)

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: sf::Clock start() and stop() functions
« Reply #2 on: April 13, 2014, 10:28:49 am »
This has already been discussed before.

It's implemented in the Thor library if you want ;)
Laurent Gomila - SFML developer

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Re: sf::Clock start() and stop() functions
« Reply #3 on: April 13, 2014, 10:40:32 am »
See here for more information :)
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

Edoren

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: sf::Clock start() and stop() functions
« Reply #4 on: April 15, 2014, 02:33:54 am »
This has already been discussed before.
Where?, I searched before posting and I couldn't find any related post, sorry if it's duplicated :-\.

It's implemented in the Thor library if you want ;)
Yes, but it will be more useful if we can do this without using any external library, I think SFML can provide this functionality without problem.

I think I have to change the names, start() to resume() and stop() to pause(), as Mario said those current names are a little confusing.
« Last Edit: April 15, 2014, 02:45:11 am by Edoren »

Rosme

  • Full Member
  • ***
  • Posts: 169
  • Proud member of the shoe club
    • View Profile
    • Code-Concept
Re: sf::Clock start() and stop() functions
« Reply #5 on: April 15, 2014, 04:53:14 pm »
Nothing prevents you from making this and putting it in the wiki. It's not a complicated thing, and in any case, Thor provides this. It is after all an SFML extension.
GitHub
Code Concept
Twitter
Rosme on IRC/Discord