]> Untitled Git - wolf-seeking-sheep.git/blob - addons/dialogic/Editor/Events/Fields/field_vector3.gd
Updated export config options
[wolf-seeking-sheep.git] / addons / dialogic / Editor / Events / Fields / field_vector3.gd
1 @tool
2 extends DialogicVisualEditorFieldVector
3 ## Event block field for a Vector3.
4
5 var current_value := Vector3()
6
7
8 func _set_value(value: Variant) -> void:
9         current_value = value
10         super(value)
11
12
13 func get_value() -> Vector3:
14         return current_value
15
16
17 func _on_sub_value_changed(sub_component: String, value: float) -> void:
18         match sub_component:
19                 'X': current_value.x = value
20                 'Y': current_value.y = value
21                 'Z': current_value.z = value
22         _on_value_changed(current_value)
23
24
25 func _update_sub_component_text(value: Variant) -> void:
26         $X._on_value_text_submitted(str(value.x), true)
27         $Y._on_value_text_submitted(str(value.y), true)
28         $Z._on_value_text_submitted(str(value.z), true)