godot-psd-training/trainings/trainingPanel/trainingPanel.gd

24 lines
661 B
GDScript3
Raw Normal View History

2024-05-16 16:30:14 +08:00
extends Node
# 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
2024-05-17 15:08:24 +08:00
func _on_restart_button_down():
2024-05-16 16:30:14 +08:00
$"../ConfirmDialog".show_confirm('此操作将重新开始实训,是否确认?')
get_tree().paused = true
2024-05-17 15:08:24 +08:00
func _on_restart_mouse_entered():
$PanelContainer/MarginContainer/Restart.set_default_cursor_shape(Control.CursorShape.CURSOR_POINTING_HAND)
2024-05-16 16:30:14 +08:00
2024-05-17 15:08:24 +08:00
func _on_restart_mouse_exited():
$PanelContainer/MarginContainer/Restart.set_default_cursor_shape(Control.CursorShape.CURSOR_ARROW)