MemR/game/Main.gd

35 lines
703 B
GDScript3
Raw Normal View History

2022-12-10 11:49:21 +01:00
extends Control
var _menu : Control
var _settings : Control
var _sort : Control
2022-12-10 13:20:14 +01:00
var _folder_setup_error_popup : AcceptDialog
2022-12-10 11:49:21 +01:00
func hide_all() -> void:
_menu.hide()
_settings.hide()
_sort.hide()
func _on_Sort_pressed() -> void:
2022-12-10 13:20:14 +01:00
if !_sort.validate_folders():
_folder_setup_error_popup.popup_centered()
return
2022-12-10 11:49:21 +01:00
hide_all()
_sort.show()
func _on_Settings_pressed() -> void:
hide_all()
_settings.show()
func _notification(what: int) -> void:
if what == NOTIFICATION_READY:
_menu = get_node("Menu")
_settings = get_node("Settings")
_sort = get_node("Sort")
2022-12-10 13:20:14 +01:00
_folder_setup_error_popup = get_node("Control/FolderSetupError")
2022-12-10 11:49:21 +01:00
func _on_Settings_back() -> void:
hide_all()
_menu.show()