Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Chr_ | |
Old Version | Published before Godot 3 was released. |
How to add more options to OptionButton ?
Need to use GDScript?
Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Chr_ | |
Old Version | Published before Godot 3 was released. |
How to add more options to OptionButton ?
Need to use GDScript?
Reply From: | Chr_ |
Find it,
get_node("OptionButton".add_item("Item 1")
For more Items with similar name (Item 1,Item 2…Item i+1)
for i in range(0, 9): // From 1 to 9
get_node("OptionButton").add_item("Item"+ str(i + 1))
thank you,
that is very helpful
catcarrot | 2023-03-23 15:12