2018-08-20 15:43:03 +02:00
|
|
|
tool
|
2018-08-07 23:21:12 +02:00
|
|
|
extends WindowDialog
|
|
|
|
|
|
|
|
signal ok
|
|
|
|
|
2019-10-20 16:22:06 +02:00
|
|
|
func set_value(v) -> void:
|
2019-10-13 10:14:43 +02:00
|
|
|
$VBoxContainer/LineEdit.text = v
|
2018-08-07 23:21:12 +02:00
|
|
|
|
2019-10-20 16:22:06 +02:00
|
|
|
func set_texts(title, label) -> void:
|
2018-09-08 12:25:28 +02:00
|
|
|
window_title = title
|
|
|
|
$VBoxContainer/Label.text = label
|
|
|
|
$VBoxContainer/LineEdit.grab_focus()
|
|
|
|
$VBoxContainer/LineEdit.grab_click_focus()
|
|
|
|
|
2019-10-20 16:22:06 +02:00
|
|
|
func _on_OK_pressed() -> void:
|
2018-09-08 12:25:28 +02:00
|
|
|
_on_LineEdit_text_entered($VBoxContainer/LineEdit.text)
|
|
|
|
|
2019-10-20 16:22:06 +02:00
|
|
|
func _on_LineEdit_text_entered(new_text) -> void:
|
2018-09-08 12:25:28 +02:00
|
|
|
emit_signal("ok", new_text)
|
2018-08-07 23:21:12 +02:00
|
|
|
queue_free()
|