Skip to content

Save and load user settings to a file#54

Merged
chreden merged 4 commits intomasterfrom
save-settings
Mar 10, 2018
Merged

Save and load user settings to a file#54
chreden merged 4 commits intomasterfrom
save-settings

Conversation

@chreden
Copy link
Copy Markdown
Owner

@chreden chreden commented Mar 8, 2018

File is in %LOCALAPPDATA%\trview\settings.txt. Currently just saves as a dumb text file, no fancy format.
Things saved:

  • Recent files (up to 10)
  • Camera sensitivity

Settings are saved:

  • When a file is opened
  • When the program is closed

I didn't add neighbour depth to the settings as it seemed like more of a situational thing - there are probably some levels you wouldn't want to start with certain depths on for example.

Recent files are added to the file->open recent menu.

Related: #29

chreden added 4 commits March 5, 2018 21:47
When user opens a file, add it to the recent files
Add event when recent files changes so the Windows menu can be updated
Add up to 10 recent files to this menu
Also save in shutdown
@chreden chreden added this to the v1.0.3 milestone Mar 8, 2018
@chreden chreden self-assigned this Mar 8, 2018
@chreden chreden requested a review from jw-dev March 8, 2018 21:07
@chreden chreden merged commit 506b0fd into master Mar 10, 2018
@chreden chreden deleted the save-settings branch March 10, 2018 17:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant