mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-20 23:03:47 +00:00
Dialogue System
This commit is contained in:
parent
77765a581e
commit
1fa77f0c03
690 changed files with 46698 additions and 14 deletions
26
addons/dialogic/Editor/Events/Fields/field_vector2.gd
Normal file
26
addons/dialogic/Editor/Events/Fields/field_vector2.gd
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
@tool
|
||||
extends DialogicVisualEditorFieldVector
|
||||
## Event block field for a Vector2.
|
||||
|
||||
var current_value := Vector2()
|
||||
|
||||
|
||||
func _set_value(value: Variant) -> void:
|
||||
current_value = value
|
||||
super(value)
|
||||
|
||||
|
||||
func get_value() -> Vector2:
|
||||
return current_value
|
||||
|
||||
|
||||
func _on_sub_value_changed(sub_component: String, value: float) -> void:
|
||||
match sub_component:
|
||||
'X': current_value.x = value
|
||||
'Y': current_value.y = value
|
||||
_on_value_changed(current_value)
|
||||
|
||||
|
||||
func _update_sub_component_text(value: Variant) -> void:
|
||||
$X._on_value_text_submitted(str(value.x), true)
|
||||
$Y._on_value_text_submitted(str(value.y), true)
|
||||
Loading…
Add table
Add a link
Reference in a new issue