Are there any good GUIs that support Pygame surfaces as a widget within the application?
If this isn't possible or practical, what GUI toolkit has the best graphics component? I'm looking to keep the speedy rendering made possible by a SDL wrapper.
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.
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.
Dont use wxPython, its very hard to get to work well with Pygame, as described over at the GUI section of the Pygame wiki.
First of all, pygame relies on the SDL, which means that it can only have one window at a time. Thus, trying to implement multiple Gtk, Qt, ... application instances that use pygame, is an impossibility. The second problematic reason is that those toolkits use their own main loop, which possibly forces you to pipe their events to your pygame instance and vice versa. And to mention some other points in short: Drawing the toolkit elements on the pygame window is impossible and the SDL/pygame fullscreen mode will be problematic.
Instead, opt for any of the libraries listed at the bottom of that page. I use pgu myself.
Take a look at Albow, PGU or Ocemp.
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