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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - uonder

Pages: [1]
1
System / Timer Callback
« on: March 30, 2011, 03:04:29 pm »
I am trying to create a program with a sliding menu...
if user clicks a button, or if she moves her mouse to the right of the window, a menu will appear in an animated fashion.


SDL has method for registering a user defined timer callback
SDL_AddTimer(UINT32 ,SDL_NewTimerCallback, void*)

So in SDL i managed to do it like this:

in event handler >
if button press
{
  start a timer
}
...
in timer callback >
if !end_of_animation
{
  update location of sliding menu in every timer callback
  paint/blit it to surface
}
else
 stop timer


Is there any way to do it in SFML in a similar manner?

Pages: [1]