public static bool ShouldBeEnabled(EnabledType visibility) { if (InPauseMenu && (visibility & EnabledType.PauseOnly) == EnabledType.PauseOnly) { return(true); } else if (!InPauseMenu && (visibility & EnabledType.MenuOnly) == EnabledType.MenuOnly) { return(true); } return(false); }
/// <summary> /// Applied to a field, property, or function to determine whether it should be shown in the settings menu /// </summary> /// <param name="enabled">Determines in what scenario should the field be visible in</param> /// <param name="displayName">The display name of the field, property, or function</param> public SettingFieldAttribute(EnabledType enabled = EnabledType.Both, string displayName = null) { IsEnabled = enabled; }