Skip to content

Specify icon as part of class declaration #1200

@Bromeon

Description

@Bromeon

It's already possible to specify icons in the .gdextension file, see #277.

Since this is somewhat out-of-band and GDExtension meanwhile supports icons to be specified as part of class declaration, we could support this as well:

#[derive(GodotClass)]
#[class(icon = "res://path/to/icon.png")]
struct MyClass {}

Ideally this would also allow any AsArg<GString> expressions -- not just literals, but also constants or global functions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    c: registerRegister classes, functions and other symbols to GDScriptfeatureAdds functionality to the librarygood first issueGood for newcomers

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions