From 73db66cb714b1f2cf8a45c8bd3a3597bde68c9bf Mon Sep 17 00:00:00 2001 From: LMH Date: Fri, 6 Sep 2013 20:58:16 -1000 Subject: [PATCH] Level into screen will now display target time if defined for level --- src/supertux/levelintro.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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()); } -- 2.11.0