]> Untitled Git - wolf-seeking-sheep.git/blob - addons/dialogic/Editor/Events/Fields/field_vector4.gd
Updated export config options
[wolf-seeking-sheep.git] / addons / dialogic / Editor / Events / Fields / field_vector4.gd
1 @tool
2 extends DialogicVisualEditorFieldVector
3 ## Event block field for a Vector4.
4
5 var current_value := Vector4()
6
7
8 func _set_value(value: Variant) -> void:
9         current_value = value
10         super(value)
11
12
13 func get_value() -> Vector4:
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                 'W': current_value.w = value
23         _on_value_changed(current_value)
24
25
26 func _update_sub_component_text(value: Variant) -> void:
27         $X._on_value_text_submitted(str(value.x), true)
28         $Y._on_value_text_submitted(str(value.y), true)
29         $Z._on_value_text_submitted(str(value.z), true)
30         $W._on_value_text_submitted(str(value.w), true)