Can I switch between optionbutton menus via a button?

Godot Version

4.6.2

Question

I want to have a ui where the player is able to switch between different dropdown menus via a button, in visually the same way you might switch between two options in a character creator. Short animation below showing what I mean. Is this possible without changing the scene entirely?

dropdown

I think it can be done in multiple ways:

  • Create two option buttons, identical looking, different content. Add them in a container node. Then when click on the change button, you make one invisible, and the other visible.
  • Change the option button options via scripting. You can check how to do that in the documentation:
1 Like