X-Git-Url: https://scm.cri.ensmp.fr/git/minwii.git/blobdiff_plain/f96fb4a3b382ac97bcdfd86549f685b02ff7968a..7517f56335128e279a36a5d9336a4d5d790b32d6:/src/app/eventutils.py diff --git a/src/app/eventutils.py b/src/app/eventutils.py index c115c28..fda8154 100755 --- a/src/app/eventutils.py +++ b/src/app/eventutils.py @@ -29,6 +29,7 @@ $URL$ import types import pygame from StringIO import StringIO +from events import NOTEON class _EventDispatcher : def __init__(self) : @@ -44,8 +45,12 @@ class _EventDispatcher : events = pygame.event.get() for event in events : listeners = self.registry.get(event.type, []) + if event.type == NOTEON : + print len(listeners) for listener in listeners : listener(event) + def reset(self) : + self.registry = {} def __repr__(self) : out = StringIO()