You could use one of the various Rect classes that are around (there's one
in cocos2d) which know how to test for hits inside the rect. Or just write
one yourself.


On 21 February 2014 06:39, dylan grant <[email protected]> wrote:

> I am working on making buttons for a project in pyglet but have no idea
> how to make them, i would like to make it in between these coordinates.
>
> on_mouse_press(x=365, y=187, dx=0, dy=0)
> on_mouse_press(x=341, y=179, button='LEFT', modifiers=)
>
> on_mouse_press(x=116, y=224, button='LEFT', modifiers=)
> on_mouse_press(x=291, y=22, button='LEFT', modifiers=)
>
> on_mouse_press(x=398, y=335, button='LEFT', modifiers=)
> on_mouse_press(x=394, y=198, button='LEFT', modifiers=)
>
> Any Ideas on how to do this?
>
> --
> You received this message because you are subscribed to the Google Groups
> "pyglet-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/pyglet-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pyglet-users.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to