Currently, I am implementing DirectButton into my game for the start screen. I know that there is a command parameter for the button, but I have multiple functions that I want to do. I wanted to know if I could check which state the button is in. In the docs, it says the states are numbered 0 to 3, so I want to know if I can check which one it is so I can use it as an event. For example:
if DirectButton.state == clicked: taskMgr.add(newTask) return task.done
Edit: I also found that my program was running whatever function I put in the command parameter at the beginning when the Directbutton was being initialized. Is this supposed to happen?