material-maker/addons/material_maker/widgets/text_dialog.gd
Hugo Locurcio 93c84650cd
Add return type hints to all scripts
This also simplifies some functions.

This partially addresses #30.
2019-10-20 16:35:45 +02:00

18 lines
286 B
GDScript

tool
extends WindowDialog
signal ok
func _ready() -> void:
popup()
func set_title(title) -> void:
window_title = title
func set_text(text) -> void:
$VBoxContainer/TextEdit.text = text
func _on_OK_pressed() -> void:
emit_signal("ok", $VBoxContainer/TextEdit.text)
queue_free()