There are plenty of basic game programming tutorials on the internet that tell you how to do this. Google 'rectangle collision' or something.
On Feb 17, 7:44 am, yoshi <[EMAIL PROTECTED]> wrote: > How can you check if the mouse is within the bounding box of an > image ? > > On Feb 16, 11:21 pm, "Drew Smathers" <[EMAIL PROTECTED]> wrote: > > > On Feb 16, 2008 7:37 AM, Zaka <[EMAIL PROTECTED]> wrote: > > > > Hi.I'm new in pyglat and python. I write my first code. And i have one > > > question how to write my animations when i click WSAD or other > > > buttons. > > > This has all the information you need: > > >http://pyglet.org/doc/programming_guide/image_sequences.html > > > There are plenty of examples in the pyglet source code (pyglet/examples) you > > can look at for inspiration as well. (Use the source Luke!) > > > And my other question. How to make graphic button i try make GUI. > > > Make a rectangle (glBegin(GL_QUADS) ... glEnd()) or load an image that looks > > like a button. In your mouse handler, check to see if you're inside the > > bounding box of the button when you've clicked. If you are, call a function > > associated with the button that does something interesting. > > > (If you're unimpressed, understand that pyglet is not high-level GUI toolkit > > with out-of-the box widgets, etc.) > > > Cheers, > > -- > > \\\\\/\"/\\\\\\\\\\\ > > \\\\/ // //\/\\\\\\\ > > \\\/ \\// /\ \/\\\\ > > \\/ /\/ / /\/ /\ \\\ > > \/ / /\/ /\ /\\\ \\ > > / /\\\ /\\\ \\\\\/\ > > \/\\\\\/\\\\\/\\\\\\ > > d.p.s --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pyglet-users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/pyglet-users?hl=en -~----------~----~----~----~------~----~------~--~---
