projects
/
supertux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
22a1e0b
)
Scale credits background image to whole screen size
author
Tobias Markus
<tobbi@mozilla-uk.org>
Sun, 17 Aug 2014 15:11:24 +0000
(17:11 +0200)
committer
Tobias Markus
<tobbi@mozilla-uk.org>
Sun, 17 Aug 2014 15:11:24 +0000
(17:11 +0200)
src/supertux/textscroller.cpp
patch
|
blob
|
history
diff --git
a/src/supertux/textscroller.cpp
b/src/supertux/textscroller.cpp
index
02ffced
..
17b848e
100644
(file)
--- 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++) {