From: Tobias Markus Date: Sun, 17 Aug 2014 15:11:24 +0000 (+0200) Subject: Scale credits background image to whole screen size X-Git-Url: https://git.octo.it/?a=commitdiff_plain;h=f385db90dcb9888695e012f4f2f54e6f145c1023;p=supertux.git Scale credits background image to whole screen size --- 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++) {