Save fullscreen and read server, password and debug from config.ini
Build / test (push) Successful in 45s
Build / build (push) Successful in 1m12s

The settings the game saves itself, the quiz settings and now fullscreen, move
to settings.cfg (settings_debug.cfg in debug mode).

config.ini in the same folder is edited by hand: the server to start with, the
API password and debug mode. The game writes it with everything commented out
when it is missing and never changes it after that. IniFile reads it: plain
key = value lines, whole-line # or ; comments and optional quotes.
This commit is contained in:
Sansan committed 2026-10-07 20:12:59 +02:00
1 parent 92e3a66075
commit d21b3e2ce0
13 files changed
+491 -163

No files matched your search

+1 -1
View File
@@ -174,6 +174,6 @@ func test_changes_are_saved_at_once() -> void:
_card.lower_winning_score_button.pressed.emit()
var saved: ConfigFile = ConfigFile.new()
assert_int(saved.load(Settings.quiz_settings_path())).is_equal(OK)
assert_int(saved.load(Settings.saved_settings_path())).is_equal(OK)
assert_bool(saved.get_value("quiz", "hide_next_track")).is_false()
assert_int(saved.get_value("quiz", "winning_score")).is_equal(19)
+2 -2
View File
@@ -35,10 +35,10 @@ func test_statistics_settings_are_not_saved_with_the_quiz_settings() -> void:
Settings.add_to_stats = false
Settings.use_low_played_mode = true
Settings.save_quiz_settings()
Settings.save_settings()
var saved: ConfigFile = ConfigFile.new()
assert_int(saved.load(Settings.quiz_settings_path())).is_equal(OK)
assert_int(saved.load(Settings.saved_settings_path())).is_equal(OK)
assert_bool(saved.has_section_key("quiz", "add_to_stats")).is_false()
assert_bool(saved.has_section_key("quiz", "use_low_played_mode")).is_false()