Snake/Scripts/Main Menu Buttons.gd

27 lines
770 B
GDScript3
Raw Normal View History

extends Control
@onready var game_scene = load("res://Scene/Game.tscn").instantiate()
func _ready():
2023-04-04 00:38:17 +00:00
$"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")
2023-04-04 00:38:17 +00:00
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()