public HUDPreferences(String hourFormat, String speedFormat, String toggleFormat) { HourFormat = (hourFormat == "24h" || hourFormat == "12h" ? hourFormat : "24h"); SpeedFormat = (speedFormat == "kmh" || speedFormat == "mph" ? speedFormat : "kmh"); if (toggleFormat == "ARDUINO") { ToggleFormat = ToggleFormat.Arduino; } else { ToggleFormat = ToggleFormat.Timer; } }
public HUDPreferences(String hourFormat, String speedFormat, String toggleFormat) { HourFormat = (hourFormat == "24h" || hourFormat == "12h" ? hourFormat : "24h"); SpeedFormat = (speedFormat == "kmh" || speedFormat == "mph" ? speedFormat : "kmh"); if (toggleFormat == "ARDUINO") { ToggleFormat = ToggleFormat.Arduino; } else { ToggleFormat = ToggleFormat.Timer; } }