From 8ebc96b97cd365461d901fac38cdf17f7ccf1fd0 Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Sun, 11 Mar 2012 17:52:10 +0100 Subject: [PATCH] Allow arrow keys to speed up/reverse the scrolling of the statistics. --- code/intermission.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/code/intermission.cpp b/code/intermission.cpp index c5f7986..e9322f9 100644 --- a/code/intermission.cpp +++ b/code/intermission.cpp @@ -312,11 +312,18 @@ list is reset and the information lines begin again from the bottom */ static void showStatus(SDL_Surface *infoSurface) { + float speed = 0.25; + + if(engine.keyState[SDLK_DOWN]) + speed = 1; + else if(engine.keyState[SDLK_UP]) + speed = -1; + blit(infoSurface, 100, 80); for (int i = 0 ; i < 22 ; i++) { - textShape[i].y -= 0.25; + textShape[i].y -= speed; if ((textShape[i].y > 80) && (textShape[i].y < 400)) blitText(i); }