Menu* Menu::current_ = 0;
/* just displays a Yes/No text that can be used to confirm stuff */
-bool confirm_dialog(std::string text)
+bool confirm_dialog(Surface *background, std::string text)
{
- // TODO
-#if 0
//Surface* cap_screen = Surface::CaptureScreen();
Menu* dialog = new Menu;
Menu::set_current(dialog);
+ DrawingContext context;
+
while(true)
{
SDL_Event event;
dialog->event(event);
}
- //cap_screen->draw(0,0);
+ context.draw_surface(background, Vector(0,0), LAYER_BACKGROUND0);
- dialog->draw();
+ dialog->draw(context);
dialog->action();
switch (dialog->check())
break;
}
- mouse_cursor->draw();
- flipscreen();
+ mouse_cursor->draw(context);
+ context.do_drawing();
SDL_Delay(25);
}
-#endif
+
return false;
}
MNID_APPLY
};
-bool confirm_dialog(std::string text);
+bool confirm_dialog(Surface* background, std::string text);
/* Kinds of menu items */
enum MenuItemKind {
}
// shrink_fade(Point((screen->w/2),(screen->h/2)), 1000);
- fadeout(200);
+ fadeout(256);
WorldMapNS::WorldMap worldmap;
// Load the game or at least set the savegame_file variable
char str[1024];
sprintf(str,"Are you sure you want to delete slot %d?", slot);
- if(confirm_dialog(str))
+ if(confirm_dialog(bkg_title, str))
{
sprintf(str,"%s/slot%d.stsg", st_save_dir, slot);
printf("Removing: %s\n",str);