That was too fast
authorStefano Rivera <stefano@rivera.za.net>
Sat, 17 May 2014 22:50:13 +0000 (00:50 +0200)
committerStefano Rivera <stefano@rivera.za.net>
Sat, 17 May 2014 22:50:13 +0000 (00:50 +0200)
naja/scenes/credits.py

index f967a72f96cdda0d00be5f1b038a97223678a8a6..b3fd4bd0c1c752ee58e7d13d78a948c9e67b8eb3 100644 (file)
@@ -6,7 +6,7 @@ Credits scene.
 import pygame
 import pygame.locals as pgl
 
-from naja.constants import KEYS
+from naja.constants import KEYS, FPS
 from naja.scenes.scene import Scene
 from naja.widgets.text import TextWidget, TextBoxWidget
 from naja.widgets.image_box import ImageBox
@@ -60,7 +60,7 @@ class CreditsScene(Scene):
     def render_scene(self, surface):
         if self.autoscroll is not None:
             self.autoscroll += 1
-        if self.autoscroll >= 24:
+        if self.autoscroll >= 1.5 * FPS:
             fake_event = pygame.event.Event(pgl.KEYDOWN, key=pgl.K_DOWN)
             self.credits.handle_event(fake_event)
             self.autoscroll = 0