47 lines
874 B
GDScript
47 lines
874 B
GDScript
extends Button
|
|
|
|
@export var ID = ""
|
|
|
|
@onready var Controller = $"../.."
|
|
|
|
func _ready():
|
|
button_up.connect(_on_button_up)
|
|
change_name()
|
|
|
|
func _on_button_up():
|
|
match ID:
|
|
"NewGame":
|
|
get_tree().change_scene_to_file("res://scenes/Space.tscn")
|
|
"CreateProfile":
|
|
Game.profile_create("1")
|
|
"LoadProfile":
|
|
Game.profile_load("1")
|
|
"ExitGame":
|
|
get_tree().quit()
|
|
|
|
func change_name():
|
|
visible = true
|
|
match ID:
|
|
"NewGame":
|
|
text = "New Game"
|
|
"CreateProfile":
|
|
text = "Create Profile"
|
|
"LoadProfile":
|
|
text = "Load Profile"
|
|
"DeleteProfile":
|
|
text = "Delete Profile"
|
|
"ExitGame":
|
|
text = "Exit Game"
|
|
"Settings":
|
|
text = "Settings (WIP)"
|
|
"AudioSettings":
|
|
text = "Audio (WIP)"
|
|
"VideoSettings":
|
|
text = "Video (WIP)"
|
|
"Profiles":
|
|
text = "Profiles (WIP)"
|
|
"Back":
|
|
text = "Back"
|
|
"Null":
|
|
text = Game.gameversion
|
|
visible = false
|