public void SetDisplayOption( TodoListDisplayOptions option, bool newValue ) { if( option == TodoListDisplayOptions.Count ) { return; } string prefName = "TodoList" + option.ToString(); if( newValue ) { PlayerPrefs.SetInt( prefName, 1 ); } else { PlayerPrefs.SetInt( prefName, 0 ); } }
public bool GetDisplayOption( TodoListDisplayOptions option ) { if( option == TodoListDisplayOptions.Count ) { return false; } string prefName = "TodoList" + option.ToString(); return PlayerPrefs.GetInt( prefName, 0 ) == 1; }
public void ToggleDisplayOption( TodoListDisplayOptions option ) { SetDisplayOption( option, !GetDisplayOption( option ) ); }