blob: 0a551e05a3359932213e98187e4d28e578bfe025 (
plain) (
blame)
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
|
extends Control
signal options_button_pressed
@export
var _new_game_button : BaseButton
@export
var _checksum_label : Label
func _ready():
print("From GDScript")
TestSingleton.hello_singleton()
# UI-111
_checksum_label.tooltip_text = "Checksum " + Checksum.get_checksum_text()
_checksum_label.text = "(" + Checksum.get_checksum_text().substr(0, 4) + ")"
_new_game_button.grab_focus()
func _on_new_game_button_pressed():
SFX.play("click")
print("Start a new game!")
get_tree().change_scene_to_file("res://src/SampleGame.tscn")
func _on_continue_button_pressed():
SFX.play("click")
print("Continue last game!")
func _on_multi_player_button_pressed():
SFX.play("click")
print("Have fun with friends!")
func _on_options_button_pressed():
SFX.play("click")
print("Check out some options!")
options_button_pressed.emit()
func _on_exit_button_pressed():
await SFX.play("click")
print("See you later!")
get_tree().quit()
|