From e704e2cca56aed71f6e41dd060ddab5babd10569 Mon Sep 17 00:00:00 2001 From: dam Date: Mon, 24 Jan 2022 00:27:59 +0000 Subject: Draft prototype of option sets' structure, load and store. --- menu/menu.gd | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'menu/menu.gd') diff --git a/menu/menu.gd b/menu/menu.gd index b5e1ef2..9b7f99f 100644 --- a/menu/menu.gd +++ b/menu/menu.gd @@ -1,9 +1,9 @@ extends MenuButton const menu_items: Array = [ - { label = "IMPORT FILTERS", action = "_menu_import_filters_action" }, - { label = "EXPORT FILTERS", action = "_menu_export_filters_action" }, - { label = "CLEAR FILTERS", action = "_menu_clear_filters_action" }, + { label = "IMPORT OPTION SETS", action = "_menu_import_option_sets_action" }, + { label = "EXPORT OPTION SETS", action = "_menu_export_option_sets_action" }, + { label = "CLEAR OPTION SETS", action = "_menu_clear_option_sets_action" }, { label = "EXPORT DATA", action = "_menu_export_data_action" }, { label = "CLEAR DATA", action = "_menu_clear_data_action" }, { label = "ABOUT", action = "_menu_about_action" }, @@ -37,28 +37,28 @@ func dialog_cancelled(confirmation_signal_name: String): confirm_action.disconnect(it.signal, it.target, it.method) -func _menu_import_filters_action(): - file_picker.window_title = "IMPORT FILTERS" +func _menu_import_option_sets_action(): + file_picker.window_title = "IMPORT OPTION SETS" file_picker.mode = FileDialog.MODE_OPEN_FILE file_picker.current_dir = OS.get_system_dir(OS.SYSTEM_DIR_DOWNLOADS) - file_picker.connect("file_selected", stage, "load_filters", [], CONNECT_ONESHOT) + file_picker.connect("file_selected", stage, "load_option_sets", [], CONNECT_ONESHOT) file_picker.show_modal(true) file_picker.invalidate() -func _menu_export_filters_action(): - file_picker.window_title = "EXPORT FILTERS" +func _menu_export_option_sets_action(): + file_picker.window_title = "EXPORT OPTION SETS" file_picker.mode = FileDialog.MODE_SAVE_FILE file_picker.current_dir = OS.get_system_dir(OS.SYSTEM_DIR_DOWNLOADS) - file_picker.connect("file_selected", stage, "store_filters", [], CONNECT_ONESHOT) + file_picker.connect("file_selected", stage, "store_option_sets", [], CONNECT_ONESHOT) file_picker.show_modal(true) file_picker.invalidate() -func _menu_clear_filters_action(): - confirm_action.window_title = "CLEAR FILTERS" - confirm_action.dialog_text = "Do you want to delete all filters?" - confirm_action.connect("confirmed", stage, "clear_filters", [true], CONNECT_ONESHOT) +func _menu_clear_option_sets_action(): + confirm_action.window_title = "CLEAR OPTION SETS" + confirm_action.dialog_text = "Do you want to delete all option sets?" + confirm_action.connect("confirmed", stage, "clear_option_sets", [true], CONNECT_ONESHOT) confirm_action.show_modal(true) -- cgit v1.2.3