Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Feature - Local Settings #3248

Merged
merged 1 commit into from
Sep 2, 2024

Conversation

jetrotal
Copy link
Contributor

@jetrotal jetrotal commented Jul 24, 2024

If you have a copy of config.ini saved at the same folder as the player app, it will load the game settings from it, instead of the global folder.


I used std::filesystem because couldn't figure another way of extracting the apps absolute path.

@Ghabry Ghabry added this to the 0.8.1 milestone Aug 1, 2024
@Ghabry
Copy link
Member

Ghabry commented Aug 1, 2024

We do not use std::filesystem in the Player because the support can be broken on certain platforms.

To get the working directory you can use our VFS layer. Relative paths work here when using Root().

if (FileFinder::Root().Exists(config_name)) {
    config_file = config_name;
}

If you have a copy of config.ini saved at the same folder as the player app, it will load the game settings from it, instead of the global folder.

-------------------------------------
Update game_config.cpp
@jetrotal
Copy link
Contributor Author

jetrotal commented Aug 1, 2024

nice! working as a charm!

I wonder if buttons "Save Local Settings" and "Delete Local Settings" on the config scene are necessary

@Ghabry
Copy link
Member

Ghabry commented Aug 1, 2024

File deletion is not supported yet (through the VFS layer). This one would be also interesting for deleting save files.

Save local settings vs. Save global settings: This is hard to differentiate because there is technically only one config file and the Player doesn't care where it is located.

@Ghabry Ghabry added Settings All about customizable features, storing and applying them and removed Building labels Aug 26, 2024
@fdelapena fdelapena merged commit 6f1b937 into EasyRPG:master Sep 2, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Settings All about customizable features, storing and applying them
Development

Successfully merging this pull request may close these issues.

3 participants