mirror of
https://github.com/Relintai/mat_maker_gd.git
synced 2025-05-22 11:37:42 +02:00
23 lines
484 B
GDScript
23 lines
484 B
GDScript
extends AcceptDialog
|
|
|
|
signal return_status(status)
|
|
|
|
func _ready() -> void:
|
|
pass
|
|
|
|
func _on_AcceptDialog_confirmed() -> void:
|
|
emit_signal("return_status", "ok")
|
|
|
|
func _on_AcceptDialog_custom_action(action) -> void:
|
|
emit_signal("return_status", action)
|
|
|
|
func _on_AcceptDialog_popup_hide() -> void:
|
|
yield(get_tree(), "idle_frame")
|
|
emit_signal("return_status", "cancel")
|
|
|
|
func ask() -> String:
|
|
popup_centered()
|
|
var result = yield(self, "return_status")
|
|
queue_free()
|
|
return result
|