need help with buttons

let say that i got a button called move.
after the movement is complete, how do i set the move button to be disabled.
then how do i enable it again?
Thx

Hi!

I’m pretty new to Panda3D but I think this is the way to do:

myDirectButton[‘state’] = 3

I’m not sure for the 3. You will need to check in the documentation on DirectButton. Also, the best way is to create constant for each state so you will not have magic number like “3” appears in your code!

If I’m wrong, please post! :slight_smile:

Hope it helps!

Jaff