Update of /cvsroot/super-tux/supertux/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv368/src
Modified Files:
menu.cpp menu.h setup.cpp title.cpp
Log Message:
confirm_dialog now accepts a background, instead of doing the screen capture hack.
Index: menu.cpp
===================================================================
RCS file: /cvsroot/super-tux/supertux/src/menu.cpp,v
retrieving revision 1.75
retrieving revision 1.76
diff -u -d -r1.75 -r1.76
--- menu.cpp 31 May 2004 02:40:30 -0000 1.75
+++ menu.cpp 31 May 2004 23:47:05 -0000 1.76
@@ -65,10 +65,8 @@
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;
@@ -80,6 +78,8 @@
Menu::set_current(dialog);
+ DrawingContext context;
+
while(true)
{
SDL_Event event;
@@ -89,9 +89,9 @@
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())
@@ -112,11 +112,11 @@
break;
}
- mouse_cursor->draw();
- flipscreen();
+ mouse_cursor->draw(context);
+ context.do_drawing();
SDL_Delay(25);
}
-#endif
+
return false;
}
Index: title.cpp
===================================================================
RCS file: /cvsroot/super-tux/supertux/src/title.cpp,v
retrieving revision 1.91
retrieving revision 1.92
diff -u -d -r1.91 -r1.92
--- title.cpp 31 May 2004 02:40:30 -0000 1.91
+++ title.cpp 31 May 2004 23:47:05 -0000 1.92
@@ -322,7 +322,7 @@
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);
Index: setup.cpp
===================================================================
RCS file: /cvsroot/super-tux/supertux/src/setup.cpp,v
retrieving revision 1.90
retrieving revision 1.91
diff -u -d -r1.90 -r1.91
--- setup.cpp 31 May 2004 22:13:15 -0000 1.90
+++ setup.cpp 31 May 2004 23:47:05 -0000 1.91
@@ -508,7 +508,7 @@
}
// 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
Index: menu.h
===================================================================
RCS file: /cvsroot/super-tux/supertux/src/menu.h,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -d -r1.64 -r1.65
--- menu.h 30 May 2004 01:08:49 -0000 1.64
+++ menu.h 31 May 2004 23:47:05 -0000 1.65
@@ -93,7 +93,7 @@
MNID_APPLY
};
-bool confirm_dialog(std::string text);
+bool confirm_dialog(Surface* background, std::string text);
/* Kinds of menu items */
enum MenuItemKind {
|