Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion addons/gaea/editor/create_node_tree.gd
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func _populate_from_dictionary(dictionary: Dictionary, parent_item: TreeItem) ->
tree_item.set_metadata(0, value)
if value is GaeaNodeResource:
tree_item.set_text(0, value.get_tree_name())
tree_item.set_icon(0, GaeaValue.get_display_icon(value.get_type()))
tree_item.set_icon(0, value.get_icon())
tree_item.set_icon_max_width(0, 16)


Expand Down
11 changes: 8 additions & 3 deletions addons/gaea/graph/graph_nodes/node_resource.gd
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ var tree_name_override: String = "": set = set_tree_name_override

## Used in [_get_preview_simulation_size].
enum SimSize
{
PREVIEW,
{
PREVIEW,
WORLD
}

Expand Down Expand Up @@ -637,9 +637,14 @@ static func get_formatted_text(unformatted_text: String) -> String:
.replace("[/code]", "[/code][/color][/bgcolor]")


## Can be overriden to change the icon in the 'Create Node' tree.
func _get_icon() -> Texture2D:
return GaeaValue.get_display_icon(get_type())


## Returns the corresponding type icon.
func get_icon() -> Texture2D:
return GaeaValue.get_display_icon(get_type())
return _get_icon()


## Returns the corresponding type color.
Expand Down
Loading