"is there a way to hook into a custom event loop?" ==> Yes, here is an example where one uses a pre-existing pygame code with an event loop, and then add some widgets while keeping the loop exactly the same, except for one line added for handling events related to the new thorpy widgets : http://thorpy.org/tutorials/include.html
.
Thank you for the feedback on the other points. Here are some answers:
"*The application is only referenced when it's created and destroyed. This magic is puzzling to me." ==> I'm not sure to understand how it is not a desirable feature. Should we indicate to every new object to which application it belongs ? Instead, since only 1 application is running at the same time, it seemed more appropriate in my opinion to implicitely
use it for each created widget.
"* The application class uses the standard __init__ method for instance creation, but all of the widgets use a "make" method. Could the standard method be used instead?"
==> With the standard method, one is free to specify or modify anything about the graphics or styling of the element before it is actually generated and created in memory by calling finish() method. This was really crucial for performances when creating elements
on the fly in some situations. However, when only default styling is needed, I created the make() static method in order to allow the user to create simple objects without needing the 2 calls __init__() + finish().
"* The check box should probably be called CheckBox rather than Checker."
==> You are right, I will create an alias for the next version.
De : owner-pygame-users@xxxxxxxx <owner-pygame-users@xxxxxxxx> de la part de Daniel Foerster <pydsigner@xxxxxxxxx>
Envoyé : dimanche 26 février 2017 19:05 À : pygame-users@xxxxxxxx Objet : RE: [pygame] PyGame user interface widgets Nice set of widgets, however I think there are some things that could be changed to increase its appeal, based on the example overview anyways.
* The application is only referenced when it's created and destroyed. This magic is puzzling to me.
* The application class uses the standard __init__ method for instance creation, but all of the widgets use a "make" method. Could the standard method be used instead?
* The check box should probably be called CheckBox rather than Checker.
Looks like a nice set of functionalities though; is there a way to hook into a custom event loop?
— Daniel Foerster
On Feb 26, 2017 11:47, "Yann Thorimbert" <Yann.Thorimbert@xxxxxxxx> wrote:
Hello Irv, |