Decompiled source of WideEye v2.0.0

Mods/WideEye.dll

Decompiled 3 weeks ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BoneLib;
using BoneLib.BoneMenu;
using BoneLib.Notifications;
using Il2CppInterop.Runtime.InteropTypes.Arrays;
using Il2CppOccaSoftware.Exposure.Runtime;
using Il2CppSLZ.Bonelab;
using Il2CppSLZ.Marrow;
using MelonLoader;
using MelonLoader.Preferences;
using Microsoft.CodeAnalysis;
using UnityEngine;
using UnityEngine.Rendering;
using UnityEngine.Rendering.Universal;
using WideEye;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: MelonInfo(typeof(Mod), "WideEye", "2.0.0", "HL2H0", null)]
[assembly: MelonGame("Stress Level Zero", "BONELAB")]
[assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")]
[assembly: AssemblyCompany("WideEye")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+04c12a5e94838cd81b1366952cf2a81c944ee599")]
[assembly: AssemblyProduct("WideEye")]
[assembly: AssemblyTitle("WideEye")]
[assembly: NeutralResourcesLanguage("en-US")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("2.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace WideEye
{
	public class MenuSetup
	{
		public static FunctionElement GetCameraButton = new FunctionElement("Get Camera", Color.red, (Action)delegate
		{
			Mod.GetTargetCamera(isAuto: false);
		});

		public static Page mainPage;

		public static FloatElement fovSlider { get; private set; }

		public static Page SmoothingPage { get; private set; }

		public static FloatElement P_Smoothing { get; private set; }

		public static FloatElement R_Smoothing { get; private set; }

		public static Page OffsetPage { get; private set; }

		public static Page RotationOffsetPage { get; private set; }

		public static FloatElement X_R_Offset { get; private set; }

		public static FloatElement Y_R_Offset { get; private set; }

		public static FloatElement Z_R_Offset { get; private set; }

		public static Page PositionOffsetPage { get; private set; }

		public static FloatElement X_P_Offset { get; private set; }

		public static FloatElement Y_P_Offset { get; private set; }

		public static FloatElement Z_P_Offset { get; private set; }

		public static Page PostFXPage { get; private set; }

		public static BoolElement PostFXToogle { get; private set; }

		public static Page OtherPage { get; private set; }

		public static Page CameraModePage { get; private set; }

		public static BoolElement Ele_LookAtPlayer { get; private set; }

		public static Page SupportPage { get; private set; }

		public static Page LensDistortionPage { get; private set; }

		public static BoolElement LD_Enabled { get; private set; }

		public static FloatElement LD_CenterX { get; private set; }

		public static FloatElement LD_CenterY { get; private set; }

		public static FloatElement LD_Intensity { get; private set; }

		public static FloatElement LD_Scale { get; private set; }

		public static FloatElement LD_xMultiplier { get; private set; }

		public static FloatElement LD_yMultiplier { get; private set; }

		public static Page ChromaticAberrationPage { get; private set; }

		public static BoolElement CA_Enabled { get; private set; }

		public static FloatElement CA_Intensity { get; private set; }

		public static Page AutoExposurePage { get; private set; }

		public static BoolElement AE_enabled { get; private set; }

		public static EnumElement AE_adaptationMode { get; private set; }

		public static FloatElement AE_D2LS { get; private set; }

		public static FloatElement AE_evCompensation { get; private set; }

		public static FloatElement AE_evMax { get; private set; }

		public static FloatElement AE_evMin { get; private set; }

		public static FloatElement AE_L2DS { get; private set; }

		public static EnumElement AE_MeteringMaskMode { get; private set; }

		public static FloatElement AE_MeteringProceduralFalloff { get; private set; }

		public static void SetupBoneMenu()
		{
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_0073: Unknown result type (might be due to invalid IL or missing references)
			//IL_0097: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a1: Expected O, but got Unknown
			//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d6: Expected O, but got Unknown
			//IL_00e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0137: Unknown result type (might be due to invalid IL or missing references)
			//IL_0153: Unknown result type (might be due to invalid IL or missing references)
			//IL_018d: Unknown result type (might be due to invalid IL or missing references)
			//IL_01da: Unknown result type (might be due to invalid IL or missing references)
			//IL_0227: Unknown result type (might be due to invalid IL or missing references)
			//IL_0274: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_030e: Unknown result type (might be due to invalid IL or missing references)
			//IL_035b: Unknown result type (might be due to invalid IL or missing references)
			//IL_038f: Unknown result type (might be due to invalid IL or missing references)
			//IL_03ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_03e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0432: Unknown result type (might be due to invalid IL or missing references)
			//IL_0466: Unknown result type (might be due to invalid IL or missing references)
			//IL_0482: Unknown result type (might be due to invalid IL or missing references)
			//IL_04bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_04fb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0548: Unknown result type (might be due to invalid IL or missing references)
			//IL_0595: Unknown result type (might be due to invalid IL or missing references)
			//IL_05e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_062f: Unknown result type (might be due to invalid IL or missing references)
			//IL_067c: Unknown result type (might be due to invalid IL or missing references)
			//IL_069d: Unknown result type (might be due to invalid IL or missing references)
			//IL_06ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_071e: Unknown result type (might be due to invalid IL or missing references)
			//IL_073a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0756: Unknown result type (might be due to invalid IL or missing references)
			//IL_07a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_07f0: Unknown result type (might be due to invalid IL or missing references)
			//IL_083d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0871: Unknown result type (might be due to invalid IL or missing references)
			//IL_088d: Unknown result type (might be due to invalid IL or missing references)
			//IL_08da: Unknown result type (might be due to invalid IL or missing references)
			//IL_0927: Unknown result type (might be due to invalid IL or missing references)
			//IL_0974: Unknown result type (might be due to invalid IL or missing references)
			//IL_0998: Unknown result type (might be due to invalid IL or missing references)
			//IL_09a2: Expected O, but got Unknown
			//IL_09ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_09c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a16: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a63: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a87: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a91: Expected O, but got Unknown
			//IL_0a9c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ab8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ae2: Unknown result type (might be due to invalid IL or missing references)
			//IL_0aec: Expected O, but got Unknown
			//IL_0af7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b31: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b5b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b65: Expected O, but got Unknown
			//IL_0b70: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b8c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0bb1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0bbb: Expected O, but got Unknown
			//IL_0bc6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0beb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0bf5: Expected O, but got Unknown
			//IL_0c00: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c24: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c2e: Expected O, but got Unknown
			//IL_0c39: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c59: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c63: Expected O, but got Unknown
			//IL_0c6e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c8e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c98: Expected O, but got Unknown
			//IL_0ca3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0cbf: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ce3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ced: Expected O, but got Unknown
			//IL_0cf8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d1c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d26: Expected O, but got Unknown
			//IL_0d31: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d37: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d41: Expected O, but got Unknown
			mainPage = Page.Root.CreatePage("Wide Eye", Color.white, 0, true);
			fovSlider = mainPage.CreateFloat("FOV", Color.cyan, 72f, 1f, float.MinValue, float.MaxValue, (Action<float>)delegate(float value)
			{
				Mod.ApplyFOV(value);
			});
			mainPage.Add((Element)new FunctionElement("Reset To Default", Color.red, (Action)delegate
			{
				Mod.ResetToDefault(Mod.ResetType.Fov);
			}));
			mainPage.Add((Element)new FunctionElement("Save Preferences", Color.green, (Action)ModPreferences.SavePref));
			PostFXPage = mainPage.CreatePage("Post-Processing", Color.yellow, 0, true);
			PostFXToogle = PostFXPage.CreateBool("Enabled", Color.yellow, true, (Action<bool>)delegate(bool value)
			{
				Mod.ApplyOther(Mod.OtherType.PostFX, value);
			});
			LensDistortionPage = PostFXPage.CreatePage("Lens Distortion", Color.white, 0, true);
			LD_Enabled = LensDistortionPage.CreateBool("Enabled", Color.white, true, (Action<bool>)delegate
			{
				Mod.ApplyLD();
			});
			LD_CenterX = LensDistortionPage.CreateFloat("Center X", Color.red, 0.5f, 0.1f, 0f, 1f, (Action<float>)delegate
			{
				Mod.ApplyLD();
			});
			LD_CenterY = LensDistortionPage.CreateFloat("Center Y", Color.green, 0.5f, 0.1f, 0f, 1f, (Action<float>)delegate
			{
				Mod.ApplyLD();
			});
			LD_Intensity = LensDistortionPage.CreateFloat("Intensity", Color.white, 0.48f, 0.01f, 0f, 1f, (Action<float>)delegate
			{
				Mod.ApplyLD();
			});
			LD_Scale = LensDistortionPage.CreateFloat("Scale", Color.white, 1f, 0.1f, 0f, 1f, (Action<float>)delegate
			{
				Mod.ApplyLD();
			});
			LD_xMultiplier = LensDistortionPage.CreateFloat("X Multiplier", Color.red, 0.59f, 0.01f, 0f, 1f, (Action<float>)delegate
			{
				Mod.ApplyLD();
			});
			LD_yMultiplier = LensDistortionPage.CreateFloat("Y Multiplier", Color.green, 1f, 0.01f, 0f, 1f, (Action<float>)delegate
			{
				Mod.ApplyLD();
			});
			LensDistortionPage.CreateFunction("Reset To Default", Color.red, (Action)delegate
			{
				Mod.ResetToDefault(Mod.ResetType.LensDistortion);
			});
			ChromaticAberrationPage = PostFXPage.CreatePage("ChromaticAberration", Color.white, 0, true);
			CA_Enabled = ChromaticAberrationPage.CreateBool("Enabled", Color.white, true, (Action<bool>)delegate
			{
				Mod.ApplyCA();
			});
			CA_Intensity = ChromaticAberrationPage.CreateFloat("Intensity", Color.white, 0.123f, 0.01f, 0f, 1f, (Action<float>)delegate
			{
				Mod.ApplyCA();
			});
			ChromaticAberrationPage.CreateFunction("Reset To Default", Color.red, (Action)delegate
			{
				Mod.ResetToDefault(Mod.ResetType.ChromaticAberration);
			});
			AutoExposurePage = PostFXPage.CreatePage("AutoExposure", Color.white, 0, true);
			AE_enabled = AutoExposurePage.CreateBool("Enabled", Color.white, true, (Action<bool>)delegate
			{
				Mod.ApplyAE();
			});
			AE_adaptationMode = AutoExposurePage.CreateEnum("Adaptation Mode", Color.white, (Enum)(object)(AutoExposureAdaptationMode)0, (Action<Enum>)delegate
			{
				Mod.ApplyAE();
			});
			AE_D2LS = AutoExposurePage.CreateFloat("Dark To Light Speed", Color.white, 3f, 0.1f, float.MinValue, float.MaxValue, (Action<float>)delegate
			{
				Mod.ApplyAE();
			});
			AE_evCompensation = AutoExposurePage.CreateFloat("EV Compensation", Color.white, 2.5f, 0.1f, float.MinValue, float.MaxValue, (Action<float>)delegate
			{
				Mod.ApplyAE();
			});
			AE_evMax = AutoExposurePage.CreateFloat("EV Max", Color.white, 1.2f, 0.1f, float.MinValue, float.MaxValue, (Action<float>)delegate
			{
				Mod.ApplyAE();
			});
			AE_evMin = AutoExposurePage.CreateFloat("EV Min", Color.white, -1.2f, 0.1f, float.MinValue, float.MaxValue, (Action<float>)delegate
			{
				Mod.ApplyAE();
			});
			AE_L2DS = AutoExposurePage.CreateFloat("Light To Dark Speed", Color.white, 1f, 0.1f, float.MinValue, float.MaxValue, (Action<float>)delegate
			{
				Mod.ApplyAE();
			});
			AE_MeteringMaskMode = AutoExposurePage.CreateEnum("Metering Mask Mode", Color.white, (Enum)(object)(AutoExposureMeteringMaskMode)0, (Action<Enum>)null);
			AE_MeteringProceduralFalloff = AutoExposurePage.CreateFloat("Metering Procedural Falloff", Color.white, 2f, 0.1f, float.MinValue, float.MaxValue, (Action<float>)delegate
			{
				Mod.ApplyAE();
			});
			AutoExposurePage.CreateFunction("Reset To Default", Color.red, (Action)delegate
			{
				Mod.ResetToDefault(Mod.ResetType.AutoExposure);
			});
			OffsetPage = mainPage.CreatePage("Offset", Color.white, 0, true);
			RotationOffsetPage = OffsetPage.CreatePage("Rotation Offset", Color.white, 0, true);
			X_R_Offset = RotationOffsetPage.CreateFloat("X Rotation Offset", Color.red, 11f, 1f, float.MinValue, float.MaxValue, (Action<float>)delegate
			{
				Mod.ApplyOffset(Mod.OffsetType.Rotation);
			});
			Y_R_Offset = RotationOffsetPage.CreateFloat("Y Rotation Offset", Color.green, 0f, 1f, float.MinValue, float.MaxValue, (Action<float>)delegate
			{
				Mod.ApplyOffset(Mod.OffsetType.Rotation);
			});
			Z_R_Offset = RotationOffsetPage.CreateFloat("Z Rotation Offset", Color.blue, 0f, 1f, float.MinValue, float.MaxValue, (Action<float>)delegate
			{
				Mod.ApplyOffset(Mod.OffsetType.Rotation);
			});
			RotationOffsetPage.CreateFunction("Reset To Default", Color.red, (Action)delegate
			{
				Mod.ResetToDefault(Mod.ResetType.RotationOffset);
			});
			PositionOffsetPage = OffsetPage.CreatePage("Position Offset", Color.white, 0, true);
			X_P_Offset = PositionOffsetPage.CreateFloat("X Position Offset", Color.red, 0f, 0.1f, float.MinValue, float.MaxValue, (Action<float>)delegate
			{
				Mod.ApplyOffset(Mod.OffsetType.Position);
			});
			Y_P_Offset = PositionOffsetPage.CreateFloat("Y Position Offset", Color.green, 0f, 0.1f, float.MinValue, float.MaxValue, (Action<float>)delegate
			{
				Mod.ApplyOffset(Mod.OffsetType.Position);
			});
			Z_P_Offset = PositionOffsetPage.CreateFloat("Z Position Offset", Color.blue, 0f, 0.1f, float.MinValue, float.MaxValue, (Action<float>)delegate
			{
				Mod.ApplyOffset(Mod.OffsetType.Position);
			});
			PositionOffsetPage.Add((Element)new FunctionElement("Reset To Default", Color.red, (Action)delegate
			{
				Mod.ResetToDefault(Mod.ResetType.PostionOffset);
			}));
			SmoothingPage = mainPage.CreatePage("Smoothing", Color.white, 0, true);
			P_Smoothing = SmoothingPage.CreateFloat("Position Smoothing", Color.white, 0f, 1f, float.MinValue, 2.1474836E+09f, (Action<float>)delegate
			{
				Mod.ApplySmoothing();
			});
			R_Smoothing = SmoothingPage.CreateFloat("Rotation Smoothing", Color.white, 0f, 1f, float.MinValue, 2.1474836E+09f, (Action<float>)delegate
			{
				Mod.ApplySmoothing();
			});
			SmoothingPage.Add((Element)new FunctionElement("Reset To Default", Color.red, (Action)delegate
			{
				Mod.ResetToDefault(Mod.ResetType.Smoothing);
			}));
			CameraModePage = mainPage.CreatePage("Camera Mode", Color.white, 0, true);
			CameraModePage.Add((Element)new EnumElement("Camera Mode", Color.white, (Enum)Mod.CameraMode.Head, (Action<Enum>)delegate(Enum value)
			{
				Mod.ApplyCameraMode((Mod.CameraMode)(object)value);
			}));
			Ele_LookAtPlayer = CameraModePage.CreateBool("Look At Player", Color.white, false, (Action<bool>)delegate(bool value)
			{
				Mod.LookAtPlayer = value;
			});
			CameraModePage.Add((Element)new EnumElement("Look At :", Color.white, (Enum)Mod.LookAtPositionType.Head, (Action<Enum>)delegate(Enum value)
			{
				Mod.ApplyLookAtTransform((Mod.LookAtPositionType)(object)value);
			}));
			OtherPage = mainPage.CreatePage("Other", Color.gray, 0, true);
			OtherPage.Add((Element)new BoolElement("Head Meshes", Color.yellow, true, (Action<bool>)delegate(bool value)
			{
				Mod.ApplyOther(Mod.OtherType.HeadMesh, value);
			}));
			OtherPage.Add((Element)new BoolElement("Hair Meshes", Color.yellow, true, (Action<bool>)delegate(bool value)
			{
				Mod.ApplyOther(Mod.OtherType.HairMeshes, value);
			}));
			OtherPage.Add((Element)new FunctionElement("Reset All To Default", Color.red, (Action)delegate
			{
				Mod.ResetToDefault(Mod.ResetType.All);
			}));
			OtherPage.Add((Element)new FunctionElement("Load Preferences", Color.green, (Action)ModPreferences.LoadPref));
			OtherPage.Add((Element)new FunctionElement("Clear All Preferences", Color.red, (Action)ModPreferences.ClearPref));
			SupportPage = OtherPage.CreatePage("Support", Color.white, 0, true);
			SupportPage.Add((Element)new FunctionElement("Open GitHub Issues", Color.white, (Action)delegate
			{
				Application.OpenURL("https://github.com/HL2H0/WideEye/issues");
				Mod.SendNotfi("WideEye | Success", "Opened the GitHub issues page for WideEye On Desktop", (NotificationType)3, 2f, showTitleOnPopup: true);
			}));
			SupportPage.Add((Element)new FunctionElement("Discord", Color.blue, (Action)delegate
			{
				GUIUtility.systemCopyBuffer = "@hiiiiiiiiiiiiiiiiii";
				Mod.SendNotfi("WideEye | Success", "Copied Username to clipboard", (NotificationType)3, 3f, showTitleOnPopup: true);
			}));
			SupportPage.Add((Element)new FunctionElement("Version : 2.0.0", Color.white, (Action)null));
		}
	}
	public static class BuildInfo
	{
		public const string Name = "WideEye";

		public const string Version = "2.0.0";

		public const string Author = "HL2H0";
	}
	public class Mod : MelonMod
	{
		public enum OffsetType
		{
			Position,
			Rotation
		}

		public enum ResetType
		{
			Fov,
			Smoothing,
			RotationOffset,
			PostionOffset,
			LensDistortion,
			ChromaticAberration,
			AutoExposure,
			All
		}

		public enum PostFXType
		{
			LensDistortion,
			ChromaticAberration,
			AutoExposure
		}

		public enum CameraMode
		{
			Head,
			Pinned
		}

		public enum LookAtPositionType
		{
			RightHand,
			LeftHand,
			Head
		}

		public enum OtherType
		{
			HairMeshes,
			HeadMesh,
			PostFX
		}

		public static PlayerAvatarArt RM_playerArtComponent;

		public static GameObject SC_GameObject;

		public static GameObject ST_GameObject;

		public static Camera SC_CameraComponent;

		public static SmoothFollower SC_SmootherComponent;

		public static Transform ST_Transform;

		public static Volume SC_VolumeComponent;

		private static LensDistortion LensDistortionOverride;

		private static ChromaticAberration chromaticAberrationOverride;

		private static AutoExposure autoExposureOverride;

		public static Transform LookAtTransform;

		public static CameraMode cameraMode;

		public static bool LookAtPlayer;

		private static bool gotcamera;

		public static void SendNotfi(string Title, string Message, NotificationType Type, float PopupLength, bool showTitleOnPopup)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: Expected O, but got Unknown
			Notification val = new Notification
			{
				Title = NotificationText.op_Implicit(Title),
				Message = NotificationText.op_Implicit(Message),
				Type = Type,
				PopupLength = PopupLength,
				ShowTitleOnPopup = showTitleOnPopup
			};
			Notifier.Send(val);
		}

		public override void OnInitializeMelon()
		{
			ModPreferences.CreatePref();
			MenuSetup.SetupBoneMenu();
			Hooking.OnLevelUnloaded += BoneLib_OnLevelUnloaded;
			Hooking.OnUIRigCreated += BoneLib_OnUIRigCreated;
			((MelonBase)this).LoggerInstance.Msg("WideEye 2.0.0 Has Been Initialized.");
		}

		private void BoneLib_OnUIRigCreated()
		{
			MelonCoroutines.Start(WaitForCameraRig());
			MelonLogger.Msg(ConsoleColor.Green, "UI Rig Created, Trying To Get Camera...");
		}

		private void BoneLib_OnLevelUnloaded()
		{
			cameraMode = CameraMode.Head;
			gotcamera = false;
			LookAtPlayer = false;
			MenuSetup.Ele_LookAtPlayer.Value = false;
		}

		public override void OnUpdate()
		{
			((MelonBase)this).OnUpdate();
			if (LookAtPlayer && cameraMode == CameraMode.Pinned && gotcamera)
			{
				SC_GameObject.transform.LookAt(LookAtTransform);
			}
		}

		private static IEnumerator WaitForCameraRig()
		{
			yield return (object)new WaitForSeconds(5f);
			GetTargetCamera(isAuto: true);
		}

		public static void GetTargetCamera(bool isAuto)
		{
			if (HelperMethods.IsAndroid())
			{
				SendNotfi("WideEye | Error", "WideEye doesn't work with Android", (NotificationType)2, 3f, showTitleOnPopup: true);
				return;
			}
			SC_GameObject = GameObject.Find("GameplaySystems [0]/DisabledContainer/Spectator Camera/Spectator Camera");
			ST_GameObject = GameObject.Find("RigManager(bonelab) [0]/VRControllerRig/TrackingSpace/Headset/Spectator Target");
			if ((Object)(object)SC_GameObject == (Object)null || (Object)(object)ST_GameObject == (Object)null)
			{
				if (isAuto)
				{
					SendNotfi("WideEye | Error", "Couldn't find the camera automatically.\nPlease open WideEye's menu and find it manually.", (NotificationType)2, 3f, showTitleOnPopup: true);
					MelonLogger.Error("Couldn't find the camera automatically");
					MenuSetup.mainPage.Add((Element)(object)MenuSetup.GetCameraButton);
				}
				else
				{
					SendNotfi("WideEye | Error", "Couldn't find the camera.", (NotificationType)2, 3f, showTitleOnPopup: true);
					MelonLogger.Error("Couldn't find the camera");
				}
			}
			else if (!gotcamera)
			{
				if (!SC_GameObject.active)
				{
					SendNotfi("WideEye | Warning", "Spectator Camera Is Not Active.\nModifications will not take action.", (NotificationType)1, 5f, showTitleOnPopup: true);
					MelonLogger.Warning("Spectator Camera Is Not Active. Modifications will not take action.");
				}
				RM_playerArtComponent = ((Component)Player.ControllerRig).gameObject.GetComponent<PlayerAvatarArt>();
				ST_Transform = ST_GameObject.GetComponent<Transform>();
				SC_SmootherComponent = SC_GameObject.GetComponent<SmoothFollower>();
				SC_VolumeComponent = SC_GameObject.GetComponent<Volume>();
				SC_CameraComponent = SC_GameObject.GetComponent<Camera>();
				GetPostFXOverrides();
				if (isAuto)
				{
					SendNotfi("WideEye | Scusses", "Found camera automatically", (NotificationType)3, 3f, showTitleOnPopup: true);
					MelonLogger.Msg(ConsoleColor.Green, "Found camera automatically");
				}
				else
				{
					MenuSetup.mainPage.Remove((Element)(object)MenuSetup.GetCameraButton);
					SendNotfi("WideEye | Scusses", "Found camera manually", (NotificationType)3, 2f, showTitleOnPopup: true);
					MelonLogger.Msg(ConsoleColor.Green, "Found camera manually");
				}
				ModPreferences.LoadPref();
				gotcamera = true;
				LookAtTransform = ((Component)Player.Head).transform;
			}
		}

		public static void GetPostFXOverrides()
		{
			SC_VolumeComponent.profile.TryGet<LensDistortion>(ref LensDistortionOverride);
			SC_VolumeComponent.profile.TryGet<ChromaticAberration>(ref chromaticAberrationOverride);
			SC_VolumeComponent.profile.TryGet<AutoExposure>(ref autoExposureOverride);
		}

		public static void ResetToDefault(ResetType resetType)
		{
			//IL_006b: Unknown result type (might be due to invalid IL or missing references)
			//IL_009b: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_015c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0187: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ae: Unknown result type (might be due to invalid IL or missing references)
			switch (resetType)
			{
			case ResetType.Fov:
				ApplyFOV(75f, SyncElementValue: true, MenuSetup.fovSlider);
				break;
			case ResetType.Smoothing:
				ApplySmoothing(0f, 0f, SyncElementValue: true);
				break;
			case ResetType.RotationOffset:
				ApplyOffset(new Vector3(11f, 0f, 0f), OffsetType.Rotation, SyncElementValue: true, MenuSetup.X_R_Offset, MenuSetup.Y_R_Offset, MenuSetup.Z_R_Offset);
				break;
			case ResetType.PostionOffset:
				ApplyOffset(new Vector3(0f, 0f, 0f), OffsetType.Position, SyncElementValue: true, MenuSetup.X_P_Offset, MenuSetup.Y_P_Offset, MenuSetup.Z_P_Offset);
				break;
			case ResetType.LensDistortion:
				ApplyLD(Enabled: true, new Vector2(0.5f, 0.5f), 0.48f, 1f, 0.59f, 1f, SyncElements: true);
				break;
			case ResetType.ChromaticAberration:
				ApplyCA(Enabled: true, 0.123f, SyncElements: true);
				break;
			case ResetType.AutoExposure:
				ApplyAE(Enabled: true, (AutoExposureAdaptationMode)0, 3f, 2.5f, 1.2f, -1.2f, 1f, (AutoExposureMeteringMaskMode)0, 2f, SyncElements: true);
				break;
			case ResetType.All:
				ApplyFOV(75f, SyncElementValue: true, MenuSetup.fovSlider);
				ApplySmoothing(0f, 0f, SyncElementValue: true);
				ApplyOffset(new Vector3(11f, 0f, 0f), OffsetType.Rotation, SyncElementValue: true, MenuSetup.X_R_Offset, MenuSetup.Y_R_Offset, MenuSetup.Z_R_Offset);
				ApplyOffset(new Vector3(0f, 0f, 0f), OffsetType.Position, SyncElementValue: true, MenuSetup.X_P_Offset, MenuSetup.Y_P_Offset, MenuSetup.Z_P_Offset);
				ApplyLD(Enabled: true, new Vector2(0.5f, 0.5f), 0.48f, 1f, 0.59f, 1f, SyncElements: true);
				ApplyCA(Enabled: true, 0.123f, SyncElements: true);
				ApplyAE(Enabled: true, (AutoExposureAdaptationMode)0, 3f, 2.5f, 1.2f, -1.2f, 1f, (AutoExposureMeteringMaskMode)0, 2f, SyncElements: true);
				((Behaviour)SC_VolumeComponent).enabled = true;
				MenuSetup.PostFXToogle.Value = true;
				break;
			}
		}

		public static void ApplyCameraMode(CameraMode mode)
		{
			cameraMode = mode;
			switch (mode)
			{
			case CameraMode.Head:
				((Behaviour)SC_SmootherComponent).enabled = true;
				LookAtPlayer = false;
				MenuSetup.Ele_LookAtPlayer.Value = false;
				break;
			case CameraMode.Pinned:
				((Behaviour)SC_SmootherComponent).enabled = false;
				break;
			}
		}

		public static void ApplyLookAtTransform(LookAtPositionType type)
		{
			switch (type)
			{
			case LookAtPositionType.Head:
				LookAtTransform = ((Component)Player.Head).transform;
				break;
			case LookAtPositionType.RightHand:
				LookAtTransform = ((Component)Player.RightHand).transform;
				break;
			case LookAtPositionType.LeftHand:
				LookAtTransform = ((Component)Player.LeftHand).transform;
				break;
			}
		}

		public static void ApplyFOV(float fov, bool SyncElementValue = false, FloatElement FovEle = null)
		{
			SC_CameraComponent.fieldOfView = fov;
			if (SyncElementValue)
			{
				FovEle.Value = fov;
			}
		}

		public static void ApplyOther(OtherType type, bool value, bool syncElemnent = false)
		{
			switch (type)
			{
			case OtherType.PostFX:
				((Behaviour)SC_VolumeComponent).enabled = value;
				break;
			case OtherType.HeadMesh:
				if (!value)
				{
					RM_playerArtComponent.DisableHead();
				}
				else
				{
					RM_playerArtComponent.EnableHead();
				}
				foreach (SkinnedMeshRenderer item in (Il2CppArrayBase<SkinnedMeshRenderer>)(object)Player.Avatar.headMeshes)
				{
					((Renderer)item).enabled = value;
				}
				break;
			case OtherType.HairMeshes:
				if (!value)
				{
					RM_playerArtComponent.DisableHair();
				}
				else
				{
					RM_playerArtComponent.EnableHair();
				}
				foreach (SkinnedMeshRenderer item2 in (Il2CppArrayBase<SkinnedMeshRenderer>)(object)Player.Avatar.hairMeshes)
				{
					((Renderer)item2).enabled = value;
				}
				break;
			}
			if (syncElemnent)
			{
				MenuSetup.PostFXToogle.Value = value;
			}
		}

		public static void ApplyOffset(Vector3 Offset, OffsetType offsetType, bool SyncElementValue = false, FloatElement EleX = null, FloatElement EleY = null, FloatElement EleZ = null)
		{
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_0046: Unknown result type (might be due to invalid IL or missing references)
			//IL_0054: Unknown result type (might be due to invalid IL or missing references)
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			switch (offsetType)
			{
			case OffsetType.Position:
				ST_Transform.localPosition = Offset;
				break;
			case OffsetType.Rotation:
				ST_Transform.localRotation = Quaternion.Euler(Offset);
				break;
			}
			if (SyncElementValue)
			{
				EleX.Value = Offset.x;
				EleY.Value = Offset.y;
				EleZ.Value = Offset.z;
			}
		}

		public static void ApplyOffset(OffsetType type)
		{
			//IL_0063: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Unknown result type (might be due to invalid IL or missing references)
			switch (type)
			{
			case OffsetType.Rotation:
				ST_Transform.localRotation = Quaternion.Euler(MenuSetup.X_R_Offset.Value, MenuSetup.Y_R_Offset.Value, MenuSetup.Z_R_Offset.Value);
				break;
			case OffsetType.Position:
				ST_Transform.localPosition = new Vector3(MenuSetup.X_P_Offset.Value, MenuSetup.Y_P_Offset.Value, MenuSetup.Z_P_Offset.Value);
				break;
			}
		}

		public static void ApplyLD(bool Enabled, Vector2 Center, float Intensity, float Scale, float xMulti, float yMulti, bool SyncElements)
		{
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: Unknown result type (might be due to invalid IL or missing references)
			//IL_008d: Unknown result type (might be due to invalid IL or missing references)
			((VolumeComponent)LensDistortionOverride).active = Enabled;
			((VolumeParameter<Vector2>)(object)LensDistortionOverride.center).value = Center;
			((VolumeParameter<float>)(object)LensDistortionOverride.intensity).value = Intensity;
			((VolumeParameter<float>)(object)LensDistortionOverride.scale).value = Scale;
			((VolumeParameter<float>)(object)LensDistortionOverride.xMultiplier).value = xMulti;
			((VolumeParameter<float>)(object)LensDistortionOverride.yMultiplier).value = yMulti;
			if (SyncElements)
			{
				MenuSetup.LD_Enabled.Value = Enabled;
				MenuSetup.LD_CenterX.Value = Center.x;
				MenuSetup.LD_CenterY.Value = Center.y;
				MenuSetup.LD_Intensity.Value = Intensity;
				MenuSetup.LD_Scale.Value = Scale;
				MenuSetup.LD_xMultiplier.Value = xMulti;
				MenuSetup.LD_yMultiplier.Value = yMulti;
			}
		}

		public static void ApplyLD()
		{
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			((VolumeComponent)LensDistortionOverride).active = MenuSetup.LD_Enabled.Value;
			((VolumeParameter<Vector2>)(object)LensDistortionOverride.center).value = new Vector2(MenuSetup.LD_CenterX.Value, MenuSetup.LD_CenterY.Value);
			((VolumeParameter<float>)(object)LensDistortionOverride.intensity).value = MenuSetup.LD_Intensity.Value;
			((VolumeParameter<float>)(object)LensDistortionOverride.scale).value = MenuSetup.LD_Scale.Value;
			((VolumeParameter<float>)(object)LensDistortionOverride.xMultiplier).value = MenuSetup.LD_xMultiplier.Value;
			((VolumeParameter<float>)(object)LensDistortionOverride.yMultiplier).value = MenuSetup.LD_yMultiplier.Value;
		}

		public static void ApplyCA(bool Enabled, float Intensity, bool SyncElements)
		{
			((VolumeComponent)chromaticAberrationOverride).active = Enabled;
			((VolumeParameter<float>)(object)chromaticAberrationOverride.intensity).value = Intensity;
			if (SyncElements)
			{
				MenuSetup.CA_Enabled.Value = Enabled;
				MenuSetup.CA_Intensity.Value = Intensity;
			}
		}

		public static void ApplyCA()
		{
			((VolumeComponent)chromaticAberrationOverride).active = MenuSetup.CA_Enabled.Value;
			((VolumeParameter<float>)(object)chromaticAberrationOverride.intensity).value = MenuSetup.CA_Intensity.Value;
		}

		public static void ApplyAE(bool Enabled, AutoExposureAdaptationMode adaptationMode, float D2LS, float evCompen, float evMax, float evMin, float L2DS, AutoExposureMeteringMaskMode meteringMaskMode, float MeteringProceduralFalloff, bool SyncElements)
		{
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_0080: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_0102: Unknown result type (might be due to invalid IL or missing references)
			((VolumeComponent)autoExposureOverride).active = Enabled;
			((VolumeParameter<AutoExposureAdaptationMode>)(object)autoExposureOverride.adaptationMode).value = adaptationMode;
			((VolumeParameter<float>)(object)autoExposureOverride.darkToLightSpeed).value = D2LS;
			((VolumeParameter<float>)(object)autoExposureOverride.evCompensation).value = evCompen;
			((VolumeParameter<float>)(object)autoExposureOverride.evMax).value = evMax;
			((VolumeParameter<float>)(object)autoExposureOverride.evMin).value = evMin;
			((VolumeParameter<float>)(object)autoExposureOverride.lightToDarkSpeed).value = L2DS;
			((VolumeParameter<AutoExposureMeteringMaskMode>)(object)autoExposureOverride.meteringMaskMode).value = meteringMaskMode;
			((VolumeParameter<float>)(object)autoExposureOverride.meteringProceduralFalloff).value = MeteringProceduralFalloff;
			if (SyncElements)
			{
				MenuSetup.AE_enabled.Value = Enabled;
				MenuSetup.AE_adaptationMode.Value = (Enum)(object)adaptationMode;
				MenuSetup.AE_D2LS.Value = D2LS;
				MenuSetup.AE_evCompensation.Value = evCompen;
				MenuSetup.AE_evMax.Value = evMax;
				MenuSetup.AE_evMin.Value = evMin;
				MenuSetup.AE_L2DS.Value = L2DS;
				MenuSetup.AE_MeteringMaskMode.Value = (Enum)(object)meteringMaskMode;
				MenuSetup.AE_MeteringProceduralFalloff.Value = MeteringProceduralFalloff;
			}
		}

		public static void ApplyAE()
		{
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cb: Unknown result type (might be due to invalid IL or missing references)
			((VolumeComponent)autoExposureOverride).active = MenuSetup.AE_enabled.Value;
			((VolumeParameter<AutoExposureAdaptationMode>)(object)autoExposureOverride.adaptationMode).value = (AutoExposureAdaptationMode)(object)MenuSetup.AE_adaptationMode.Value;
			((VolumeParameter<float>)(object)autoExposureOverride.darkToLightSpeed).value = MenuSetup.AE_D2LS.Value;
			((VolumeParameter<float>)(object)autoExposureOverride.evCompensation).value = MenuSetup.AE_evCompensation.Value;
			((VolumeParameter<float>)(object)autoExposureOverride.evMax).value = MenuSetup.AE_evMax.Value;
			((VolumeParameter<float>)(object)autoExposureOverride.evMin).value = MenuSetup.AE_evMin.Value;
			((VolumeParameter<float>)(object)autoExposureOverride.lightToDarkSpeed).value = MenuSetup.AE_L2DS.Value;
			((VolumeParameter<AutoExposureMeteringMaskMode>)(object)autoExposureOverride.meteringMaskMode).value = (AutoExposureMeteringMaskMode)(object)MenuSetup.AE_MeteringMaskMode.Value;
			((VolumeParameter<float>)(object)autoExposureOverride.meteringProceduralFalloff).value = MenuSetup.AE_MeteringProceduralFalloff.Value;
		}

		public static void ApplySmoothing(float RotationSmoothingValue, float PositionSmoothingValue, bool SyncElementValue)
		{
			SC_SmootherComponent.RotationalSmoothTime = RotationSmoothingValue;
			SC_SmootherComponent.TranslationSmoothTime = PositionSmoothingValue;
			if (SyncElementValue)
			{
				MenuSetup.P_Smoothing.Value = RotationSmoothingValue;
				MenuSetup.R_Smoothing.Value = PositionSmoothingValue;
			}
		}

		public static void ApplySmoothing()
		{
			SC_SmootherComponent.RotationalSmoothTime = MenuSetup.R_Smoothing.Value;
			SC_SmootherComponent.TranslationSmoothTime = MenuSetup.P_Smoothing.Value;
		}
	}
	public class ModPreferences
	{
		private static MelonPreferences_Category Categ_WideEye;

		private static MelonPreferences_Entry<float> Pref_Fov;

		private static MelonPreferences_Entry<bool> Pref_PostFX;

		private static MelonPreferences_Entry<Vector3> Pref_RotationOffset;

		private static MelonPreferences_Entry<Vector3> Pref_PositionOffset;

		private static MelonPreferences_Entry<float> Pref_RotationSmoothing;

		private static MelonPreferences_Entry<float> Pref_PositionSmoothing;

		private static MelonPreferences_Category Categ_PFX_LD;

		private static MelonPreferences_Entry<bool> Pref_LD_Enabled;

		private static MelonPreferences_Entry<Vector2> Pref_LD_Center;

		private static MelonPreferences_Entry<float> Pref_LD_Intensity;

		private static MelonPreferences_Entry<float> Pref_LD_Scale;

		private static MelonPreferences_Entry<float> Pref_LD_xMultiplier;

		private static MelonPreferences_Entry<float> Pref_LD_yMultiplier;

		private static MelonPreferences_Category Categ_PFX_CA;

		private static MelonPreferences_Entry<bool> Pref_CA_Enabled;

		private static MelonPreferences_Entry<float> Pref_CA_Intensity;

		private static MelonPreferences_Category Categ_PFX_AE;

		private static MelonPreferences_Entry<bool> Pref_AE_Enabled;

		private static MelonPreferences_Entry<AutoExposureAdaptationMode> Pref_AE_AdaptationMode;

		private static MelonPreferences_Entry<float> Pref_AE_D2LS;

		private static MelonPreferences_Entry<float> Pref_AE_evCompensation;

		private static MelonPreferences_Entry<float> Pref_AE_evMax;

		private static MelonPreferences_Entry<float> Pref_AE_evMin;

		private static MelonPreferences_Entry<float> Pref_AE_L2DS;

		private static MelonPreferences_Entry<AutoExposureMeteringMaskMode> Pref_AE_Metering_Mask;

		private static MelonPreferences_Entry<float> Pref_AE_MetProcedFalloff;

		public static void CreatePref()
		{
			//IL_0063: Unknown result type (might be due to invalid IL or missing references)
			//IL_0082: Unknown result type (might be due to invalid IL or missing references)
			//IL_0113: Unknown result type (might be due to invalid IL or missing references)
			Categ_WideEye = MelonPreferences.CreateCategory("WideEye");
			Pref_Fov = Categ_WideEye.CreateEntry<float>("Fov", 75f, (string)null, (string)null, false, false, (ValueValidator)null, (string)null);
			Pref_PostFX = Categ_WideEye.CreateEntry<bool>("PostFX", true, (string)null, (string)null, false, false, (ValueValidator)null, (string)null);
			Pref_RotationOffset = Categ_WideEye.CreateEntry<Vector3>("RotationOffset", new Vector3(11f, 0f, 0f), (string)null, (string)null, false, false, (ValueValidator)null, (string)null);
			Pref_PositionOffset = Categ_WideEye.CreateEntry<Vector3>("PositionOffset", Vector3.zero, (string)null, (string)null, false, false, (ValueValidator)null, (string)null);
			Pref_RotationSmoothing = Categ_WideEye.CreateEntry<float>("RotationSmoothing", 0f, (string)null, (string)null, false, false, (ValueValidator)null, (string)null);
			Pref_PositionSmoothing = Categ_WideEye.CreateEntry<float>("PositionSmoothing", 0f, (string)null, (string)null, false, false, (ValueValidator)null, (string)null);
			Categ_PFX_LD = MelonPreferences.CreateCategory("WideEye_PostFX_LensDistortion");
			Pref_LD_Enabled = Categ_PFX_LD.CreateEntry<bool>("Enabled", true, (string)null, (string)null, false, false, (ValueValidator)null, (string)null);
			Pref_LD_Center = Categ_PFX_LD.CreateEntry<Vector2>("Center", new Vector2(0.5f, 0.5f), (string)null, (string)null, false, false, (ValueValidator)null, (string)null);
			Pref_LD_Intensity = Categ_PFX_LD.CreateEntry<float>("Intensity", 0.48f, (string)null, (string)null, false, false, (ValueValidator)null, (string)null);
			Pref_LD_Scale = Categ_PFX_LD.CreateEntry<float>("Scale", 1f, (string)null, (string)null, false, false, (ValueValidator)null, (string)null);
			Pref_LD_xMultiplier = Categ_PFX_LD.CreateEntry<float>("xMultiplier", 0.59f, (string)null, (string)null, false, false, (ValueValidator)null, (string)null);
			Pref_LD_yMultiplier = Categ_PFX_LD.CreateEntry<float>("yMultiplier", 0.59f, (string)null, (string)null, false, false, (ValueValidator)null, (string)null);
			Categ_PFX_CA = MelonPreferences.CreateCategory("WideEye_PostFX_ChromaticAberration");
			Pref_CA_Enabled = Categ_PFX_CA.CreateEntry<bool>("Enabled", true, (string)null, (string)null, false, false, (ValueValidator)null, (string)null);
			Pref_CA_Intensity = Categ_PFX_CA.CreateEntry<float>("Intensity", 0.123f, (string)null, (string)null, false, false, (ValueValidator)null, (string)null);
			Categ_PFX_AE = MelonPreferences.CreateCategory("WideEye_PostFX_AutoExposure");
			Pref_AE_Enabled = Categ_PFX_AE.CreateEntry<bool>("Enabled", true, (string)null, (string)null, false, false, (ValueValidator)null, (string)null);
			Pref_AE_AdaptationMode = Categ_PFX_AE.CreateEntry<AutoExposureAdaptationMode>("AdaptationMode", (AutoExposureAdaptationMode)0, (string)null, (string)null, false, false, (ValueValidator)null, (string)null);
			Pref_AE_D2LS = Categ_PFX_AE.CreateEntry<float>("DarkToLightSpeed", 3f, (string)null, (string)null, false, false, (ValueValidator)null, (string)null);
			Pref_AE_evCompensation = Categ_PFX_AE.CreateEntry<float>("evCompensation", 2.5f, (string)null, (string)null, false, false, (ValueValidator)null, (string)null);
			Pref_AE_evMax = Categ_PFX_AE.CreateEntry<float>("evMax", 1.2f, (string)null, (string)null, false, false, (ValueValidator)null, (string)null);
			Pref_AE_evMin = Categ_PFX_AE.CreateEntry<float>("evMin", -1.2f, (string)null, (string)null, false, false, (ValueValidator)null, (string)null);
			Pref_AE_L2DS = Categ_PFX_AE.CreateEntry<float>("LightToDarkSpeed", 1f, (string)null, (string)null, false, false, (ValueValidator)null, (string)null);
			Pref_AE_Metering_Mask = Categ_PFX_AE.CreateEntry<AutoExposureMeteringMaskMode>("MeteringMaskMode", (AutoExposureMeteringMaskMode)0, (string)null, (string)null, false, false, (ValueValidator)null, (string)null);
			Pref_AE_MetProcedFalloff = Categ_PFX_AE.CreateEntry<float>("MeteringProceduralFalloff", 2f, (string)null, (string)null, false, false, (ValueValidator)null, (string)null);
		}

		public static void LoadPref()
		{
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_0064: Unknown result type (might be due to invalid IL or missing references)
			//IL_00aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_0108: Unknown result type (might be due to invalid IL or missing references)
			//IL_0144: Unknown result type (might be due to invalid IL or missing references)
			Mod.ApplyFOV(Pref_Fov.Value, SyncElementValue: true, MenuSetup.fovSlider);
			Mod.ApplyOther(Mod.OtherType.PostFX, Pref_PostFX.Value, syncElemnent: true);
			MenuSetup.PostFXToogle.Value = Pref_PostFX.Value;
			Mod.ApplyOffset(Pref_RotationOffset.Value, Mod.OffsetType.Rotation, SyncElementValue: true, MenuSetup.X_R_Offset, MenuSetup.Y_R_Offset, MenuSetup.Z_R_Offset);
			Mod.ApplyOffset(Pref_PositionOffset.Value, Mod.OffsetType.Position, SyncElementValue: true, MenuSetup.X_P_Offset, MenuSetup.Y_P_Offset, MenuSetup.Z_P_Offset);
			Mod.ApplySmoothing(Pref_RotationSmoothing.Value, Pref_PositionSmoothing.Value, SyncElementValue: true);
			Mod.ApplyLD(Pref_LD_Enabled.Value, Pref_LD_Center.Value, Pref_LD_Intensity.Value, Pref_LD_Scale.Value, Pref_LD_xMultiplier.Value, Pref_LD_yMultiplier.Value, SyncElements: true);
			Mod.ApplyCA(Pref_CA_Enabled.Value, Pref_CA_Intensity.Value, SyncElements: true);
			Mod.ApplyAE(Pref_AE_Enabled.Value, Pref_AE_AdaptationMode.Value, Pref_AE_D2LS.Value, Pref_AE_evCompensation.Value, Pref_AE_evMax.Value, Pref_AE_evMin.Value, Pref_AE_L2DS.Value, Pref_AE_Metering_Mask.Value, Pref_AE_MetProcedFalloff.Value, SyncElements: true);
			Mod.SendNotfi("WideEye | Success", "Loaded Preferences.", (NotificationType)3, 2f, showTitleOnPopup: true);
			MelonLogger.Msg(ConsoleColor.Green, "Loaded Preferences.");
		}

		public static void SavePref()
		{
			//IL_004e: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00df: Unknown result type (might be due to invalid IL or missing references)
			//IL_018c: Unknown result type (might be due to invalid IL or missing references)
			//IL_020f: Unknown result type (might be due to invalid IL or missing references)
			Pref_Fov.Value = MenuSetup.fovSlider.Value;
			Pref_PostFX.Value = MenuSetup.PostFXToogle.Value;
			Pref_RotationOffset.Value = new Vector3(MenuSetup.X_R_Offset.Value, MenuSetup.Y_R_Offset.Value, MenuSetup.Z_R_Offset.Value);
			Pref_PositionOffset.Value = new Vector3(MenuSetup.X_P_Offset.Value, MenuSetup.Y_P_Offset.Value, MenuSetup.Z_P_Offset.Value);
			Pref_RotationSmoothing.Value = MenuSetup.R_Smoothing.Value;
			Pref_PositionSmoothing.Value = MenuSetup.P_Smoothing.Value;
			Pref_LD_Enabled.Value = MenuSetup.LD_Enabled.Value;
			Pref_LD_Center.Value = new Vector2(MenuSetup.LD_CenterX.Value, MenuSetup.LD_CenterY.Value);
			Pref_LD_Intensity.Value = MenuSetup.LD_Intensity.Value;
			Pref_LD_Scale.Value = MenuSetup.LD_Scale.Value;
			Pref_LD_xMultiplier.Value = MenuSetup.LD_xMultiplier.Value;
			Pref_LD_yMultiplier.Value = MenuSetup.LD_yMultiplier.Value;
			Pref_CA_Enabled.Value = MenuSetup.CA_Enabled.Value;
			Pref_CA_Intensity.Value = MenuSetup.CA_Intensity.Value;
			Pref_AE_Enabled.Value = MenuSetup.AE_enabled.Value;
			Pref_AE_AdaptationMode.Value = (AutoExposureAdaptationMode)(object)MenuSetup.AE_adaptationMode.Value;
			Pref_AE_D2LS.Value = MenuSetup.AE_D2LS.Value;
			Pref_AE_evCompensation.Value = MenuSetup.AE_evCompensation.Value;
			Pref_AE_evMax.Value = MenuSetup.AE_evMax.Value;
			Pref_AE_evMin.Value = MenuSetup.AE_evMin.Value;
			Pref_AE_L2DS.Value = MenuSetup.AE_L2DS.Value;
			Pref_AE_Metering_Mask.Value = (AutoExposureMeteringMaskMode)(object)MenuSetup.AE_MeteringMaskMode.Value;
			Pref_AE_MetProcedFalloff.Value = MenuSetup.AE_MeteringProceduralFalloff.Value;
			Categ_WideEye.SaveToFile(false);
			Categ_PFX_LD.SaveToFile(false);
			Categ_PFX_CA.SaveToFile(false);
			Categ_PFX_AE.SaveToFile(false);
			Mod.SendNotfi("WideEye | Success", "Saved Preferences.", (NotificationType)3, 2f, showTitleOnPopup: true);
			MelonLogger.Msg(ConsoleColor.Green, "Saved Preferences.");
		}

		public static void ClearPref()
		{
			Mod.SendNotfi("WideEye | Please Wait", "Clearing Preferences...", (NotificationType)0, 2f, showTitleOnPopup: true);
			MelonLogger.Msg("Clearing Preferences...");
			List<MelonPreferences_Entry> list = Categ_WideEye.Entries.Concat(Categ_PFX_LD.Entries).Concat(Categ_PFX_CA.Entries).Concat(Categ_PFX_AE.Entries)
				.ToList();
			foreach (MelonPreferences_Entry item in list)
			{
				item.ResetToDefault();
			}
			LoadPref();
			Mod.SendNotfi("WideEye | Done!", "Cleared All Preferences", (NotificationType)3, 2f, showTitleOnPopup: true);
			MelonLogger.Msg(ConsoleColor.Green, "Done!, Cleared All Preferences");
		}
	}
}