From: LMH Date: Sat, 7 Sep 2013 06:58:16 +0000 (-1000) Subject: Level into screen will now display target time if defined for level X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=0d9adb6170eb64bae7cae9fdc426daf8e99d64d9;p=supertux.git Level into screen will now display target time if defined for level --- diff --git a/src/supertux/levelintro.cpp b/src/supertux/levelintro.cpp index 98d854452..f81d6539c 100644 --- a/src/supertux/levelintro.cpp +++ b/src/supertux/levelintro.cpp @@ -133,7 +133,14 @@ LevelIntro::draw(DrawingContext& context) { std::stringstream ss; - ss << _("Time") << ": " << Statistics::time_to_string((best_level_statistics && (best_level_statistics->coins >= 0)) ? best_level_statistics->time : 0); + ss << _("Best time") << ": " << Statistics::time_to_string((best_level_statistics && (best_level_statistics->coins >= 0)) ? best_level_statistics->time : 0); + context.draw_center_text(Resources::normal_font, ss.str(), Vector(0, py), LAYER_FOREGROUND1,LevelIntro::stat_color); + py += static_cast(Resources::normal_font->get_height()); + } + + if(level->target_time){ + std::stringstream ss; + ss << _("Level target time") << ": " << Statistics::time_to_string(level->target_time); context.draw_center_text(Resources::normal_font, ss.str(), Vector(0, py), LAYER_FOREGROUND1,LevelIntro::stat_color); py += static_cast(Resources::normal_font->get_height()); }