Specify icon as part of class declaration
Open
c: register
feature
good first issue
- Dominant language
- Rust
- Stars
- 5.2k
- Forks
- 312
- Avg merge
- 12h 59m
- Merged PRs (30d)
- 9
Description
It's already possible to specify icons in the `.gdextension` file, see #277.
Since this is somewhat out-of-band and GDExtension [meanwhile supports](https://github.com/godotengine/godot/blob/591e70ff78c665ff11e1f21998d0e52fbc3f23c8/core/extension/gdextension_interface.h#L373) icons to be specified as part of class declaration, we could support this as well:
```rs
#[derive(GodotClass)]
#[class(icon = "res://path/to/icon.png")]
struct MyClass {}
```
Ideally this would also allow any `AsArg` expressions -- not just literals, but also constants or global functions.
Contributor guide
Assessment
This issue has not been assessed yet.