Add a button in Settings that opens the config folder

Shows the folder with config.ini, the saved settings and the cached
characters and songs in the system's file manager.

Closes #45
This commit is contained in:
Sansan committed 2026-10-09 16:54:45 +02:00
1 parent 222d231b1b
commit 06f457b027
4 files changed
+56 -1

No files matched your search

+2
View File
@@ -124,6 +124,8 @@ func test_server_features_are_off_and_the_folder_is_shown() -> void:
assert_str(_top_bar.offline_label.text).is_equal("Offline: Music")
assert_bool(_settings.select_server_button.disabled).is_true()
assert_bool(_settings.add_to_database_button.disabled).is_true()
# The config folder holds the cached characters, which are still used offline
assert_bool(_settings.open_config_folder_button.disabled).is_false()
func test_picking_a_folder_on_the_statistics_tab_goes_to_the_quiz() -> void:
+13
View File
@@ -53,3 +53,16 @@ func test_popup_fits_its_rows_and_is_centred() -> void:
# The rows' own height fits, so the last toggle is not squeezed or cut off
assert_float(rows.get_combined_minimum_size().y).is_less_equal(rows.size.y)
assert_vector(panel.get_center()).is_equal_approx(Vector2(960, 540), Vector2(1, 1))
func test_open_folder_button_shows_the_config_folder() -> void:
var shown: Array[String] = []
_popup.show_folder = func(dir: String) -> void: shown.append(dir)
_popup.open()
await _runner.simulate_frames(1)
await _click_at(_popup.open_config_folder_button.get_global_rect().get_center())
assert_array(shown).contains_exactly([Settings.config_dir()])
assert_bool(DirAccess.dir_exists_absolute(Settings.config_dir())).is_true()