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?