void additem(menu_item_type* pmenu_item);
void additem(MenuItemKind kind, char *text, int init_toggle, Menu* target_menu);
void action ();
+
+ /** Check, if the value of the active menu item has changed. */
int check ();
void draw ();
void draw_item(int index, int menu_width, int menu_height);
game_menu = new Menu();
highscore_menu = new Menu();
- main_menu->set_pos(screen->w/2, 350);
- main_menu->additem(MN_LABEL,"Main Menu",0,0);
- main_menu->additem(MN_HL,"",0,0);
+ main_menu->set_pos(screen->w/2, 335);
main_menu->additem(MN_ACTION,"Start Game",0,0);
main_menu->additem(MN_GOTO,"Load Game",0,load_game_menu);
main_menu->additem(MN_GOTO,"Options",0,options_menu);
main_menu->additem(MN_ACTION,"Level editor",0,0);
main_menu->additem(MN_ACTION,"Credits",0,0);
main_menu->additem(MN_ACTION,"Quit",0,0);
- main_menu->additem(MN_HL,"",0,0);
options_menu->additem(MN_LABEL,"Options",0,0);
options_menu->additem(MN_HL,"",0,0);
{
switch (main_menu->check())
{
- case 2:
+ case 0:
done = 0;
i = 0;
if(level_subsets.num_items != 0)
titletux.level_begin();
update_time = st_get_ticks();
break;
- case 3:
+ case 1:
update_load_save_game_menu(load_game_menu, true);
break;
- case 5:
+ case 3:
done = 1;
quit = leveleditor(1);
break;
- case 6:
+ case 4:
display_credits();
break;
- case 7:
+ case 5:
quit = 1;
break;
}