24 lines
537 B
GDScript3
24 lines
537 B
GDScript3
|
extends Control
|
||
|
|
||
|
var notPaused = true
|
||
|
|
||
|
func _process(delta):
|
||
|
if Input.is_action_just_pressed("pause"):
|
||
|
if notPaused:
|
||
|
get_tree().paused = true
|
||
|
notPaused = false
|
||
|
visible = true
|
||
|
$Panel/VSplitContainer/MenuButton.grab_focus()
|
||
|
else:
|
||
|
get_tree().paused = false
|
||
|
notPaused = true
|
||
|
visible = false
|
||
|
$Panel/VSplitContainer/MenuButton.release_focus()
|
||
|
|
||
|
func _on_QuitButton_pressed():
|
||
|
get_tree().quit()
|
||
|
|
||
|
func _on_MenuButton_pressed():
|
||
|
get_tree().paused = false
|
||
|
get_tree().change_scene("res://Menus/Main Menu/Menu.tscn")
|