Vore_Sandbox_Remaster/scripts/UI/gotoscenebutton.gd

12 lines
247 B
GDScript

extends Button
export(String, FILE, "*.tscn,*.scn") var goto = "res://mainmenu.tscn"
export(bool) var default = false #will this be focused by default?
func _ready():
if default:
grab_focus()
func _pressed():
get_tree().change_scene(goto)