2 from sys
import modules
13 self
= modules
[__name__
]
15 for i
, name
in enumerate(events
) :
16 eventType
= pygame
.USEREVENT
+ 1 + i
17 eventNames
[eventType
] = name
18 setattr(self
, name
, eventType
)
41 for name
in pygame_events
:
42 eventNames
[getattr(pygame
, name
)] = name
44 eventCodes
= dict([v
, k
] for k
, v
in eventNames
.items())