aboutsummaryrefslogtreecommitdiff
path: root/client/menu/ingame.gd
blob: c166149171d161ff9baa206dc7ec79bceb557abe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
extends Menu

@onready var anim = $AnimationPlayer
@onready var options = $Side/Margin/Options

func _ready():
	super()

func anim_setup(): pass
func menu_anim_open():
	print("ingame open")
	anim.play("activate")
	await anim.animation_finished
func menu_anim_exit():
	print("ingame exit")
	anim.play_backwards("activate")
	await anim.animation_finished

func _on_resume_pressed():
	exit()

func _on_main_menu_pressed():
	parent_menu.replace_menu("res://menu/main.tscn")

func _on_settings_pressed():
	submenu("res://menu/settings.tscn", true)

func _on_reconnect_pressed():
	parent_menu.replace_menu("res://menu/game.tscn")

func _on_quit_pressed():
	quit()

func _input(event):
	if Input.is_action_just_pressed("pause"): exit()