godot-psd-training/trainings/confirmDialog/confirmDialog.gd
joylink_fanyuhong 007efc1a5a 重新开始
2024-05-16 16:30:14 +08:00

34 lines
587 B
GDScript

extends Window
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
pass
signal two_confirm()
signal two_cancel()
func show_confirm(text):
$PanelContainer/VBoxContainer/Label.text = text
self.show()
func _on_cancel_button_down():
emit_signal("two_cancel")
self.hide()
func _on_confirm_button_down():
emit_signal("two_confirm")
self.hide()
func _on_close_requested():
emit_signal("two_cancel")
self.hide()