How to export a custom array like optionbutton's items

Godot Version

godot4.4 dev3

Question

i want to export a var like this:
微信截图_20241102011933

The method I can think of is to write a Resource script, StepperItem, where I define text, icon, id, disable, and separator. Then, I use @export var items:Array[StepperItem]=. However, in the inspector panel, it doesn’t look as elegant as the system variables, because each time I add an element, I need to manually select and create a resource, instead of having it listed directly like in OptionButton.
微信截图_20241102012618

anyone can help?thanks a lot

To get any closer you will probably need to make a plugin or @tool script with _get_property_list. Sadly those nice little property widgets aren’t very accessable.

Your answer is very helpful, thank you

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.