2024-05-10 13:33:08 -04:00
|
|
|
extends Control
|
2024-05-09 22:21:58 -04:00
|
|
|
|
|
|
|
@onready var raise: RichTextLabel = $Title/Raise
|
|
|
|
@onready var your: RichTextLabel = $Title/Your
|
|
|
|
@onready var wand: RichTextLabel = $Title/Wand
|
|
|
|
@onready var disclaimer: RichTextLabel = $Title/Disclaimer
|
|
|
|
|
|
|
|
@onready var play: TextureButton = $Buttons/Play
|
|
|
|
@onready var credits: TextureButton = $Buttons/Credits
|
|
|
|
@onready var settings: TextureButton = $Buttons/Settings
|
|
|
|
@onready var quit: TextureButton = $Buttons/Quit
|
|
|
|
@onready var about: TextureButton = $Buttons/About
|
2024-05-27 19:54:22 -04:00
|
|
|
@onready var animationPlayer = $"../AnimationPlayer"
|
2024-05-09 22:21:58 -04:00
|
|
|
|
2024-05-25 23:51:28 -04:00
|
|
|
@onready var data: Data = $/root/Root/Data
|
2024-05-12 00:22:34 -04:00
|
|
|
@onready var settingsMenu: Control = $"../Settings"
|
2024-05-27 19:54:22 -04:00
|
|
|
@onready var creditsMenu: CreditsMenu = $"../Credits"
|
2024-05-12 00:22:34 -04:00
|
|
|
|
2024-05-27 19:54:22 -04:00
|
|
|
var aboutOut: bool = false
|
2024-05-12 00:22:34 -04:00
|
|
|
|
2024-05-30 15:56:16 -04:00
|
|
|
func _ready():
|
|
|
|
data.transitioner.showScreen()
|
2024-05-30 22:55:48 -04:00
|
|
|
if (data.forWeb):
|
|
|
|
quit.disabled = true
|
2024-05-30 15:56:16 -04:00
|
|
|
|
2024-05-10 13:33:08 -04:00
|
|
|
func _on_play_pressed():
|
2024-05-30 15:56:16 -04:00
|
|
|
await data.transitioner.hideScreen()
|
2024-05-27 19:54:22 -04:00
|
|
|
var t: Tavern = load(data.locations[data.Location.TAVERN]).instantiate()
|
|
|
|
$/root/Root.add_child(t)
|
|
|
|
data.musicPlayer.setLoc(Data.Location.TAVERN)
|
|
|
|
data.loc = data.Location.TAVERN
|
2024-05-23 22:58:20 -04:00
|
|
|
$/root/Root/MainMenu.queue_free()
|
2024-05-10 13:33:08 -04:00
|
|
|
|
|
|
|
func _on_credits_pressed():
|
2024-05-27 22:05:50 -04:00
|
|
|
animationPlayer.play("creditsTransition")
|
2024-05-27 19:54:22 -04:00
|
|
|
creditsMenu.toggle()
|
2024-05-10 13:33:08 -04:00
|
|
|
|
|
|
|
func _on_settings_pressed():
|
2024-05-27 22:05:50 -04:00
|
|
|
animationPlayer.play("settingsTransition")
|
2024-05-10 13:33:08 -04:00
|
|
|
|
|
|
|
func _on_about_pressed():
|
2024-05-27 19:54:22 -04:00
|
|
|
if (!aboutOut): animationPlayer.play("showAbout")
|
|
|
|
else: animationPlayer.play_backwards("showAbout")
|
|
|
|
aboutOut = !aboutOut
|
2024-05-10 13:33:08 -04:00
|
|
|
|
|
|
|
func _on_quit_pressed():
|
|
|
|
get_tree().quit()
|
2024-05-12 00:22:34 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|