Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Class Icon in GDExtesion #7501

Closed
Gallilus opened this issue Aug 14, 2023 · 2 comments
Closed

Support Class Icon in GDExtesion #7501

Gallilus opened this issue Aug 14, 2023 · 2 comments

Comments

@Gallilus
Copy link

Gallilus commented Aug 14, 2023

Describe the project you are working on

A GDExtension
https://github.com/Gallilus/icospheremesh-gdextension

Describe the problem or limitation you are having in your project

Using the CPP bindings I have not found how to add an icon like.
https://docs.godotengine.org/en/latest/tutorials/scripting/gdscript/gdscript_basics.html#registering-named-classes

Describe the feature / enhancement and how it helps to overcome the problem or limitation

Allow to specify an icon path to a class.

Depending on the implementation it may be needed to add the .svg to the exported extension.
But preferably it will be backed in to the executable.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

Having a third optional parameter in GDCLASS macro like
GDCLASS(IcoSphereMesh, ArrayMesh, "res://bin/IcoSphereMesh.svg")
or creating an additional macro to add the icon

If this enhancement will not be used often, can it be worked around with a few lines of script?

I do not see how to work around this.

Is there a reason why this should be core and not an add-on in the asset library?

It is a core feature supported by GDScript.
So needs support by Extension

@arkology
Copy link

godotengine/godot#75472
If I understand correctly, it's already possible

@dsnopek
Copy link

dsnopek commented Aug 15, 2023

Yes, this is already implemented!

I think the problem is that you've got [Icon] in your .gdextension, when it should be [icons].

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants