1 class_name DialogicVisualEditorFieldVector
2 extends DialogicVisualEditorField
3 ## Base type for Vector event blocks
7 for child in get_children():
8 child.tooltip_text = tooltip_text
9 child.property_name = child.name #to identify the name of the changed sub-component
10 child.value_changed.connect(_on_sub_value_changed)
13 func _load_display_info(info: Dictionary) -> void:
14 for child in get_children():
15 if child is DialogicVisualEditorFieldNumber:
16 if info.get('no_prefix', false):
17 child._load_display_info(info)
19 var prefixed_info := info.duplicate()
20 prefixed_info.merge({'prefix':child.name.to_lower()})
21 child._load_display_info(prefixed_info)
24 func _set_value(value: Variant) -> void:
25 _update_sub_component_text(value)
26 _on_value_changed(value)
29 func _on_value_changed(value: Variant) -> void:
30 value_changed.emit(property_name, value)
33 func _on_sub_value_changed(sub_component: String, value: float) -> void:
37 func _update_sub_component_text(value: Variant) -> void: