ja tenim el control de la finestra i de la imatge

treballant en les tecles de funcio
This commit is contained in:
2026-04-04 17:20:28 +02:00
parent baee62b375
commit abb23071b5
16 changed files with 249 additions and 318 deletions

View File

@@ -41,6 +41,16 @@ namespace Options {
}
}
static void loadWindowConfigFromYaml(const fkyaml::node& yaml) {
if (!yaml.contains("window")) return;
const auto& node = yaml["window"];
if (node.contains("zoom"))
window.zoom = node["zoom"].get_value<int>();
if (node.contains("fullscreen"))
window.fullscreen = node["fullscreen"].get_value<bool>();
}
static void loadGameConfigFromYaml(const fkyaml::node& yaml) {
if (!yaml.contains("game")) return;
const auto& node = yaml["game"];
@@ -84,6 +94,7 @@ namespace Options {
return true;
}
loadWindowConfigFromYaml(yaml);
loadAudioConfigFromYaml(yaml);
loadGameConfigFromYaml(yaml);
@@ -118,6 +129,13 @@ namespace Options {
file << "version: \"" << Texts::VERSION << "\"\n";
file << "\n";
// WINDOW
file << "# WINDOW\n";
file << "window:\n";
file << " zoom: " << window.zoom << "\n";
file << " fullscreen: " << (window.fullscreen ? "true" : "false") << "\n";
file << "\n";
// AUDIO
file << "# AUDIO\n";
file << "audio:\n";