Now the growings animation looks pretty cool :)
[supertux.git] / src / worldmap.cpp
index 5a52357..ea37ab4 100644 (file)
@@ -33,6 +33,7 @@
 #include "worldmap.h"
 #include "sound_manager.h"
 #include "resources.h"
+#include "gettext.h"
 
 namespace WorldMapNS {
 
@@ -720,14 +721,14 @@ WorldMap::update(float delta)
                   context.draw_gradient(Color (0, 255, 0), Color (255, 0, 255),
                       LAYER_BACKGROUND0);
 
-                  context.draw_text_center(blue_text, "GAMEOVER"
+                  context.draw_text_center(blue_text, _("GAMEOVER")
                       Vector(0, 200), LAYER_FOREGROUND1);
 
-                  sprintf(str, "SCORE: %d", player_status.score);
+                  sprintf(str, _("SCORE: %d"), player_status.score);
                   context.draw_text_center(gold_text, str,
                       Vector(0, 224), LAYER_FOREGROUND1);
 
-                  sprintf(str, "COINS: %d", player_status.distros);
+                  sprintf(str, _("COINS: %d"), player_status.distros);
                   context.draw_text_center(gold_text, str,
                       Vector(0, screen->w - 32), LAYER_FOREGROUND1);
 
@@ -844,28 +845,25 @@ void
 WorldMap::draw_status(DrawingContext& context)
 {
   char str[80];
-  sprintf(str, "%d", player_status.score);
+  sprintf(str, " %d", player_status.score);
 
-  context.draw_text(white_text, "SCORE", Vector(0, 0), LAYER_FOREGROUND1);
+  context.draw_text(white_text, _("SCORE"), Vector(0, 0), LAYER_FOREGROUND1);
   context.draw_text(gold_text, str, Vector(96, 0), LAYER_FOREGROUND1);
 
   sprintf(str, "%d", player_status.distros);
-  context.draw_text(white_text, "COINS", Vector(screen->w/2 - 16*5, 0),
+  context.draw_text(white_text, _("COINS"), Vector(screen->w/2 - 16*5, 0),
       LAYER_FOREGROUND1);
   context.draw_text(gold_text, str, Vector(screen->w/2 + (16*5)/2, 0),
         LAYER_FOREGROUND1);
 
-  context.draw_text(white_text, "LIVES",
-      Vector(screen->w - white_text->get_text_width("LIVES")*2, 0),
-      LAYER_FOREGROUND1);
   if (player_status.lives >= 5)
     {
       sprintf(str, "%dx", player_status.lives);
       context.draw_text(gold_text, str, 
           Vector(screen->w - gold_text->get_text_width(str) - tux_life->w, 0),
           LAYER_FOREGROUND1);
-      context.draw_surface(tux_life, Vector(screen->w - gold_text->w, 0),
-          LAYER_FOREGROUND1);
+      context.draw_surface(tux_life, Vector(screen->w -
+            gold_text->get_text_width("9"), 0), LAYER_FOREGROUND1);
     }
   else
     {
@@ -874,6 +872,9 @@ WorldMap::draw_status(DrawingContext& context)
             Vector(screen->w - tux_life->w*4 + (tux_life->w*i), 0),
             LAYER_FOREGROUND1);
     }
+  context.draw_text(white_text, _("LIVES"),
+      Vector(screen->w - white_text->get_text_width(_("LIVES")) - white_text->get_text_width("   99"), 0),
+      LAYER_FOREGROUND1);
 
   if (!tux->is_moving())
     {
@@ -887,7 +888,7 @@ WorldMap::draw_status(DrawingContext& context)
 
               context.draw_text(white_text, i->title, 
                   Vector(screen->w/2 - white_text->get_text_width(i->title)/2,
-                         screen->h - white_text->get_height() - 50),
+                         screen->h - white_text->get_height() - 30),
                   LAYER_FOREGROUND1);
               break;
             }