Snake/Scripts/Main Menu Buttons.gd
2023-04-04 02:38:17 +02:00

26 lines
770 B
GDScript

extends Control
@onready var game_scene = load("res://Scene/Game.tscn").instantiate()
func _ready():
$"MarginContainer/VBoxContainer/Tab Group/Menu Butons/Start Button".grab_focus()
func _on_start_button_pressed():
get_tree().change_scene_to_file("res://Scene/Game.tscn")
func _on_quit_button_pressed():
get_tree().quit()
func _on_about_button_pressed():
OS.shell_open("https://git.euph.dev/snoweuph/Snake")
func _on_settings_button_pressed():
$"MarginContainer/VBoxContainer/Tab Group".current_tab = 1
$"MarginContainer/VBoxContainer/Tab Group/Settings/Back Button".grab_focus()
func _on_back_button_pressed():
$"MarginContainer/VBoxContainer/Tab Group".current_tab = 0
$"MarginContainer/VBoxContainer/Tab Group/Menu Butons/Start Button".grab_focus()