iv been wondering, as i do, about the soya event system: initially in pyrex
it loops through all the events from SDL creating a list, then that list
is passed to the app, looped through again ( and possibly again with
pudding ( altho pudding does return a filtered list )).
im not exactly sure what would be better. pygame uses objects for events
wich is certainly easier to work with but i suppose a speed loss.
the other thing i thought of was to have a soya application object. so
you could do something like:
class MyApp(soya.Application):
def __init__(self):
# ...
def on_key_down(self, event):
# handle key press
def on_mouse_motion(self, event):
# handle mouse moventment
# ...
or even simpler and just send the event to a single on_event function.
im quite in favour of the application object because it would mean we
could loose some of the global pyrex variables hanging around which
cause me problems now and then when making my little pyrex extensions
outside of soya ( 'renderer' being the main one )
hrm, im sure there are plenty of holes in my ideas as usual,
dunk