Contains the gui2 timer routines. More...
Go to the source code of this file.
Namespaces | |
gui2 | |
A class inherited from ttext_box that displays its input as stars. | |
Functions | |
size_t | gui2::add_timer (const Uint32 interval, const std::function< void(size_t id)> &callback, const bool repeat=false) |
Adds a new timer. More... | |
bool | gui2::remove_timer (const size_t id) |
Removes a timer. More... | |
bool | gui2::execute_timer (const size_t id) |
Executes a timer. More... | |
Contains the gui2 timer routines.
This code avoids the following problems with the sdl timers:
With these functions it's possible to remove the event between pushing in the queue and the actual execution. Since the callback is a std::function object it's possible to make the callback as fancy as wanted.
Definition in file timer.hpp.