godot::register::property::export_info_functions

Function export_enum

pub fn export_enum<T>(variants: &[T]) -> PropertyHintInfo
where &'a T: for<'a> Into<ExportValueWithKey<i64>>,
Expand description

Equivalent to @export_enum in Godot.

A name without a key would be represented as (name, None), and a name with a key as (name, Some(key)).

ยงExamples

export_enum(&[("a", None), ("b", Some(10))]);