mirror of
https://github.com/Relintai/material-maker.git
synced 2024-11-13 06:27:18 +01:00
93c84650cd
This also simplifies some functions. This partially addresses #30.
21 lines
460 B
GDScript
21 lines
460 B
GDScript
tool
|
|
extends WindowDialog
|
|
|
|
signal ok
|
|
|
|
func set_value(v) -> void:
|
|
$VBoxContainer/LineEdit.text = v
|
|
|
|
func set_texts(title, label) -> void:
|
|
window_title = title
|
|
$VBoxContainer/Label.text = label
|
|
$VBoxContainer/LineEdit.grab_focus()
|
|
$VBoxContainer/LineEdit.grab_click_focus()
|
|
|
|
func _on_OK_pressed() -> void:
|
|
_on_LineEdit_text_entered($VBoxContainer/LineEdit.text)
|
|
|
|
func _on_LineEdit_text_entered(new_text) -> void:
|
|
emit_signal("ok", new_text)
|
|
queue_free()
|