Feature: Button to reset game settings to their default values #8958
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation / Problem
There is no easy way of resetting game settings to their fresh default values. Players can do this by either removing the OpenTTD config file (which has other undesired effects like removing the NewGRF presets, in addition to being difficult to find by users that are not familiar with where to find game config files in the local storage) or setting each value to its default one by one manually from the settings window itself.
Description
This change introduces a button at the bottom of the game settings screen so the user can reset all values to their default values. The user will be prompted to confirm it though:
In addition, AFAIK the changes won't be persisted unless the user successfully exits OpenTTD.
Limitations
I can't think of any, but please suggest.
Checklist for review
Some things are not automated, and forgotten often. This list is a reminder for the reviewers.