Update of /cvsroot/super-tux/supertux/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2303/src
Modified Files:
gameloop.cpp
Log Message:
Tweaked pause level name text.
Would be neat if the draw_text() at DrawingContext would allow formatted text. Would just need a parser, and would avoid all these hacks.
Index: gameloop.cpp
===================================================================
RCS file: /cvsroot/super-tux/supertux/src/gameloop.cpp,v
retrieving revision 1.151
retrieving revision 1.152
diff -u -d -r1.151 -r1.152
--- gameloop.cpp 9 Jun 2004 17:32:49 -0000 1.151
+++ gameloop.cpp 10 Jun 2004 13:54:20 -0000 1.152
@@ -522,6 +522,18 @@
Color(rand() % 50, rand() % 50, rand() % 50, 128), LAYER_FOREGROUND1);
context->draw_text_center(blue_text, _("PAUSE - Press 'P' To Play"),
Vector(0, 230), LAYER_FOREGROUND1+2);
+
+ char str1[60];
+ char str2[124];
+ sprintf(str1, _("Playing: "));
+ sprintf(str2, level->name.c_str());
+
+ context->draw_text(blue_text, str1,
+ Vector((screen->w - (blue_text->get_text_width(str1) + white_text->get_text_width(str2)))/2, 340),
+ LAYER_FOREGROUND1+2);
+ context->draw_text(white_text, str2,
+ Vector(((screen->w - (blue_text->get_text_width(str1) + white_text->get_text_width(str2)))/2)+blue_text->get_text_width(str1), 340),
+ LAYER_FOREGROUND1+2);
}
if(Menu::current())
@@ -746,14 +758,6 @@
Vector(screen->w - white_text->get_text_width(_("LIVES")) - white_text->get_text_width(" 99"), 20),
LAYER_FOREGROUND1);
- if(game_pause)
- {
- sprintf(str, _("Playing: %s"), level->name.c_str());
-
- context.draw_text(white_text, str, Vector(0,20),
- LAYER_FOREGROUND1);
- }
-
if(show_fps)
{
sprintf(str, "%2.1f", fps_fps);
|