Allow arrow keys to speed up/reverse the scrolling of the statistics.

This commit is contained in:
Guus Sliepen 2012-03-11 17:52:10 +01:00
parent 76a1507c1b
commit 8ebc96b97c
1 changed files with 8 additions and 1 deletions

View File

@ -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);
}