// Token: 0x0600060A RID: 1546 RVA: 0x00033990 File Offset: 0x00031B90 private void LoadSettings() { ZInput.instance.Load(); AudioListener.volume = PlayerPrefs.GetFloat("MasterVolume", AudioListener.volume); MusicMan.m_masterMusicVolume = PlayerPrefs.GetFloat("MusicVolume", 1f); AudioMan.SetSFXVolume(PlayerPrefs.GetFloat("SfxVolume", 1f)); this.m_continousMusic.isOn = (PlayerPrefs.GetInt("ContinousMusic", 1) == 1); PlayerController.m_mouseSens = PlayerPrefs.GetFloat("MouseSensitivity", PlayerController.m_mouseSens); PlayerController.m_invertMouse = (PlayerPrefs.GetInt("InvertMouse", 0) == 1); float @float = PlayerPrefs.GetFloat("GuiScale", 1f); this.m_volumeSlider.value = AudioListener.volume; this.m_sensitivitySlider.value = PlayerController.m_mouseSens; this.m_sfxVolumeSlider.value = AudioMan.GetSFXVolume(); this.m_musicVolumeSlider.value = MusicMan.m_masterMusicVolume; this.m_guiScaleSlider.value = @float * 100f; this.m_invertMouse.isOn = PlayerController.m_invertMouse; this.m_gamepadEnabled.isOn = ZInput.IsGamepadEnabled(); this.m_languageKey = Localization.instance.GetSelectedLanguage(); this.m_language.text = Localization.instance.Localize("$language_" + this.m_languageKey.ToLower()); this.m_cameraShake.isOn = (PlayerPrefs.GetInt("CameraShake", 1) == 1); this.m_shipCameraTilt.isOn = (PlayerPrefs.GetInt("ShipCameraTilt", 1) == 1); this.m_quickPieceSelect.isOn = (PlayerPrefs.GetInt("QuickPieceSelect", 0) == 1); this.m_showKeyHints.isOn = (PlayerPrefs.GetInt("KeyHints", 1) == 1); this.m_dofToggle.isOn = (PlayerPrefs.GetInt("DOF", 1) == 1); this.m_vsyncToggle.isOn = (PlayerPrefs.GetInt("VSync", 0) == 1); this.m_bloomToggle.isOn = (PlayerPrefs.GetInt("Bloom", 1) == 1); this.m_ssaoToggle.isOn = (PlayerPrefs.GetInt("SSAO", 1) == 1); this.m_sunshaftsToggle.isOn = (PlayerPrefs.GetInt("SunShafts", 1) == 1); this.m_aaToggle.isOn = (PlayerPrefs.GetInt("AntiAliasing", 1) == 1); this.m_caToggle.isOn = (PlayerPrefs.GetInt("ChromaticAberration", 1) == 1); this.m_motionblurToggle.isOn = (PlayerPrefs.GetInt("MotionBlur", 1) == 1); this.m_softPartToggle.isOn = (PlayerPrefs.GetInt("SoftPart", 1) == 1); this.m_tesselationToggle.isOn = (PlayerPrefs.GetInt("Tesselation", 1) == 1); this.m_shadowQuality.value = (float)PlayerPrefs.GetInt("ShadowQuality", 2); this.m_lod.value = (float)PlayerPrefs.GetInt("LodBias", 2); this.m_lights.value = (float)PlayerPrefs.GetInt("Lights", 2); this.m_vegetation.value = (float)PlayerPrefs.GetInt("ClutterQuality", 2); this.m_fullscreenToggle.isOn = Screen.fullScreen; this.m_oldFullscreen = this.m_fullscreenToggle.isOn; this.m_oldRes = Screen.currentResolution; this.m_oldRes.width = Screen.width; this.m_oldRes.height = Screen.height; this.m_selectedRes = this.m_oldRes; ZLog.Log(string.Concat(new object[] { "Current res ", Screen.currentResolution.width, "x", Screen.currentResolution.height, " ", Screen.width, "x", Screen.height })); }
static bool Prefix(string name, ref bool __result) { // Need to bypass original function for any required ZInputs that begin // with "Joy" to ensure the VR Controls still work when // Gamepad is disabled. if (VRControls.mainControlsActive && !ZInput.IsGamepadEnabled() && isUsedJoyZinput(name)) { __result = VRControls.instance.GetButtonDown(name); return(false); } return(true); }