material-maker/material_maker/widgets/text_dialog.gd

18 lines
286 B
GDScript3
Raw Normal View History

2018-09-10 21:59:52 +02:00
tool
extends WindowDialog
signal ok
func _ready() -> void:
2018-09-10 21:59:52 +02:00
popup()
func set_title(title) -> void:
2018-09-10 21:59:52 +02:00
window_title = title
func set_text(text) -> void:
2018-09-10 21:59:52 +02:00
$VBoxContainer/TextEdit.text = text
func _on_OK_pressed() -> void:
2018-09-10 21:59:52 +02:00
emit_signal("ok", $VBoxContainer/TextEdit.text)
queue_free()