forked from devinapgames/FutureBall
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTitlescreen.gd
48 lines (29 loc) · 1.06 KB
/
Titlescreen.gd
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
36
37
38
39
40
41
42
43
44
45
46
47
48
extends Node
# Called when the node enters the scene tree for the first time.
func _ready():
Globals.KillProps()
$MarginContainer/VBoxContainer/VBoxContainer/TextureButton.grab_focus()
Input.connect("joy_connection_changed", self, "_on_joy_connection_changed")
func _physics_process(delta):
if $MarginContainer/VBoxContainer/VBoxContainer/TextureButton.is_hovered() ==true:
$MarginContainer/VBoxContainer/VBoxContainer/TextureButton.grab_focus()
func _on_joy_connection_changed(device_id, connected):
pass
# if connected:
# print(Input.get_joy_name(device_id))
# else:
# print("Keyboard")
func _on_TextureButton_pressed():
get_tree().change_scene("res://LevelSelection.tscn")
#func _on_TextureButton3_pressed():
# get_tree().change_scene("res://Extra.tscn")
func _on_TextureButton4_pressed():
get_tree().quit()
func _on_TextureButton_mouse_entered():
$SFXHover.play()
func _on_TextureButton2_mouse_entered():
$SFXHover.play()
func _on_TextureButton3_mouse_entered():
$SFXHover.play()
func _on_TextureButton4_mouse_entered():
$SFXHover.play()