From f385db90dcb9888695e012f4f2f54e6f145c1023 Mon Sep 17 00:00:00 2001 From: Tobias Markus Date: Sun, 17 Aug 2014 17:11:24 +0200 Subject: [PATCH] Scale credits background image to whole screen size --- src/supertux/textscroller.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/supertux/textscroller.cpp b/src/supertux/textscroller.cpp index 02ffced66..17b848ea5 100644 --- a/src/supertux/textscroller.cpp +++ b/src/supertux/textscroller.cpp @@ -121,7 +121,9 @@ TextScroller::draw(DrawingContext& context) { context.draw_filled_rect(Vector(0, 0), Vector(SCREEN_WIDTH, SCREEN_HEIGHT), Color(0.6f, 0.7f, 0.8f, 0.5f), 0); - context.draw_surface(background, Vector(SCREEN_WIDTH/2 - background->get_width()/2 , SCREEN_HEIGHT/2 - background->get_height()/2), 0); + context.draw_surface_part(background, Rectf(0, 0, background->get_width(), background->get_height()), + Rectf(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT), 0); + float y = SCREEN_HEIGHT - scroll; for(size_t i = 0; i < lines.size(); i++) { -- 2.11.0