if(Menu::current())
{
- menu_process_current();
+ Menu::current()->action();
+ Menu::current()->draw();
mouse_cursor->draw();
}
sprintf(str, "%d", hs_score);
yellow_nums->draw(str, 350, 170, 1, NO_UPDATE);
- menu_process_current();
+ Menu::current()->action();
+ Menu::current()->draw();
+
flipscreen();
while(SDL_PollEvent(&event))
if(Menu::current())
{
- menu_process_current();
+ Menu::current()->action();
+ Menu::current()->draw();
+
if(Menu::current() == leveleditor_menu)
{
switch (leveleditor_menu->check())
}
}
-/* --- MENU --- */
-/* Draw the current menu and execute the (menu)events */
-void menu_process_current()
-{
- if(Menu::current())
- {
- Menu::current()->action();
- Menu::current()->draw();
- }
-}
-
/* Check for menu event */
void
Menu::event(SDL_Event& event)
extern Menu* load_game_menu;
extern Menu* save_game_menu;
-/* "Calculate" and draw the menu */
-void menu_process_current(void);
-
#endif /*SUPERTUX_MENU_H*/
/* Local Variables: */
/* Don't draw menu, if quit is true */
if(!done)
- menu_process_current();
+ {
+ Menu::current()->action();
+ Menu::current()->draw();
+ }
if(Menu::current() == main_menu)
{
if(Menu::current())
{
- menu_process_current();
+ Menu::current()->action();
+ Menu::current()->draw();
mouse_cursor->draw();
}
flipscreen();