Update of /cvsroot/super-tux/supertux/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14781/src
Modified Files:
leveleditor.cpp
Log Message:
Bugfix: don't show weird number when level editing a level feed from the command line.
Index: leveleditor.cpp
===================================================================
RCS file: /cvsroot/super-tux/supertux/src/leveleditor.cpp,v
retrieving revision 1.152
retrieving revision 1.153
diff -u -d -r1.152 -r1.153
--- leveleditor.cpp 8 Oct 2004 11:07:38 -0000 1.152
+++ leveleditor.cpp 8 Oct 2004 12:19:05 -0000 1.153
@@ -215,7 +215,10 @@
DrawingContext context;
if(!filename.empty())
+ {
+ level_nb = -1;
load_level(filename);
+ }
else
Menu::set_current(main_menu);
@@ -553,9 +556,12 @@
if(level_name_timer.check())
{
context.draw_text(gold_text, level.name, Vector(screen->w/2, 30), CENTER_ALLIGN, LAYER_GUI);
- char str[128];
- sprintf(str, "%i/%i", level_nb+1, level_subset.get_num_levels());
- context.draw_text(gold_text, str, Vector(screen->w/2, 50), CENTER_ALLIGN, LAYER_GUI);
+ if(level_nb != -1)
+ {
+ char str[128];
+ sprintf(str, "%i/%i", level_nb+1, level_subset.get_num_levels());
+ context.draw_text(gold_text, str, Vector(screen->w/2, 50), CENTER_ALLIGN, LAYER_GUI);
+ }
}
if(sector)
context.draw_text(white_small_text, _("F1 for help"), Vector(5, 510), LEFT_ALLIGN, LAYER_GUI-10);
|