You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When creating a GDExtension that adds a script language (such as Godot Dart) I want to be able to have the icon show in the Create Script dialog. This is the current result:
Although the icon appears properly when the script is attached:
Steps to reproduce
Create a ScriptLanguageExtension for Godot
Add an icon for the script in the .gdextension file under [icons].
Open the ScriptCreateDialog
Note the lack of icon
Minimal reproduction project (MRP)
N/A
The text was updated successfully, but these errors were encountered:
The reason this happens is because the ScriptCreateDialog only references the theme, and (so far as I know) GDExtensions don't currently have a way to add icons to the theme. (Relevant code)
The EditorNode, on the other hand, asks the extension for the script's icon (Relevant code).
The easy way forward here is to just make ScriptCreateDialog follow a similar approach as EditorNode, and look to see if the icon is defined in the Script's extension first.
The harder way forward is to support GDExtensions adding theme icons probably....
So far as I can tell, certain areas of the code ask extensions if they have an icon for a particular type, which is registered in the .gdextension file.
For example, in my .gdextension file I have the following:
Certain areas of the editor ask the extension system if they define an icon for a type (such as in EditorNode , but others (like the ScriptCreateDialog) don't, and only ask the Theme.
I think the larger refactor would be for the Theme to handle asking extensions. My PR is the simpler solution to have ScriptCreateDialog work more similarly to EditorNode.
Tested versions
System information
Window 10 (affects all)
Issue description
When creating a GDExtension that adds a script language (such as Godot Dart) I want to be able to have the icon show in the Create Script dialog. This is the current result:

Although the icon appears properly when the script is attached:

Steps to reproduce
.gdextension
file under[icons]
.ScriptCreateDialog
Minimal reproduction project (MRP)
N/A
The text was updated successfully, but these errors were encountered: