[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Menu items in OS X?



On 2/10/07, Greg Ewing <greg.ewing@xxxxxxxxxxxxxxxx> wrote:
Nathan wrote:
> So does anyone know how to add menu-items under OS X?  All I really
> want to do is add a "Quit" option, so that when you press Command-q my
> game quits like every other program in OS X.

I don't think pygame provides any way of doing this.
You might be able to do something with PyObjC, but
I don't know how well that would fit in with the
pygame event mechanism.

It works fine.. you just post an event.

Pygame on MacOSX really should at least give you
a Quit menu item. The obvious thing would be for it
to generate a quit event like clicking the window
close box does.

IIRC, there is one and that's exactly what it does. What it doesn't give you is accelerator keys (e.g. cmd-Q) because SDL is stealing all of the keyboard input.

-bob