Skip to content

New Feature - Local Settings#3248

Merged
1 commit merged into
EasyRPG:masterfrom
EasyRPG-NewFeatures:local-settings
Sep 2, 2024
Merged

New Feature - Local Settings#3248
1 commit merged into
EasyRPG:masterfrom
EasyRPG-NewFeatures:local-settings

Conversation

@jetrotal

@jetrotal jetrotal commented Jul 24, 2024

Copy link
Copy Markdown
Contributor

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

Ghabry commented Aug 1, 2024

Copy link
Copy Markdown
Member

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

jetrotal commented Aug 1, 2024

Copy link
Copy Markdown
Contributor Author

nice! working as a charm!

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

@Ghabry

Ghabry commented Aug 1, 2024

Copy link
Copy Markdown
Member

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
@ghost ghost merged commit 6f1b937 into EasyRPG:master Sep 2, 2024
@jetrotal jetrotal deleted the local-settings branch November 28, 2024 14:16
sevenc-nanashi pushed a commit to sevenc-nanashi/easyrpg-player that referenced this pull request May 31, 2026
This pull request was closed.
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.

2 participants