MarkMark Posts: 13Member
edited December 1969 in GUI
Hi Team

I know there is a simple set of answers for the following, I just cant find the answer in the docs....

I want to see the status of a checkbox, to see if it is checked or unchecked - I just dont know the command.

I am assuming it would be something like "get_node("/root/panel/checkbox").get_status()"   

So Godot gurus, what are the magical codes to get and set the status of a checkbox?




  • MarkMark Posts: 13Member

    I have worked around the issue by linking the Toggle event to the panel and via script and a Dictionary/Array combination I log when toggle events happen. This way I only need to refer to the dictionary/array combo to find the status.

    Hope this helps others
  • danjodanjo Posts: 80Member
  • MarkMark Posts: 13Member
    yes, though that just triggers an 'is pressed' event, not an on or off status, which is why I changed my method of handling it as mentioned above Wink
  • danjodanjo Posts: 80Member
    No, is_pressed() returns true, when the checkbox is checked and false when it's not.
Sign In or Register to comment.