2022-01-30 20:43:22 +00:00
|
|
|
#BUT_CHANGESCENE:
|
|
|
|
# Generic template script allowing GUI linking of scenes by button press.
|
|
|
|
|
2022-01-02 20:52:54 +00:00
|
|
|
tool
|
|
|
|
extends Button
|
|
|
|
|
|
|
|
#Creates param usable in the UI; and the params next to export make it string and file browser
|
|
|
|
export(String, FILE) var next_scene_path: = ""
|
|
|
|
|
2022-02-27 19:44:55 +00:00
|
|
|
var tempToggle = 0
|
2022-02-20 21:09:15 +00:00
|
|
|
|
2022-01-02 20:52:54 +00:00
|
|
|
func _on_But_NewGame_button_up():
|
|
|
|
get_tree().change_scene(next_scene_path)
|
|
|
|
|
|
|
|
|
|
|
|
func _get_configuration_warning() -> String:
|
|
|
|
return "next_scene_path must be set for this button to work" if next_scene_path == "" else ""
|
|
|
|
|