You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
788 B

@tool
extends DialogicVisualEditorField
## Event block field for a single line of text.
var placeholder :String= "":
set(value):
placeholder = value
self.placeholder_text = placeholder
#region MAIN METHODS
################################################################################
func _ready() -> void:
self.text_changed.connect(_on_text_changed)
func _load_display_info(info:Dictionary) -> void:
self.placeholder = info.get('placeholder', '')
func _set_value(value:Variant) -> void:
self.text = str(value)
func _autofocus():
grab_focus()
#endregion
#region SIGNAL METHODS
################################################################################
func _on_text_changed(value := "") -> void:
value_changed.emit(property_name, self.text)
#endregion