extends ScrollContainer var main_window var exiting_to_config = false # Called when the node enters the scene tree for the first time. func _enter_tree() -> void: print("enter tree") main_window = get_tree().root main_window.borderless = false main_window.always_on_top = false main_window.transparent = false main_window.min_size = Vector2i(640, 480) main_window.size = Vector2i(640, 480) ProjectSettings.set_setting("display/window/subwindows/embed_subwindows", false) func _exit_tree() -> void: if exiting_to_config: return main_window.borderless = true main_window.always_on_top = true main_window.transparent = true main_window.min_size = Vector2i(100, 100) ProjectSettings.set_setting("display/window/subwindows/embed_subwindows", true) func _on_back_button_pressed() -> void: get_tree().change_scene_to_file("res://scenes/main.tscn") func _on_reset_pressed() -> void: GlobalConfig.reset_settings() exiting_to_config = true get_tree().reload_current_scene()