public static void SetJunctionRestrictionsEnabled(bool newValue) { Options.junctionRestrictionsEnabled = newValue; Options.RebuildMenu(); if (_enableJunctionRestrictionsToggle != null) { _enableJunctionRestrictionsToggle.isChecked = newValue; } if (!newValue) { OptionsOverlaysTab.SetJunctionRestrictionsOverlay(false); } }
private static void OnJunctionRestrictionsEnabledChanged(bool val) { if (!Options.IsGameLoaded()) { return; } Options.junctionRestrictionsEnabled = val; Options.RebuildMenu(); if (!val) { OptionsVehicleRestrictionsTab.SetAllowUTurns(false); OptionsVehicleRestrictionsTab.SetAllowEnterBlockedJunctions(false); OptionsVehicleRestrictionsTab.SetAllowLaneChangesWhileGoingStraight(false); SetTurnOnRedEnabled(false); OptionsOverlaysTab.SetJunctionRestrictionsOverlay(false); } }