Setting: Add setting flag: no new game (in game use only)

This commit is contained in:
Jonathan G Rennison
2019-04-30 23:48:53 +01:00
parent 8b1ee39ace
commit 79e49cf4a9
3 changed files with 37 additions and 25 deletions

View File

@@ -1053,6 +1053,10 @@ bool SettingEntry::IsVisibleByRestrictionMode(RestrictionMode mode) const
*/
bool SettingEntry::UpdateFilterState(SettingFilter &filter, bool force_visible)
{
if (this->setting->desc.flags & SGF_NO_NEWGAME && _game_mode == GM_MENU) {
SETBITS(this->flags, SEF_FILTERED);
return false;
}
CLRBITS(this->flags, SEF_FILTERED);
bool visible = true;