Placeholder for player_id
authormathnerd314 <mathnerd314@837edb03-e0f3-0310-88ca-d4d4e8b29345>
Sun, 7 Mar 2010 23:38:41 +0000 (23:38 +0000)
committermathnerd314 <mathnerd314@837edb03-e0f3-0310-88ca-d4d4e8b29345>
Sun, 7 Mar 2010 23:38:41 +0000 (23:38 +0000)
git-svn-id: http://supertux.lethargik.org/svn/supertux/trunk/supertux@6573 837edb03-e0f3-0310-88ca-d4d4e8b29345

src/supertux/player_status.cpp

index b1e5090..79f6a64 100644 (file)
@@ -132,6 +132,7 @@ PlayerStatus::read(const Reader& lisp)
 void
 PlayerStatus::draw(DrawingContext& context)
 {
+  int player_id = 0;
 
   if ((displayed_coins == DISPLAYED_COINS_UNSET) ||
       (fabsf(displayed_coins - coins) > 100)) {
@@ -156,10 +157,16 @@ PlayerStatus::draw(DrawingContext& context)
   {
     context.draw_surface(coin_surface, 
                          Vector(SCREEN_WIDTH - BORDER_X - coin_surface->get_width() - Resources::fixed_font->get_text_width(coins_text), 
-                                BORDER_Y + 1),
+                                BORDER_Y + 1 + Resources::fixed_font->get_text_height(coins_text) + 5) * player_id),
                          LAYER_HUD);
   }
-  context.draw_text(Resources::fixed_font, coins_text, Vector(SCREEN_WIDTH - BORDER_X, BORDER_Y), ALIGN_RIGHT, LAYER_HUD, PlayerStatus::text_color);
+  context.draw_text(Resources::fixed_font, 
+                    coins_text, 
+                    Vector(SCREEN_WIDTH - BORDER_X - Resources::fixed_font->get_text_width(coins_text),
+                           BORDER_Y + (Resources::fixed_font->get_text_height(coins_text) + 5) * player_id),
+                    ALIGN_LEFT,
+                    LAYER_HUD,
+                    PlayerStatus::text_color);
 
   context.pop_transform();
 }