- Fixed slow credits framerate by only drawing items that are on the screen
SVN-Revision: 5882
nn - Karl Ove Hufthammer
pl - Dominik Klementowski
pt - Ricardo Cruz
nn - Karl Ove Hufthammer
pl - Dominik Klementowski
pt - Ricardo Cruz
- ru - Constantin Baranov
+ ru - Constantin Baranov
this->screen_fade.reset(screen_fade);
nextpush = !nextpop;
nextpop = false;
this->screen_fade.reset(screen_fade);
nextpush = !nextpop;
nextpop = false;
float y = SCREEN_HEIGHT - scroll;
for(size_t i = 0; i < lines.size(); i++) {
float y = SCREEN_HEIGHT - scroll;
for(size_t i = 0; i < lines.size(); i++) {
- lines[i]->draw(context, Rect(LEFT_BORDER, y, SCREEN_WIDTH - 2*LEFT_BORDER, y), LAYER_GUI);
+ if (y + lines[i]->get_height() >= 0 && SCREEN_HEIGHT - y >= 0) {
+ lines[i]->draw(context, Rect(LEFT_BORDER, y, SCREEN_WIDTH - 2*LEFT_BORDER, y), LAYER_GUI);
+ }
+
y += lines[i]->get_height();
}
y += lines[i]->get_height();
}