47 lines
879 B
GDScript
47 lines
879 B
GDScript
extends Button
|
||
|
||
@export var id = "Null"
|
||
|
||
@onready var сontroller = $"../.."
|
||
|
||
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
|