gordle/src/menu.gd

31 lines
657 B
GDScript3
Raw Normal View History

2022-02-24 05:23:47 +00:00
extends Control
2022-02-24 04:31:14 +00:00
func _ready() -> void:
if OS.get_name() == "HTML5":
2022-05-14 03:50:01 +00:00
$C/V/V2/QuitButton.hide()
2022-02-24 04:31:14 +00:00
func _on_DailyButton_pressed() -> void:
Global.daily_mode = true
var error := get_tree().change_scene_to_file("res://src/main.tscn")
2022-02-24 04:31:14 +00:00
assert(not error)
func _on_RandomButton_pressed() -> void:
Global.daily_mode = false
var error := get_tree().change_scene_to_file("res://src/main.tscn")
2022-02-24 04:31:14 +00:00
assert(not error)
func _on_CreditsButton_pressed() -> void:
2022-02-24 05:23:47 +00:00
$Credits.show()
2022-02-24 04:31:14 +00:00
func _on_QuitButton_pressed() -> void:
get_tree().get_root().propagate_notification(NOTIFICATION_WM_CLOSE_REQUEST)
2022-02-24 05:23:47 +00:00
func _on_CreditsBackButton_pressed() -> void:
$Credits.hide()