add full functionality to add and edit groups in group view

This commit is contained in:
2023-03-08 10:24:34 +03:00
parent f0ce658518
commit 66f0585b3a
6 changed files with 62 additions and 9 deletions

View File

@ -33,3 +33,10 @@ func clear() -> void:
func(c: OverrideEditorSettingsMenuItem):
c.queue_free()
)
func fill_from_dictionary(overrides: Dictionary) -> void:
for override in overrides:
var item: OverrideEditorSettingsMenuItem = ITEM_SCENE.instantiate()
add_item(item)
item.fill(override, overrides[override])

View File

@ -19,6 +19,11 @@ func _ready() -> void:
func get_property() -> Dictionary:
var prop_name = property_name_line_edit.text
var value = str_to_var(prop_name)
var value = str_to_var(property_value_line_edit.text)
return {prop_name: value}
func fill(key: String, value: Variant) -> void:
property_name_line_edit.text = key
property_value_line_edit.text = var_to_str(value)