gdext icon indicating copy to clipboard operation
gdext copied to clipboard

Enums

Open Bromeon opened this issue 3 years ago • 1 comments

Once #3 and #4 are ready, enums could be supported. Maybe this could start as a builder API, and then proc-macros.

See also: https://github.com/godot-rust/godot-rust/pull/775

Bromeon avatar Oct 03 '22 21:10 Bromeon

See also https://github.com/godot-rust/gdext/issues/334 and #580. Introspection can be interesting for user and engine enums, see #600. And this Discord thread.

Bromeon avatar Jan 05 '24 12:01 Bromeon

Enums are now supported, there's one in the hot-reload example:

https://github.com/godot-rust/gdext/blob/612dc5c492441045e8510e106fd47da4973ef7d8/examples/hot-reload/rust/src/lib.rs#L57-L66

We also have documentation about them in the book. GDScript itself doesn't know enums, so it will use strings or integers.

Bromeon avatar May 01 '24 10:05 Bromeon