2022-02-24 00:23:47 -05:00
|
|
|
extends Control
|
2022-02-23 23:31:14 -05:00
|
|
|
|
|
|
|
|
2024-02-18 03:02:01 -05:00
|
|
|
@onready var quit_button: Button = %QuitButton
|
|
|
|
@onready var credits: ColorRect = %Credits
|
|
|
|
|
|
|
|
|
2022-02-23 23:31:14 -05:00
|
|
|
func _ready() -> void:
|
2024-02-18 03:02:01 -05:00
|
|
|
if OS.has_feature("web"):
|
|
|
|
quit_button.hide()
|
2022-02-23 23:31:14 -05:00
|
|
|
|
|
|
|
|
|
|
|
func _on_DailyButton_pressed() -> void:
|
|
|
|
Global.daily_mode = true
|
2024-02-18 02:22:48 -05:00
|
|
|
var error := get_tree().change_scene_to_file("res://src/main.tscn")
|
2022-02-23 23:31:14 -05:00
|
|
|
assert(not error)
|
|
|
|
|
|
|
|
|
|
|
|
func _on_RandomButton_pressed() -> void:
|
|
|
|
Global.daily_mode = false
|
2024-02-18 02:22:48 -05:00
|
|
|
var error := get_tree().change_scene_to_file("res://src/main.tscn")
|
2022-02-23 23:31:14 -05:00
|
|
|
assert(not error)
|
|
|
|
|
|
|
|
|
|
|
|
func _on_CreditsButton_pressed() -> void:
|
2024-02-18 03:02:01 -05:00
|
|
|
credits.show()
|
2022-02-23 23:31:14 -05:00
|
|
|
|
|
|
|
|
|
|
|
func _on_QuitButton_pressed() -> void:
|
2024-02-18 02:22:48 -05:00
|
|
|
get_tree().get_root().propagate_notification(NOTIFICATION_WM_CLOSE_REQUEST)
|
2022-02-24 00:23:47 -05:00
|
|
|
|
|
|
|
|
|
|
|
func _on_CreditsBackButton_pressed() -> void:
|
2024-02-18 03:02:01 -05:00
|
|
|
credits.hide()
|