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