You can make a simple task manager which should be updated every tick, like this:
3 std::list<ITask*> m_tasks;
9 for (std::list<ITask*>::iterator it = m_tasks.begin(); it != m_tasks.end(); it++)
13 AddTask(ITask* task)
Then you need the ITask:
virtual void VUpdate()=0;
Now you just inherit from the ITask interface all your future tasks:
: public ITask
for (std::list<ITask*>::iterator it = m_buttons.begin(); it != m_buttons.end(); it++)
(*it)->Animate(); //you need to define it yourself obviously. it should change the button's bitmap or increase counter or anything.
Now you create a new AnimateTask and add it to the task manager:
TaskManager* g_taskManager = new TaskManager;
You only need to insert the g_taskManager->Update(); into your main loop now so that it is executed every tick. This way you can execute your menu animation without interference with your other code.
Mind you, you can make other tasks this way, too.