X-Git-Url: https://scm.cri.mines-paristech.fr/git/minwii.git/blobdiff_plain/0adb475173e22229c0eb5c6c79b8a8488894b7c9..4c4732c6ed8cb0aaa70fb2d4c6e5a958868c5349:/src/app/events.py diff --git a/src/app/events.py b/src/app/events.py index eee6445..a67a416 100755 --- a/src/app/events.py +++ b/src/app/events.py @@ -1,8 +1,7 @@ import pygame from sys import modules -events = ['TIMEOUT', - 'NOTEON', +events = ['NOTEON', 'NOTEOFF', 'NOTEEND', 'COLDOWN', @@ -14,7 +13,7 @@ eventNames = {} self = modules[__name__] for i, name in enumerate(events) : - eventType = pygame.USEREVENT+i + eventType = pygame.USEREVENT + 1 + i eventNames[eventType] = name setattr(self, name, eventType) @@ -41,3 +40,5 @@ pygame_events = [ for name in pygame_events : eventNames[getattr(pygame, name)] = name + +eventCodes = dict([v, k] for k, v in eventNames.items())