Re: [AD] various questions about events (4.3) |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On 2007-05-07, Matthew Leverton <meffer@xxxxxxxxxx> wrote:
> I've been familarizing myself with the 4.3 stuff recently. I haven't
> really kept up on any of it, so I don't know much about the changes. I
> have some simple questions regarding events:
>
> * Can users create their own event sources or is it limited to built-in ones?
It's currently limited to the built-in ones. User-defined events could
be added.
> * Can there only ever be 32 different event types? (It looks like they
> are masks.)
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?
> * What do mouse.dx, mouse.dy, and mouse.dz represent?
Differences since the last mouse event that was generated.
>
> * Are events the only official way to get input?
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. They are listed in the naturaldocs.
> For instance, is
> key[] considered to be in the compatibility layer?
key[] is part of the compatibility layer, yes.
> I just ask because
> events can be both useful and unwieldy, depending on the situation.
That's true but the querying functions should handle most other cases.
We don't have a simple equivalent of the keyboard buffer, though.
In the past the idea was that we would add convenience routines on top
of the events system. It might happen yet :)
Peter