From b7b36d47ab9a1c36bcbfc9d225c8eb97e4430b8e Mon Sep 17 00:00:00 2001 From: Relintai Date: Sat, 25 Dec 2021 03:25:42 +0100 Subject: [PATCH] Set the selected continent into the widgets. --- game/addons/world_generator/ui/ResourcePropertyList.gd | 2 +- game/addons/world_generator/ui/tabs/Continent.gd | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/game/addons/world_generator/ui/ResourcePropertyList.gd b/game/addons/world_generator/ui/ResourcePropertyList.gd index 64ec9750..3d9c7647 100644 --- a/game/addons/world_generator/ui/ResourcePropertyList.gd +++ b/game/addons/world_generator/ui/ResourcePropertyList.gd @@ -1,7 +1,7 @@ tool extends ScrollContainer -var _edited_resource : WorldGenWorld = null +var _edited_resource : WorldGenBaseResource = null var properties : Array = Array() func add_slot_color(getter : String, setter : String) -> int: diff --git a/game/addons/world_generator/ui/tabs/Continent.gd b/game/addons/world_generator/ui/tabs/Continent.gd index 670b4027..b87c78d1 100644 --- a/game/addons/world_generator/ui/tabs/Continent.gd +++ b/game/addons/world_generator/ui/tabs/Continent.gd @@ -9,12 +9,12 @@ func _ready(): option_button.connect("item_selected", self, "on_item_selected") func refresh_continent() -> void: -# $HSplitContainer/ResourcePropertyList.edit_resource(edited_world) -# $VBoxContainer/DataList.set_edited_resource(edited_world) -# $HSplitContainer/RectEditor.set_edited_resource(edited_world) + $HSplitContainer/VBoxContainer/HBoxContainer2/ResourcePropertyList.edit_resource(edited_continent) + $HSplitContainer/VBoxContainer/HBoxContainer2/VBoxContainer/DataList.set_edited_resource(edited_continent) + $HSplitContainer/RectEditor.set_edited_resource(edited_continent) - if !edited_continent: - return +# if !edited_continent: +# return func refresh() -> void: var option_button : OptionButton = $HSplitContainer/VBoxContainer/OptionButton