quit = 1;
else if(show_menu)
{
+ menu_set_current(&game_menu);
show_menu = 0;
st_pause_ticks_stop();
}
timer_init(&frame_timer);
fps_cnt = 0;
+ while (SDL_PollEvent(&event))
+ {}
+
game_draw();
do
{
int menu_change;
texture_type checkbox, checkbox_checked, back;
-menu_type main_menu, game_menu, options_menu, leveleditor_menu, highscore_menu, load_game_menu;
+menu_type main_menu, game_menu, options_menu, leveleditor_menu, highscore_menu, load_game_menu, save_game_menu;
menu_type* current_menu, * last_menu;
/* input implementation variables */
else if(pmenu->item[i].kind == MN_LABEL)
{
text_drawf(&gold_text,pmenu->item[i].text,0,(i)*24 - menu_height/2 + 10,A_HMIDDLE, A_VMIDDLE,2,NO_UPDATE);
- fillrect(screen->w/2 - menu_width/2,(i)*24 - menu_height/2 + 28,menu_width,2,150,150,150,100);
+ fillrect(screen->w/2 - menu_width/2,(i)*24 - menu_height/2 + 20 + screen->h /2,menu_width,2,190,190,190,100);
}
else if(pmenu->item[i].kind == MN_TEXTFIELD)
{
extern int menu_change;
extern texture_type checkbox, checkbox_checked, back;
-extern menu_type main_menu, game_menu, options_menu, leveleditor_menu, highscore_menu, load_game_menu;
+extern menu_type main_menu, game_menu, options_menu, leveleditor_menu, highscore_menu, load_game_menu, save_game_menu;;
extern menu_type* current_menu, * last_menu;
/* input implementation variables */
menu_init(&load_game_menu);
menu_additem(&load_game_menu,menu_item_create(MN_LABEL,"Load Game",0,0));
+ menu_init(&save_game_menu);
+ menu_additem(&save_game_menu,menu_item_create(MN_LABEL,"Save Game",0,0));
+
menu_init(&game_menu);
menu_additem(&game_menu,menu_item_create(MN_ACTION,"Return To Game",0,0));
- menu_additem(&game_menu,menu_item_create(MN_ACTION,"Save Game",0,0));
+ menu_additem(&game_menu,menu_item_create(MN_ACTION,"Save Game",0,&save_game_menu));
menu_additem(&game_menu,menu_item_create(MN_GOTO,"Load Game",0,&load_game_menu));
menu_additem(&game_menu,menu_item_create(MN_GOTO,"Options",0,&options_menu));
menu_additem(&game_menu,menu_item_create(MN_ACTION,"Quit Game",0,0));