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

Feature: Button to reset game settings to their default values #8958

Merged
merged 1 commit into from Apr 6, 2021

Conversation

perezdidac
Copy link
Contributor

@perezdidac perezdidac commented Apr 5, 2021

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:

image

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.

  • The bug fix is important enough to be backported? (label: 'backport requested')
  • This PR affects the save game format? (label 'savegame upgrade')
  • This PR affects the GS/AI API? (label 'needs review: Script API')
    • ai_changelog.hpp, gs_changelog.hpp need updating.
    • The compatibility wrappers (compat_*.nut) need updating.
  • This PR affects the NewGRF API? (label 'needs review: NewGRF')

@LordAro
Copy link
Member

LordAro commented Apr 5, 2021

Players can do this by either removing the OpenTTD config file (which has other undesired effects)

Please elaborate

@perezdidac perezdidac marked this pull request as ready for review April 5, 2021 22:29
@perezdidac
Copy link
Contributor Author

Players can do this by either removing the OpenTTD config file (which has other undesired effects)

Please elaborate

Added "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"

src/settings_gui.cpp Outdated Show resolved Hide resolved
src/settings_gui.cpp Outdated Show resolved Hide resolved
@michicc michicc changed the title Feature: button to reset game settings to their default values Feature: Button to reset game settings to their default values Apr 6, 2021
@michicc michicc merged commit ca783d4 into OpenTTD:master Apr 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants