/// <summary> /// Checks any if fields have invalid values and resets them to the default if necessary. /// </summary> public void Validate() { ApiHudConfig defaults = Defaults; if (maxVisible == default(int)) { maxVisible = defaults.maxVisible; } if (hudScale == default(float)) { hudScale = defaults.hudScale; } colors.Validate(); }
public void Validate() { if (apiHudConfig != null) { apiHudConfig.Validate(); } else { apiHudConfig = ApiHudConfig.Defaults; } if (fallbackHudConfig != null) { fallbackHudConfig.Validate(); } else { fallbackHudConfig = NotifHudConfig.Defaults; } }
public ApiHud(ApiHudConfig cfg) { menu = new HudUtilities.ScrollMenu(20); Cfg = cfg; }