https://www.panda3d.org/manual/index.php/DirectButton
there are keywords for roll-over and click sounds. those need to be sound-instances if i read it right.
so you can set them just like you would do text= or command=
yea thanks, I know the keywords for the DirectButton already though but my problem is that the buttons on DirectDialog are not specified the same way as a normal DirectButton.
So I dont know where to specify the keywords for the buttons on the DirectDialog since it is just created using this snip of code:
I think that would work but there is a small problem.
When there is no sound specified to a button Panda3d is getting a default sound… So if I use your method I will hear 2 sounds when clicking a button on the DirectDialog (The default sound and the sound specified in yourFunction)
In general, you can do this sort of thing to pass attributes in to sub-components: you assign the attribute componentN_attribute. This works for other kinds of DirectGui elements too: