示例#1
0
        private static void OnVehicleRestrictionsEnabledChanged(bool val)
        {
            if (!Options.IsGameLoaded())
            {
                return;
            }

            Options.MenuRebuildRequired        = true;
            Options.vehicleRestrictionsEnabled = val;
            if (!val)
            {
                OptionsOverlaysTab.SetVehicleRestrictionsOverlay(false);
            }
        }
        public static void SetVehicleRestrictionsEnabled(bool newValue)
        {
            Options.vehicleRestrictionsEnabled = newValue;
            Options.RebuildMenu();

            if (_enableVehicleRestrictionsToggle != null)
            {
                _enableVehicleRestrictionsToggle.isChecked = newValue;
            }

            if (!newValue)
            {
                OptionsOverlaysTab.SetVehicleRestrictionsOverlay(false);
            }
        }