I need help in PGui

Does anybody have a tutorial on how to use PGui?

I am not aware of any, sorry to say.

There is a good kickstart doc at

https://docs.panda3d.org/1.10/cpp/programming/directgui/index#directgui

but after that the docs are mostly in the source code. Good news though, it’s well documented there. The PGItem class is the base class for all UI elements so start there then work your way out.

One note I can offer is that PGui is documented more in the source code itself than in the header files. If you are looking at the Slider UI element, for example, the header file is empty of comments:

but the .cxx files are chock full of great info:

EDIT: Don’t forget to look for useful comments in the code .I files as well!

2 Likes