Add error messages for failed writes to disk of settings

Changing settings would most of the time attempt to save unlock.vvv and
now also settings.vvv, but there would be no feedback whether the files
have been saved successfully or not. Now, if saving fails when changing
settings in the menu, a warning message will be shown. The setting will
still be applied of course, but the user will be informed it couldn't
be saved. This message can be silenced until the game is restarted,
because I can imagine this could get very annoying when someone already
knows their settings aren't writeable.

Also, some options didn't even save settings in the first place. These
are turning off invincibility, and by coincidence precisely all the
options in the advanced options menu. I made sure these options now do
so.
This commit is contained in:
Dav999-v
2020-11-22 03:10:26 +01:00
committed by Ethan Lee
parent d910c5118d
commit 444074a931
4 changed files with 76 additions and 33 deletions

View File

@@ -32,6 +32,7 @@ namespace Menu
quickloadlevel,
youwannaquit,
errornostart,
errorsavingsettings,
graphicoptions,
ed_settings,
ed_desc,
@@ -132,7 +133,8 @@ public:
void loadstats(ScreenSettings* screen_settings);
void savestats(const bool stats_only = false);
bool savestats(const bool stats_only = false);
void savestats_menu();
void deletestats();
@@ -142,7 +144,7 @@ public:
void loadsettings(ScreenSettings* screen_settings);
void savesettings();
bool savesettings();
void deletesettings();
@@ -260,6 +262,8 @@ public:
int creditposx, creditposy, creditposdelay;
int oldcreditposx;
bool silence_settings_error;
//Sine Wave Ninja Minigame
bool swnmode;