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

[pygame] Pygame + wxPython questions



After fiddling around I'm able to get pygame and wxPython to work together,
mostly by following the tips on the wxPython wiki.  However, the wxPanel
that I have pygame take control of doesn't let (most) mouse events get
through to wx, although wx's events work fine for other wxWindow derived
things.

I'm using Python 2.3.3, pygame 1.6, and wxPython 2.4 on Windows XP, but also
want to run elsewhere.

I can see how to kick off a parallel thread and poll pygame events, but I
have a turn based gam, and would much rather use wx events so I can avoid
busy waiting, threading, etc.  I just want to let wx discern where the mouse
is over my pygame panel!


Does anyone have an idea how to go about this?  Is there some way to stop
pygame from handling events?  Is there some tranparent wx control I can lay
over the top to catch events?   Am I stuck manipulating undisplayed pygame
surfaces, and then exporting them as a bitmap for wx?  Or should I just use
PIL instead of pygame, and wrangle with getting openGL to work in wxPython?

I'm very tempted to use either pyui or pygameui instead of wx, but
unfortunately neither are very stable or widely used, nor do they have
layout tools.  On the other hand they aren't laden with wx's C-ish style,
lack of transparency, etc...

-Jasper