Re: [AD] various questions about events (4.3)

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On 5/7/07, Peter Wang <novalazy@xxxxxxxxxx> wrote:
It's currently limited to the built-in ones.  User-defined events could
be added.

I thought it might be useful, especially for add-ons. For instance,
the enet networking library uses its own event system. It wouldn't be
too hard to make it work with Allegro's. (Not that I'm suggesting this
particular example would be useful; it's just the first thing that I
thought of.)

Yes, it's limited to 32 due to the event masks.  I'm not sure that the
event masks weren't a premature optimisation on my part so maybe we
should remove them?

If I had to pick between more than 32 event types or masking, I'd go
with the extra event types - especially in light of user events.

If necessary for optimization, I think filtering could be implemented
by simply not generating the event. (If that makes any sense.)

We've provided querying-type input methods as well.  e.g. you can get
input via al_get_keyboard_state() + al_key_down() or
al_get_mouse_state(), etc.

That's good then. I had forgotten about those functions.

And maybe I've just spent too much time writing web apps, but
AL_EVENT_MOUSE_MOVE seems like a nicer name than AL_EVENT_MOUSE_AXES.
Most of the other events are actions, which is a good thing. Along
those lines, AL_EVENT_TIMER could be AL_EVENT_TICK. But anyway, I'm
just thinking out loud now.

--
Matthew Leverton




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/