Now WorldGenBaseResources can draw additional graphics to the RectViewNodes.

This commit is contained in:
Relintai 2022-08-05 13:42:22 +02:00
parent 5e6e960d02
commit 4e8e860562
2 changed files with 8 additions and 0 deletions

View File

@ -197,6 +197,12 @@ func get_editor_class() -> String:
func get_editor_additional_text() -> String:
return ""
func eitor_draw_additional(rect_view_node : MarginContainer) -> void:
_eitor_draw_additional(rect_view_node)
func _eitor_draw_additional(rect_view_node : MarginContainer) -> void:
pass
func setup_property_inspector(inspector) -> void:
inspector.add_slot_line_edit("get_name", "set_name", "Name")

View File

@ -58,6 +58,8 @@ func _draw():
if _editor_additional_text != "":
draw_string(font, Vector2(_editor_rect_border_size, font.get_height() * 3), _editor_additional_text, _edited_resource_font_color, get_rect().size.x)
if edited_resource:
edited_resource.eitor_draw_additional(self)
func refresh() -> void:
if !edited_resource: