extends Node
@export var game_scene : Resource
@export var settings_scene : Resource
@export var default_focus : TextureButton
# Engine Callbackss
func _ready():
GlobalSettings.set_display_mode(Save.game_data.display_mode)
GlobalSettings.toggle_vsync(Save.game_data.vsync_on)
GlobalSettings.set_resolution(Save.game_data.current_resolution_index)
GlobalSettings.update_master_volume(Save.game_data.master_volume)
GlobalSettings.update_music_volume(Save.game_data.music_volume)
GlobalSettings.update_sfx_volume(Save.game_data.sfx_volume)
default_focus.grab_focus()
pass
func _on_play_button_pressed():
load(game_scene.resource_path)
get_tree().change_scene_to_file(game_scene.resource_path)
func _on_settings_button_pressed():
var settings_scene_instance = load(settings_scene.resource_path).instantiate()
get_tree().current_scene.add_child(settings_scene_instance)
func _on_about_button_pressed():
OS.shell_open("https://git.euph.dev/GameDev/HoppyEaster")
func _on_quit_button_pressed():
get_tree().quit()