Re: [AD] mouse_api branch

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


On 2006-08-27, Peter Hull <peterhull90@xxxxxxxxxx> wrote:
> On 8/27/06, Peter Wang <tjaden@xxxxxxxxxx> wrote:
> > On 2006-08-26, Peter Hull <peterhull90@xxxxxxxxxx> wrote:
> > > On 8/26/06, Robert Ohannessian <ROhannessian@xxxxxxxxxx> wrote:
> > > > For any game where mouse movements are used, not having events generated
> > > > when the mouse is outside the window will make it very annoying for
> > > > users.
> > > Right - the demo game for OpenLayer is a case in point.
> >
> > This is about FPS-style games which require infinite movement in any
> > direction, right?  That requires not just mouse events when outside the
> > window, but the mouse should not be allowed to leave the window,
> > otherwise you couldn't click to fire.
> For the movement, I suppose you would use the dx, dy values. I don't
> know about clicks. On OS X, the front window gets all mouse events
> regardless of whether the pointer is over that window or not.

If you click outside, wouldn't that focus another window?

> 
> > I don't like the set_range() functions at all, as I'm not sure what it
> > should do in a windowing environment.
> >
> OK, whatever. Something like what's listed in the Allegro 5 document
> would be OK. In pseudo-code, something like
> void movement_handler()
> {
>  if (mouse_within_window || mouse_is_grabbed)
>  {
>    generate_allegro_event();
>  }
> }
> ?

Sure.

Peter





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