I'm making a game that needs to be able to pop up gui elements within a pygame surface. This question isn't what I want because wxPython goes around the SDL surface, not inside it. So far I've only seen ocemp, pgu, and GooeyPy in this problem space.
So my question to you, SO, is this: What gui toolkit should I use for making pretty clickable buttons pop up in your pygame applications? Are there any in active development?
Edit, September 2011
It looks like PGU is still being maintained. The last commits are from 4 days ago.
PYGAME and TKINTER in HARMONY. Despite what is said on some forums, Tkinter, the middle weight python GUI, works quite well in conjunction with pygame, the python SDL layer - at least when pygame is not in full screen mode. Pygame has been used as the graphics/media engine for many serious application (eg.
First, tkinter is definitely not the best GUI toolkit for python. It's one of the simplest and usually comes with the python interpreter. But it's not as powerful as Qt, wx or Gtk. pygame is - as it's name states - a package designed to allow to create games in python very easily, not to create GUIs.
Pygame GUI is a module to help you make graphical user interfaces for games written in pygame. The module is firmly forward looking and is designed to work on Pygame 2 and Python 3.
quit() is a function that closes pygame (python still running) While pygame. QUIT just checks if pygame is running or not. I put pygame. quit() function after the while loop to make sure that pygame is not running after the while loop.
I'm not aware of any pygame gui stuff, but it shouldn't be terribly hard to roll your own (and hey, maybe make it open source!)
If you're just doing a few simple buttons you could use GIMP or Photoshop or something else to make two (or three) images - an up, down and possible hover button, then you'd write your own event loop/handler that would do something like this:
That's a bit simplified, but it should at least give you a starting point (if no one else has any pygame GUI libraries)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With