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
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