add full functionality to add and edit groups in group view
This commit is contained in:
@ -61,6 +61,10 @@ func set_text(text: String) -> void:
|
||||
header_text_label.text = text
|
||||
|
||||
|
||||
func get_text() -> String:
|
||||
return header_text_label.text
|
||||
|
||||
|
||||
func set_description(text: String) -> void:
|
||||
if text == "":
|
||||
description_label.visible = false
|
||||
@ -84,6 +88,8 @@ func set_children_visible(p_visible: bool) -> void:
|
||||
add_install_button_container.visible = p_visible
|
||||
inner_separator.visible = p_visible
|
||||
|
||||
description_label.visible = p_visible && !description_label.text.is_empty()
|
||||
|
||||
|
||||
func add_custom(control: Control) -> void:
|
||||
header_custom_control_container.add_child(control)
|
||||
|
@ -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])
|
||||
|
@ -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)
|
||||
|
Reference in New Issue
Block a user