Decompiled source of ManILoveFrogs v1.0.0

Mods/ManILoveFrogs.dll

Decompiled 9 hours ago
using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using Il2Cpp;
using ManILoveFrogs;
using MelonLoader;
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.UI;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: MelonInfo(typeof(global::ManILoveFrogs.ManILoveFrogs), "ManILoveFrogs", "1.0.0", "Mute", null)]
[assembly: MelonGame(null, null)]
[assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = "")]
[assembly: AssemblyCompany("ManILoveFrogs")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("ManILoveFrogs")]
[assembly: AssemblyTitle("ManILoveFrogs")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
namespace ManILoveFrogs;

public class ManILoveFrogs : MelonMod
{
	private enum GiftBoxAnimState
	{
		Idle,
		Shaking,
		Opening,
		Done
	}

	private bool _menuOpen;

	private bool _giftOpened;

	private GameObject _menuRoot;

	private GiftBoxAnimState _giftState;

	private float _giftAnimTimer;

	private float _lidY;

	private float _lidTargetY;

	private float _bounceTimer;

	private GameObject _giftBox;

	private GameObject _giftLid;

	private GameObject _unlockPanel;

	private Text _statusText;

	private GameObject _card;

	private float _cardAnimTimer;

	private bool _cardAnimActive;

	private const float CARD_ANIM_DUR = 0.32f;

	private static readonly Color C_BG_OVERLAY = new Color(0.02f, 0.04f, 0.1f, 0.8f);

	private static readonly Color C_CARD_BG = new Color(0.08f, 0.1f, 0.18f, 1f);

	private static readonly Color C_HEADER_BG = new Color(0.05f, 0.07f, 0.14f, 1f);

	private static readonly Color C_ACCENT = new Color(0.42f, 0.8f, 1f, 1f);

	private static readonly Color C_ACCENT_DIM = new Color(0.26f, 0.52f, 0.78f, 1f);

	private static readonly Color C_GREEN = new Color(0.2f, 0.88f, 0.56f, 1f);

	private static readonly Color C_GREEN_DARK = new Color(0.1f, 0.55f, 0.34f, 1f);

	private static readonly Color C_GREEN_BTN_TXT = new Color(0.02f, 0.12f, 0.06f, 1f);

	private static readonly Color C_RED_CLOSE = new Color(0.88f, 0.26f, 0.26f, 1f);

	private static readonly Color C_TEXT_BRIGHT = new Color(0.92f, 0.96f, 1f, 1f);

	private static readonly Color C_TEXT_DIM = new Color(0.46f, 0.56f, 0.72f, 1f);

	private static readonly Color C_SEPARATOR = new Color(0.16f, 0.22f, 0.38f, 1f);

	private static readonly Color C_SHADOW = new Color(0f, 0f, 0f, 0.6f);

	private static readonly Color C_BOX_BODY = new Color(0.84f, 0.18f, 0.26f, 1f);

	private static readonly Color C_BOX_DARK = new Color(0.6f, 0.1f, 0.16f, 1f);

	private static readonly Color C_RIBBON = new Color(1f, 0.88f, 0.18f, 1f);

	private static readonly Color C_RIBBON_DARK = new Color(0.88f, 0.68f, 0.08f, 1f);

	private static readonly Color C_LID = new Color(0.94f, 0.22f, 0.3f, 1f);

	private const float CARD_W = 380f;

	private const float CARD_H = 480f;

	private const float HDR_H = 52f;

	private const float FOOTER_H = 46f;

	public override void OnUpdate()
	{
		//IL_0099: Unknown result type (might be due to invalid IL or missing references)
		//IL_0197: Unknown result type (might be due to invalid IL or missing references)
		//IL_025e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0119: Unknown result type (might be due to invalid IL or missing references)
		//IL_01ea: Unknown result type (might be due to invalid IL or missing references)
		if (Input.GetKeyDown((KeyCode)286))
		{
			ToggleMenu();
		}
		if ((Object)(object)_menuRoot == (Object)null)
		{
			return;
		}
		if (_cardAnimActive && (Object)(object)_card != (Object)null)
		{
			_cardAnimTimer += Time.deltaTime;
			float num = Mathf.Clamp01(_cardAnimTimer / 0.32f);
			float num2 = 1f - Mathf.Pow(1f - num, 3f);
			float num3 = Mathf.Lerp(0.86f, 1f, num2);
			_card.transform.localScale = new Vector3(num3, num3, 1f);
			if (num >= 1f)
			{
				_cardAnimActive = false;
			}
		}
		if (_giftState == GiftBoxAnimState.Idle && (Object)(object)_giftBox != (Object)null && _giftBox.activeSelf)
		{
			_bounceTimer += Time.deltaTime;
			RectTransform component = _giftBox.GetComponent<RectTransform>();
			if ((Object)(object)component != (Object)null)
			{
				component.anchoredPosition = new Vector2(0f, Mathf.Sin(_bounceTimer * 1.6f) * 6f);
			}
		}
		if (_giftState == GiftBoxAnimState.Shaking)
		{
			_giftAnimTimer += Time.deltaTime;
			float num4 = Mathf.Sin(_giftAnimTimer * 28f) * 8f * Mathf.Clamp01(1f - _giftAnimTimer / 0.8f);
			if ((Object)(object)_giftBox != (Object)null)
			{
				_giftBox.transform.localRotation = Quaternion.Euler(0f, 0f, num4);
			}
			if (_giftAnimTimer > 0.9f)
			{
				_giftState = GiftBoxAnimState.Opening;
				_giftAnimTimer = 0f;
				_lidTargetY = 90f;
				if ((Object)(object)_giftBox != (Object)null)
				{
					_giftBox.transform.localRotation = Quaternion.identity;
				}
			}
		}
		else
		{
			if (_giftState != GiftBoxAnimState.Opening)
			{
				return;
			}
			_giftAnimTimer += Time.deltaTime;
			_lidY = Mathf.Lerp(_lidY, _lidTargetY, Time.deltaTime * 7f);
			if ((Object)(object)_giftLid != (Object)null)
			{
				_giftLid.transform.localPosition = new Vector3(0f, _lidY, 0f);
			}
			if (_giftAnimTimer > 0.65f)
			{
				_giftState = GiftBoxAnimState.Done;
				_giftOpened = true;
				if ((Object)(object)_giftBox != (Object)null)
				{
					_giftBox.SetActive(false);
				}
				if ((Object)(object)_unlockPanel != (Object)null)
				{
					_unlockPanel.SetActive(true);
				}
			}
		}
	}

	private void ToggleMenu()
	{
		_menuOpen = !_menuOpen;
		if (_menuOpen)
		{
			if ((Object)(object)_menuRoot == (Object)null)
			{
				BuildMenu();
			}
			_menuRoot.SetActive(true);
			_cardAnimTimer = 0f;
			_cardAnimActive = true;
			_bounceTimer = 0f;
		}
		else if ((Object)(object)_menuRoot != (Object)null)
		{
			_menuRoot.SetActive(false);
		}
	}

	private void BuildMenu()
	{
		//IL_0005: Unknown result type (might be due to invalid IL or missing references)
		//IL_000b: Expected O, but got Unknown
		//IL_0040: Unknown result type (might be due to invalid IL or missing references)
		//IL_0066: Unknown result type (might be due to invalid IL or missing references)
		//IL_0084: Unknown result type (might be due to invalid IL or missing references)
		//IL_0089: Unknown result type (might be due to invalid IL or missing references)
		//IL_008e: Unknown result type (might be due to invalid IL or missing references)
		//IL_00be: Unknown result type (might be due to invalid IL or missing references)
		//IL_00cd: Unknown result type (might be due to invalid IL or missing references)
		//IL_00dc: Unknown result type (might be due to invalid IL or missing references)
		//IL_00eb: Unknown result type (might be due to invalid IL or missing references)
		//IL_0105: Unknown result type (might be due to invalid IL or missing references)
		//IL_0126: Unknown result type (might be due to invalid IL or missing references)
		//IL_0135: 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)
		//IL_0153: Unknown result type (might be due to invalid IL or missing references)
		//IL_016d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0191: Unknown result type (might be due to invalid IL or missing references)
		//IL_01b7: Unknown result type (might be due to invalid IL or missing references)
		//IL_01bc: Unknown result type (might be due to invalid IL or missing references)
		//IL_01c1: Unknown result type (might be due to invalid IL or missing references)
		//IL_01db: Unknown result type (might be due to invalid IL or missing references)
		//IL_01ea: Unknown result type (might be due to invalid IL or missing references)
		//IL_01f9: Unknown result type (might be due to invalid IL or missing references)
		//IL_0208: Unknown result type (might be due to invalid IL or missing references)
		//IL_0222: Unknown result type (might be due to invalid IL or missing references)
		//IL_0232: Unknown result type (might be due to invalid IL or missing references)
		//IL_025d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0263: Expected O, but got Unknown
		//IL_0281: Unknown result type (might be due to invalid IL or missing references)
		//IL_028c: Unknown result type (might be due to invalid IL or missing references)
		//IL_02a1: Unknown result type (might be due to invalid IL or missing references)
		//IL_02b5: Unknown result type (might be due to invalid IL or missing references)
		//IL_02c5: Unknown result type (might be due to invalid IL or missing references)
		GameObject val = new GameObject("MILF_Canvas");
		Object.DontDestroyOnLoad((Object)(object)val);
		Canvas obj = val.AddComponent<Canvas>();
		obj.renderMode = (RenderMode)0;
		obj.sortingOrder = 9999;
		CanvasScaler obj2 = val.AddComponent<CanvasScaler>();
		obj2.uiScaleMode = (ScaleMode)1;
		obj2.referenceResolution = new Vector2(1920f, 1080f);
		obj2.matchWidthOrHeight = 0.5f;
		val.AddComponent<GraphicRaycaster>();
		GameObject val2 = MakePanelStretch(val.transform, "Overlay", C_BG_OVERLAY);
		((Graphic)val2.GetComponent<Image>()).raycastTarget = true;
		Button obj3 = val2.AddComponent<Button>();
		SetBtnColors(obj3, C_BG_OVERLAY, C_BG_OVERLAY, C_BG_OVERLAY);
		((UnityEvent)obj3.onClick).AddListener(UnityAction.op_Implicit((Action)ToggleMenu));
		GameObject obj4 = MakePanel(val2.transform, "Shadow", C_SHADOW, new Vector2(0.5f, 0.5f), new Vector2(0.5f, 0.5f), new Vector2(398f, 498f));
		obj4.GetComponent<RectTransform>().anchoredPosition = new Vector2(7f, -9f);
		((Graphic)obj4.GetComponent<Image>()).raycastTarget = false;
		_card = MakePanel(val2.transform, "Card", C_CARD_BG, new Vector2(0.5f, 0.5f), new Vector2(0.5f, 0.5f), new Vector2(380f, 480f));
		_card.GetComponent<RectTransform>().anchoredPosition = Vector2.zero;
		_card.transform.localScale = new Vector3(0.86f, 0.86f, 1f);
		((Graphic)_card.GetComponent<Image>()).raycastTarget = true;
		SetBtnColors(_card.AddComponent<Button>(), Color.clear, Color.clear, Color.clear);
		GameObject obj5 = MakePanel(_card.transform, "TopLine", C_ACCENT, new Vector2(0f, 1f), new Vector2(1f, 1f), new Vector2(0f, 3f));
		obj5.GetComponent<RectTransform>().offsetMin = new Vector2(0f, -3f);
		obj5.GetComponent<RectTransform>().offsetMax = Vector2.zero;
		((Graphic)obj5.GetComponent<Image>()).raycastTarget = false;
		BuildHeader(_card.transform);
		GameObject val3 = new GameObject("Content");
		val3.transform.SetParent(_card.transform, false);
		RectTransform obj6 = val3.AddComponent<RectTransform>();
		obj6.anchorMin = Vector2.zero;
		obj6.anchorMax = Vector2.one;
		obj6.offsetMin = new Vector2(0f, 46f);
		obj6.offsetMax = new Vector2(0f, -52f);
		((Graphic)val3.AddComponent<Image>()).color = Color.clear;
		((Graphic)val3.GetComponent<Image>()).raycastTarget = false;
		BuildGiftBox(val3.transform);
		BuildUnlockPanel(val3.transform);
		BuildFooter(_card.transform);
		_unlockPanel.SetActive(_giftOpened);
		_menuRoot = val;
	}

	private void BuildHeader(Transform parent)
	{
		//IL_0006: Unknown result type (might be due to invalid IL or missing references)
		//IL_0015: 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)
		//IL_0033: Unknown result type (might be due to invalid IL or missing references)
		//IL_004e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0058: Unknown result type (might be due to invalid IL or missing references)
		//IL_0074: Unknown result type (might be due to invalid IL or missing references)
		//IL_0084: Unknown result type (might be due to invalid IL or missing references)
		//IL_0093: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a2: Unknown result type (might be due to invalid IL or missing references)
		//IL_00bc: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ef: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ff: Unknown result type (might be due to invalid IL or missing references)
		//IL_010e: Unknown result type (might be due to invalid IL or missing references)
		//IL_011d: 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_0163: Unknown result type (might be due to invalid IL or missing references)
		//IL_0172: Unknown result type (might be due to invalid IL or missing references)
		//IL_0181: Unknown result type (might be due to invalid IL or missing references)
		//IL_0190: Unknown result type (might be due to invalid IL or missing references)
		//IL_01aa: Unknown result type (might be due to invalid IL or missing references)
		//IL_01c6: Unknown result type (might be due to invalid IL or missing references)
		//IL_01cc: Unknown result type (might be due to invalid IL or missing references)
		//IL_01d1: Unknown result type (might be due to invalid IL or missing references)
		//IL_01d6: Unknown result type (might be due to invalid IL or missing references)
		//IL_01f1: Unknown result type (might be due to invalid IL or missing references)
		//IL_020a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0223: Unknown result type (might be due to invalid IL or missing references)
		//IL_0252: Unknown result type (might be due to invalid IL or missing references)
		//IL_0261: Unknown result type (might be due to invalid IL or missing references)
		//IL_0270: Unknown result type (might be due to invalid IL or missing references)
		//IL_027f: Unknown result type (might be due to invalid IL or missing references)
		//IL_028f: Unknown result type (might be due to invalid IL or missing references)
		//IL_02a9: Unknown result type (might be due to invalid IL or missing references)
		GameObject obj = MakePanel(parent, "Header", C_HEADER_BG, new Vector2(0f, 1f), new Vector2(1f, 1f), new Vector2(0f, 52f));
		RectTransform component = obj.GetComponent<RectTransform>();
		component.offsetMin = new Vector2(0f, -52f);
		component.offsetMax = Vector2.zero;
		GameObject obj2 = MakeText(obj.transform, "Title", "\ud83d\udc38  Man I Love Frogs", 16, C_ACCENT, (FontStyle)1, new Vector2(0f, 0.5f), new Vector2(0f, 0.5f), new Vector2(260f, 52f));
		obj2.GetComponent<RectTransform>().anchoredPosition = new Vector2(16f, 0f);
		obj2.GetComponent<Text>().alignment = (TextAnchor)3;
		((Graphic)obj2.GetComponent<Text>()).raycastTarget = false;
		GameObject obj3 = MakeText(obj.transform, "Version", "v1.0", 9, C_TEXT_DIM, (FontStyle)2, new Vector2(1f, 0.5f), new Vector2(1f, 0.5f), new Vector2(38f, 20f));
		obj3.GetComponent<RectTransform>().anchoredPosition = new Vector2(-50f, 0f);
		obj3.GetComponent<Text>().alignment = (TextAnchor)5;
		((Graphic)obj3.GetComponent<Text>()).raycastTarget = false;
		GameObject obj4 = MakePanel(obj.transform, "CloseBtn", C_RED_CLOSE, new Vector2(1f, 0.5f), new Vector2(1f, 0.5f), new Vector2(30f, 30f));
		obj4.GetComponent<RectTransform>().anchoredPosition = new Vector2(-11f, 0f);
		((Graphic)MakeText(obj4.transform, "X", "✕", 13, Color.white, (FontStyle)1, Vector2.zero, Vector2.one, Vector2.zero).GetComponent<Text>()).raycastTarget = false;
		Button obj5 = obj4.AddComponent<Button>();
		SetBtnColors(obj5, C_RED_CLOSE, new Color(1f, 0.4f, 0.4f, 1f), new Color(0.65f, 0.12f, 0.12f, 1f));
		((UnityEvent)obj5.onClick).AddListener(UnityAction.op_Implicit((Action)ToggleMenu));
		GameObject obj6 = MakePanel(obj.transform, "Sep", C_SEPARATOR, new Vector2(0f, 0f), new Vector2(1f, 0f), new Vector2(0f, 1f));
		obj6.GetComponent<RectTransform>().offsetMin = Vector2.zero;
		obj6.GetComponent<RectTransform>().offsetMax = new Vector2(0f, 1f);
		((Graphic)obj6.GetComponent<Image>()).raycastTarget = false;
	}

	private void BuildGiftBox(Transform parent)
	{
		//IL_0006: Unknown result type (might be due to invalid IL or missing references)
		//IL_0010: Expected O, but got Unknown
		//IL_002e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0039: Unknown result type (might be due to invalid IL or missing references)
		//IL_0044: Unknown result type (might be due to invalid IL or missing references)
		//IL_0049: Unknown result type (might be due to invalid IL or missing references)
		//IL_004a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0050: Unknown result type (might be due to invalid IL or missing references)
		//IL_0061: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a0: Unknown result type (might be due to invalid IL or missing references)
		//IL_00af: Unknown result type (might be due to invalid IL or missing references)
		//IL_00be: Unknown result type (might be due to invalid IL or missing references)
		//IL_00cd: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e7: Unknown result type (might be due to invalid IL or missing references)
		//IL_0101: Unknown result type (might be due to invalid IL or missing references)
		//IL_0107: Expected O, but got Unknown
		//IL_0137: Unknown result type (might be due to invalid IL or missing references)
		//IL_013d: Unknown result type (might be due to invalid IL or missing references)
		//IL_014e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0162: Unknown result type (might be due to invalid IL or missing references)
		//IL_0172: Unknown result type (might be due to invalid IL or missing references)
		//IL_0193: Unknown result type (might be due to invalid IL or missing references)
		//IL_01a2: Unknown result type (might be due to invalid IL or missing references)
		//IL_01b1: Unknown result type (might be due to invalid IL or missing references)
		//IL_01c0: Unknown result type (might be due to invalid IL or missing references)
		//IL_01d0: Unknown result type (might be due to invalid IL or missing references)
		//IL_01f1: Unknown result type (might be due to invalid IL or missing references)
		//IL_0200: 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)
		//IL_021e: Unknown result type (might be due to invalid IL or missing references)
		//IL_022e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0248: Unknown result type (might be due to invalid IL or missing references)
		//IL_0268: Unknown result type (might be due to invalid IL or missing references)
		//IL_0277: Unknown result type (might be due to invalid IL or missing references)
		//IL_0286: Unknown result type (might be due to invalid IL or missing references)
		//IL_0295: Unknown result type (might be due to invalid IL or missing references)
		//IL_02af: Unknown result type (might be due to invalid IL or missing references)
		//IL_02bf: Unknown result type (might be due to invalid IL or missing references)
		//IL_02df: Unknown result type (might be due to invalid IL or missing references)
		//IL_02ee: Unknown result type (might be due to invalid IL or missing references)
		//IL_02fd: Unknown result type (might be due to invalid IL or missing references)
		//IL_030c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0326: Unknown result type (might be due to invalid IL or missing references)
		//IL_0340: Unknown result type (might be due to invalid IL or missing references)
		//IL_0360: Unknown result type (might be due to invalid IL or missing references)
		//IL_036f: Unknown result type (might be due to invalid IL or missing references)
		//IL_037e: Unknown result type (might be due to invalid IL or missing references)
		//IL_038d: Unknown result type (might be due to invalid IL or missing references)
		//IL_03a6: Unknown result type (might be due to invalid IL or missing references)
		//IL_03ba: Unknown result type (might be due to invalid IL or missing references)
		//IL_03c9: Unknown result type (might be due to invalid IL or missing references)
		//IL_03d8: Unknown result type (might be due to invalid IL or missing references)
		//IL_03e7: Unknown result type (might be due to invalid IL or missing references)
		//IL_0401: Unknown result type (might be due to invalid IL or missing references)
		//IL_041b: Unknown result type (might be due to invalid IL or missing references)
		//IL_043b: Unknown result type (might be due to invalid IL or missing references)
		//IL_044a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0459: Unknown result type (might be due to invalid IL or missing references)
		//IL_0468: Unknown result type (might be due to invalid IL or missing references)
		//IL_0477: Unknown result type (might be due to invalid IL or missing references)
		//IL_048d: Unknown result type (might be due to invalid IL or missing references)
		//IL_049c: Unknown result type (might be due to invalid IL or missing references)
		//IL_04ab: Unknown result type (might be due to invalid IL or missing references)
		//IL_04ba: Unknown result type (might be due to invalid IL or missing references)
		//IL_04de: Unknown result type (might be due to invalid IL or missing references)
		//IL_0509: Unknown result type (might be due to invalid IL or missing references)
		//IL_0518: Unknown result type (might be due to invalid IL or missing references)
		//IL_0527: Unknown result type (might be due to invalid IL or missing references)
		//IL_0536: Unknown result type (might be due to invalid IL or missing references)
		//IL_0550: Unknown result type (might be due to invalid IL or missing references)
		//IL_056a: Unknown result type (might be due to invalid IL or missing references)
		//IL_058f: Unknown result type (might be due to invalid IL or missing references)
		//IL_059e: Unknown result type (might be due to invalid IL or missing references)
		//IL_05ad: Unknown result type (might be due to invalid IL or missing references)
		//IL_05bc: Unknown result type (might be due to invalid IL or missing references)
		//IL_05cb: Unknown result type (might be due to invalid IL or missing references)
		//IL_05e7: Unknown result type (might be due to invalid IL or missing references)
		//IL_05f7: Unknown result type (might be due to invalid IL or missing references)
		//IL_0606: Unknown result type (might be due to invalid IL or missing references)
		//IL_0615: 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_065d: Unknown result type (might be due to invalid IL or missing references)
		//IL_066d: 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_068b: Unknown result type (might be due to invalid IL or missing references)
		//IL_06a5: Unknown result type (might be due to invalid IL or missing references)
		//IL_06cb: Unknown result type (might be due to invalid IL or missing references)
		//IL_06d0: Unknown result type (might be due to invalid IL or missing references)
		//IL_06e7: Unknown result type (might be due to invalid IL or missing references)
		//IL_06ee: Unknown result type (might be due to invalid IL or missing references)
		//IL_06f9: Unknown result type (might be due to invalid IL or missing references)
		//IL_0704: Unknown result type (might be due to invalid IL or missing references)
		//IL_0709: Unknown result type (might be due to invalid IL or missing references)
		//IL_070a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0710: Unknown result type (might be due to invalid IL or missing references)
		//IL_0716: Unknown result type (might be due to invalid IL or missing references)
		//IL_071d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0733: Unknown result type (might be due to invalid IL or missing references)
		//IL_074c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0765: Unknown result type (might be due to invalid IL or missing references)
		_giftBox = new GameObject("GiftContainer");
		_giftBox.transform.SetParent(parent, false);
		RectTransform obj = _giftBox.AddComponent<RectTransform>();
		obj.anchorMin = Vector2.zero;
		obj.anchorMax = Vector2.one;
		Vector2 val2 = (obj.offsetMin = (obj.offsetMax = Vector2.zero));
		((Graphic)_giftBox.AddComponent<Image>()).color = Color.clear;
		((Graphic)_giftBox.GetComponent<Image>()).raycastTarget = false;
		GameObject obj2 = MakePanel(_giftBox.transform, "GiftShadow", new Color(0f, 0f, 0f, 0.28f), new Vector2(0.5f, 0.5f), new Vector2(0.5f, 0.5f), new Vector2(160f, 12f));
		obj2.GetComponent<RectTransform>().anchoredPosition = new Vector2(0f, -100f);
		((Graphic)obj2.GetComponent<Image>()).raycastTarget = false;
		GameObject val3 = new GameObject("ArtContainer");
		val3.transform.SetParent(_giftBox.transform, false);
		RectTransform obj3 = val3.AddComponent<RectTransform>();
		((Vector2)(ref val2))..ctor(0.5f, 0.5f);
		obj3.anchorMax = val2;
		obj3.anchorMin = val2;
		obj3.sizeDelta = new Vector2(150f, 200f);
		obj3.anchoredPosition = new Vector2(0f, 8f);
		((Graphic)val3.AddComponent<Image>()).color = Color.clear;
		((Graphic)val3.GetComponent<Image>()).raycastTarget = false;
		GameObject obj4 = MakePanel(val3.transform, "BoxBody", C_BOX_BODY, new Vector2(0.5f, 0f), new Vector2(0.5f, 0f), new Vector2(150f, 100f));
		obj4.GetComponent<RectTransform>().anchoredPosition = Vector2.zero;
		((Graphic)obj4.GetComponent<Image>()).raycastTarget = false;
		GameObject obj5 = MakePanel(obj4.transform, "Shade", C_BOX_DARK, new Vector2(0f, 0f), new Vector2(1f, 0f), new Vector2(0f, 7f));
		obj5.GetComponent<RectTransform>().offsetMin = Vector2.zero;
		obj5.GetComponent<RectTransform>().offsetMax = new Vector2(0f, 7f);
		((Graphic)obj5.GetComponent<Image>()).raycastTarget = false;
		GameObject obj6 = MakePanel(obj4.transform, "ShadeR", C_BOX_DARK, new Vector2(1f, 0f), new Vector2(1f, 1f), new Vector2(8f, 0f));
		obj6.GetComponent<RectTransform>().offsetMin = new Vector2(-8f, 0f);
		obj6.GetComponent<RectTransform>().offsetMax = Vector2.zero;
		((Graphic)obj6.GetComponent<Image>()).raycastTarget = false;
		GameObject obj7 = MakePanel(obj4.transform, "RV", C_RIBBON, new Vector2(0.5f, 0f), new Vector2(0.5f, 1f), new Vector2(22f, 0f));
		obj7.GetComponent<RectTransform>().offsetMin = new Vector2(-11f, 0f);
		obj7.GetComponent<RectTransform>().offsetMax = new Vector2(11f, 0f);
		((Graphic)obj7.GetComponent<Image>()).raycastTarget = false;
		MakePanel(obj7.transform, "RVDark", C_RIBBON_DARK, new Vector2(1f, 0f), new Vector2(1f, 1f), new Vector2(5f, 0f)).GetComponent<RectTransform>().offsetMin = new Vector2(-5f, 0f);
		GameObject obj8 = MakePanel(obj4.transform, "RH", C_RIBBON, new Vector2(0f, 0.5f), new Vector2(1f, 0.5f), new Vector2(0f, 22f));
		obj8.GetComponent<RectTransform>().offsetMin = new Vector2(0f, -11f);
		obj8.GetComponent<RectTransform>().offsetMax = new Vector2(0f, 11f);
		((Graphic)obj8.GetComponent<Image>()).raycastTarget = false;
		MakePanel(obj8.transform, "RHDark", C_RIBBON_DARK, new Vector2(0f, 0f), new Vector2(1f, 0f), new Vector2(0f, 5f)).GetComponent<RectTransform>().offsetMin = Vector2.zero;
		_giftLid = MakePanel(val3.transform, "Lid", C_LID, new Vector2(0.5f, 0f), new Vector2(0.5f, 0f), new Vector2(168f, 38f));
		_giftLid.GetComponent<RectTransform>().anchoredPosition = new Vector2(0f, 100f);
		((Graphic)_giftLid.GetComponent<Image>()).raycastTarget = false;
		GameObject obj9 = MakePanel(_giftLid.transform, "LidRib", C_RIBBON, new Vector2(0f, 0.5f), new Vector2(1f, 0.5f), new Vector2(0f, 22f));
		obj9.GetComponent<RectTransform>().offsetMin = new Vector2(0f, -11f);
		obj9.GetComponent<RectTransform>().offsetMax = new Vector2(0f, 11f);
		((Graphic)obj9.GetComponent<Image>()).raycastTarget = false;
		MakePanel(_giftLid.transform, "LidTop", C_BOX_DARK, new Vector2(0f, 1f), new Vector2(1f, 1f), new Vector2(0f, 5f)).GetComponent<RectTransform>().offsetMax = Vector2.zero;
		GameObject obj10 = MakeText(val3.transform, "Bow", "\ud83c\udf80", 38, Color.white, (FontStyle)0, new Vector2(0.5f, 0f), new Vector2(0.5f, 0f), new Vector2(58f, 46f));
		obj10.GetComponent<RectTransform>().anchoredPosition = new Vector2(0f, 138f);
		obj10.GetComponent<Text>().alignment = (TextAnchor)4;
		((Graphic)obj10.GetComponent<Text>()).raycastTarget = false;
		GameObject obj11 = MakeText(parent, "Hint", "✦  clique sur le cadeau pour l'ouvrir  ✦", 10, C_TEXT_DIM, (FontStyle)2, new Vector2(0.5f, 0f), new Vector2(0.5f, 0f), new Vector2(340f, 28f));
		obj11.GetComponent<RectTransform>().anchoredPosition = new Vector2(0f, 14f);
		obj11.GetComponent<Text>().alignment = (TextAnchor)4;
		((Graphic)obj11.GetComponent<Text>()).raycastTarget = false;
		GameObject val4 = new GameObject("GiftClick");
		val4.transform.SetParent(_giftBox.transform, false);
		RectTransform obj12 = val4.AddComponent<RectTransform>();
		obj12.anchorMin = Vector2.zero;
		obj12.anchorMax = Vector2.one;
		val2 = (obj12.offsetMin = (obj12.offsetMax = Vector2.zero));
		Image obj13 = val4.AddComponent<Image>();
		((Graphic)obj13).color = Color.clear;
		((Graphic)obj13).raycastTarget = true;
		Button obj14 = val4.AddComponent<Button>();
		SetBtnColors(obj14, Color.clear, new Color(1f, 1f, 1f, 0.04f), new Color(1f, 1f, 1f, 0.08f));
		((UnityEvent)obj14.onClick).AddListener(UnityAction.op_Implicit((Action)OnGiftClicked));
	}

	private void BuildUnlockPanel(Transform parent)
	{
		//IL_0006: Unknown result type (might be due to invalid IL or missing references)
		//IL_0010: Expected O, but got Unknown
		//IL_002e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0039: Unknown result type (might be due to invalid IL or missing references)
		//IL_0044: Unknown result type (might be due to invalid IL or missing references)
		//IL_0049: Unknown result type (might be due to invalid IL or missing references)
		//IL_004a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0050: Unknown result type (might be due to invalid IL or missing references)
		//IL_0061: Unknown result type (might be due to invalid IL or missing references)
		//IL_0093: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a3: 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_00c1: Unknown result type (might be due to invalid IL or missing references)
		//IL_00db: 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)
		//IL_0123: Unknown result type (might be due to invalid IL or missing references)
		//IL_0132: Unknown result type (might be due to invalid IL or missing references)
		//IL_0141: Unknown result type (might be due to invalid IL or missing references)
		//IL_015b: 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_0197: Unknown result type (might be due to invalid IL or missing references)
		//IL_01a6: Unknown result type (might be due to invalid IL or missing references)
		//IL_01b5: Unknown result type (might be due to invalid IL or missing references)
		//IL_01cf: Unknown result type (might be due to invalid IL or missing references)
		//IL_0200: 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)
		//IL_021e: Unknown result type (might be due to invalid IL or missing references)
		//IL_022d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0247: Unknown result type (might be due to invalid IL or missing references)
		//IL_0273: Unknown result type (might be due to invalid IL or missing references)
		//IL_0283: Unknown result type (might be due to invalid IL or missing references)
		//IL_0292: Unknown result type (might be due to invalid IL or missing references)
		//IL_02a1: Unknown result type (might be due to invalid IL or missing references)
		//IL_02bc: Unknown result type (might be due to invalid IL or missing references)
		//IL_02fa: Unknown result type (might be due to invalid IL or missing references)
		//IL_0309: Unknown result type (might be due to invalid IL or missing references)
		//IL_0318: Unknown result type (might be due to invalid IL or missing references)
		//IL_0327: Unknown result type (might be due to invalid IL or missing references)
		//IL_0341: Unknown result type (might be due to invalid IL or missing references)
		//IL_0366: Unknown result type (might be due to invalid IL or missing references)
		//IL_037a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0396: Unknown result type (might be due to invalid IL or missing references)
		//IL_039c: Unknown result type (might be due to invalid IL or missing references)
		//IL_03a1: Unknown result type (might be due to invalid IL or missing references)
		//IL_03a6: Unknown result type (might be due to invalid IL or missing references)
		//IL_03c1: Unknown result type (might be due to invalid IL or missing references)
		//IL_03da: Unknown result type (might be due to invalid IL or missing references)
		//IL_03df: Unknown result type (might be due to invalid IL or missing references)
		_unlockPanel = new GameObject("UnlockPanel");
		_unlockPanel.transform.SetParent(parent, false);
		RectTransform obj = _unlockPanel.AddComponent<RectTransform>();
		obj.anchorMin = Vector2.zero;
		obj.anchorMax = Vector2.one;
		Vector2 offsetMin = (obj.offsetMax = Vector2.zero);
		obj.offsetMin = offsetMin;
		((Graphic)_unlockPanel.AddComponent<Image>()).color = Color.clear;
		((Graphic)_unlockPanel.GetComponent<Image>()).raycastTarget = false;
		GameObject obj2 = MakeText(_unlockPanel.transform, "Frog", "\ud83d\udc38", 52, Color.white, (FontStyle)0, new Vector2(0.5f, 0.5f), new Vector2(0.5f, 0.5f), new Vector2(72f, 66f));
		obj2.GetComponent<RectTransform>().anchoredPosition = new Vector2(0f, 76f);
		obj2.GetComponent<Text>().alignment = (TextAnchor)4;
		((Graphic)obj2.GetComponent<Text>()).raycastTarget = false;
		GameObject obj3 = MakeText(_unlockPanel.transform, "Title", "Tout débloquer", 20, C_TEXT_BRIGHT, (FontStyle)1, new Vector2(0.5f, 0.5f), new Vector2(0.5f, 0.5f), new Vector2(340f, 32f));
		obj3.GetComponent<RectTransform>().anchoredPosition = new Vector2(0f, 18f);
		((Graphic)obj3.GetComponent<Text>()).raycastTarget = false;
		GameObject obj4 = MakeText(_unlockPanel.transform, "Sub", "Chapeaux · Sleds · Personnages · Écharpes\nVisuels · Objets · Constructions · Outils", 10, C_TEXT_DIM, (FontStyle)0, new Vector2(0.5f, 0.5f), new Vector2(0.5f, 0.5f), new Vector2(320f, 38f));
		obj4.GetComponent<RectTransform>().anchoredPosition = new Vector2(0f, -18f);
		obj4.GetComponent<Text>().alignment = (TextAnchor)4;
		((Graphic)obj4.GetComponent<Text>()).raycastTarget = false;
		GameObject obj5 = MakePanel(_unlockPanel.transform, "Divider", C_SEPARATOR, new Vector2(0.12f, 0.5f), new Vector2(0.88f, 0.5f), new Vector2(0f, 1f));
		obj5.GetComponent<RectTransform>().anchoredPosition = new Vector2(0f, -48f);
		((Graphic)obj5.GetComponent<Image>()).raycastTarget = false;
		GameObject val = MakeText(_unlockPanel.transform, "Status", "", 12, C_GREEN, (FontStyle)1, new Vector2(0.5f, 0.5f), new Vector2(0.5f, 0.5f), new Vector2(340f, 52f));
		val.GetComponent<RectTransform>().anchoredPosition = new Vector2(0f, -82f);
		val.GetComponent<Text>().alignment = (TextAnchor)4;
		((Graphic)val.GetComponent<Text>()).raycastTarget = false;
		_statusText = val.GetComponent<Text>();
		GameObject obj6 = MakePanel(_unlockPanel.transform, "UnlockBtn", C_GREEN, new Vector2(0.5f, 0.5f), new Vector2(0.5f, 0.5f), new Vector2(320f, 50f));
		obj6.GetComponent<RectTransform>().anchoredPosition = new Vector2(0f, -140f);
		Outline obj7 = obj6.AddComponent<Outline>();
		((Shadow)obj7).effectColor = new Color(0.2f, 1f, 0.56f, 0.22f);
		((Shadow)obj7).effectDistance = new Vector2(0f, -2f);
		((Graphic)MakeText(obj6.transform, "Label", "\ud83c\udf89  Tout débloquer", 15, C_GREEN_BTN_TXT, (FontStyle)1, Vector2.zero, Vector2.one, Vector2.zero).GetComponent<Text>()).raycastTarget = false;
		Button obj8 = obj6.AddComponent<Button>();
		SetBtnColors(obj8, C_GREEN, new Color(0.32f, 1f, 0.68f, 1f), C_GREEN_DARK);
		((UnityEvent)obj8.onClick).AddListener(UnityAction.op_Implicit((Action)UnlockAll));
	}

	private void BuildFooter(Transform parent)
	{
		//IL_0006: Unknown result type (might be due to invalid IL or missing references)
		//IL_0015: 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)
		//IL_0033: Unknown result type (might be due to invalid IL or missing references)
		//IL_004d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0062: Unknown result type (might be due to invalid IL or missing references)
		//IL_0071: 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_008f: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c6: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d5: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e4: Unknown result type (might be due to invalid IL or missing references)
		//IL_00fe: Unknown result type (might be due to invalid IL or missing references)
		//IL_0131: Unknown result type (might be due to invalid IL or missing references)
		//IL_0141: Unknown result type (might be due to invalid IL or missing references)
		//IL_0150: Unknown result type (might be due to invalid IL or missing references)
		//IL_015f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0179: Unknown result type (might be due to invalid IL or missing references)
		//IL_01a4: Unknown result type (might be due to invalid IL or missing references)
		//IL_01b3: Unknown result type (might be due to invalid IL or missing references)
		//IL_01c2: Unknown result type (might be due to invalid IL or missing references)
		//IL_01d1: Unknown result type (might be due to invalid IL or missing references)
		//IL_01ed: Unknown result type (might be due to invalid IL or missing references)
		//IL_01f3: Unknown result type (might be due to invalid IL or missing references)
		//IL_01f8: Unknown result type (might be due to invalid IL or missing references)
		//IL_01fd: Unknown result type (might be due to invalid IL or missing references)
		//IL_0218: Unknown result type (might be due to invalid IL or missing references)
		//IL_0231: Unknown result type (might be due to invalid IL or missing references)
		//IL_0236: Unknown result type (might be due to invalid IL or missing references)
		GameObject obj = MakePanel(parent, "Footer", C_HEADER_BG, new Vector2(0f, 0f), new Vector2(1f, 0f), new Vector2(0f, 46f));
		obj.GetComponent<RectTransform>().offsetMax = new Vector2(0f, 46f);
		((Graphic)MakePanel(obj.transform, "Sep", C_SEPARATOR, new Vector2(0f, 1f), new Vector2(1f, 1f), new Vector2(0f, 1f)).GetComponent<Image>()).raycastTarget = false;
		GameObject obj2 = MakeText(obj.transform, "Hotkey", "F5 pour fermer", 9, C_TEXT_DIM, (FontStyle)2, new Vector2(0f, 0.5f), new Vector2(0f, 0.5f), new Vector2(120f, 46f));
		obj2.GetComponent<RectTransform>().anchoredPosition = new Vector2(14f, 0f);
		obj2.GetComponent<Text>().alignment = (TextAnchor)3;
		((Graphic)obj2.GetComponent<Text>()).raycastTarget = false;
		GameObject obj3 = MakeText(obj.transform, "Author", "by Mute", 9, C_ACCENT_DIM, (FontStyle)0, new Vector2(1f, 0.5f), new Vector2(1f, 0.5f), new Vector2(70f, 46f));
		obj3.GetComponent<RectTransform>().anchoredPosition = new Vector2(-14f, 0f);
		obj3.GetComponent<Text>().alignment = (TextAnchor)5;
		((Graphic)obj3.GetComponent<Text>()).raycastTarget = false;
		GameObject obj4 = MakePanel(obj.transform, "CloseBtn", C_ACCENT_DIM, new Vector2(0.5f, 0.5f), new Vector2(0.5f, 0.5f), new Vector2(96f, 28f));
		((Graphic)MakeText(obj4.transform, "Lbl", "Fermer", 10, C_TEXT_BRIGHT, (FontStyle)0, Vector2.zero, Vector2.one, Vector2.zero).GetComponent<Text>()).raycastTarget = false;
		Button obj5 = obj4.AddComponent<Button>();
		SetBtnColors(obj5, C_ACCENT_DIM, new Color(0.4f, 0.65f, 0.9f, 1f), C_ACCENT_DIM);
		((UnityEvent)obj5.onClick).AddListener(UnityAction.op_Implicit((Action)ToggleMenu));
	}

	private void OnGiftClicked()
	{
		if (_giftState == GiftBoxAnimState.Idle)
		{
			_giftState = GiftBoxAnimState.Shaking;
			_giftAnimTimer = 0f;
		}
	}

	private void UnlockAll()
	{
		//IL_009d: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a2: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f2: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f7: Unknown result type (might be due to invalid IL or missing references)
		//IL_0147: Unknown result type (might be due to invalid IL or missing references)
		//IL_014c: Unknown result type (might be due to invalid IL or missing references)
		//IL_019c: Unknown result type (might be due to invalid IL or missing references)
		//IL_01a1: Unknown result type (might be due to invalid IL or missing references)
		//IL_01f1: Unknown result type (might be due to invalid IL or missing references)
		//IL_01f6: Unknown result type (might be due to invalid IL or missing references)
		//IL_0246: Unknown result type (might be due to invalid IL or missing references)
		//IL_024b: Unknown result type (might be due to invalid IL or missing references)
		//IL_029b: Unknown result type (might be due to invalid IL or missing references)
		//IL_02a0: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a5: Unknown result type (might be due to invalid IL or missing references)
		//IL_00fa: Unknown result type (might be due to invalid IL or missing references)
		//IL_014f: Unknown result type (might be due to invalid IL or missing references)
		//IL_01a4: Unknown result type (might be due to invalid IL or missing references)
		//IL_01f9: Unknown result type (might be due to invalid IL or missing references)
		//IL_024e: Unknown result type (might be due to invalid IL or missing references)
		//IL_02a3: Unknown result type (might be due to invalid IL or missing references)
		if ((Object)(object)_statusText != (Object)null)
		{
			_statusText.text = "⏳  Déverrouillage en cours...";
		}
		try
		{
			PlayerPrefsManager val = Object.FindObjectOfType<PlayerPrefsManager>();
			if ((Object)(object)val == (Object)null)
			{
				if ((Object)(object)_statusText != (Object)null)
				{
					_statusText.text = "❌  PlayerPrefsManager introuvable.\nLance le jeu en partie d'abord.";
				}
				return;
			}
			PlayerSavedStats playerSavedStats = val.playerSavedStats;
			if (playerSavedStats == null)
			{
				if ((Object)(object)_statusText != (Object)null)
				{
					_statusText.text = "❌  playerSavedStats introuvable.\nLance le jeu en partie d'abord.";
				}
				return;
			}
			int num = 0;
			foreach (HatType value in Enum.GetValues(typeof(HatType)))
			{
				try
				{
					if (playerSavedStats.PurchaseHat(value))
					{
						num++;
					}
				}
				catch
				{
				}
			}
			foreach (SledType value2 in Enum.GetValues(typeof(SledType)))
			{
				try
				{
					if (playerSavedStats.PurchaseSled(value2))
					{
						num++;
					}
				}
				catch
				{
				}
			}
			foreach (CharacterModelName value3 in Enum.GetValues(typeof(CharacterModelName)))
			{
				try
				{
					if (playerSavedStats.PurchaseCharacter(value3))
					{
						num++;
					}
				}
				catch
				{
				}
			}
			foreach (ScarfType value4 in Enum.GetValues(typeof(ScarfType)))
			{
				try
				{
					if (playerSavedStats.PurchaseScarf(value4))
					{
						num++;
					}
				}
				catch
				{
				}
			}
			foreach (FacewearType value5 in Enum.GetValues(typeof(FacewearType)))
			{
				try
				{
					if (playerSavedStats.PurchaseFacewear(value5))
					{
						num++;
					}
				}
				catch
				{
				}
			}
			foreach (BuildableItemType value6 in Enum.GetValues(typeof(BuildableItemType)))
			{
				try
				{
					if (playerSavedStats.PurchaseBuildable(value6))
					{
						num++;
					}
				}
				catch
				{
				}
			}
			foreach (HeldObjectType value7 in Enum.GetValues(typeof(HeldObjectType)))
			{
				try
				{
					if (playerSavedStats.PurchaseTool(value7))
					{
						num++;
					}
				}
				catch
				{
				}
			}
			if ((Object)(object)_statusText != (Object)null)
			{
				_statusText.text = $"✅  {num} apparences débloquées !\nRelance le jeu si nécessaire.";
			}
		}
		catch (Exception ex)
		{
			if ((Object)(object)_statusText != (Object)null)
			{
				_statusText.text = "❌  Erreur : " + ex.Message;
			}
			MelonLogger.Error(ex.ToString());
		}
	}

	private static GameObject MakePanelStretch(Transform parent, string name, Color col)
	{
		//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_0013: 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_001f: 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_0031: Unknown result type (might be due to invalid IL or missing references)
		//IL_003c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0041: Unknown result type (might be due to invalid IL or missing references)
		//IL_0042: Unknown result type (might be due to invalid IL or missing references)
		//IL_0048: Unknown result type (might be due to invalid IL or missing references)
		//IL_004f: Expected O, but got Unknown
		GameObject val = new GameObject(name);
		val.transform.SetParent(parent, false);
		((Graphic)val.AddComponent<Image>()).color = col;
		RectTransform component = val.GetComponent<RectTransform>();
		component.anchorMin = Vector2.zero;
		component.anchorMax = Vector2.one;
		Vector2 offsetMin = (component.offsetMax = Vector2.zero);
		component.offsetMin = offsetMin;
		return val;
	}

	private static GameObject MakePanel(Transform parent, string name, Color col, Vector2 anchorMin, Vector2 anchorMax, Vector2 sizeDelta)
	{
		//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_0013: 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_001f: 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_002d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0035: Unknown result type (might be due to invalid IL or missing references)
		//IL_003c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0047: Expected O, but got Unknown
		GameObject val = new GameObject(name);
		val.transform.SetParent(parent, false);
		((Graphic)val.AddComponent<Image>()).color = col;
		RectTransform component = val.GetComponent<RectTransform>();
		component.anchorMin = anchorMin;
		component.anchorMax = anchorMax;
		component.sizeDelta = sizeDelta;
		component.anchoredPosition = Vector2.zero;
		return val;
	}

	private static GameObject MakeText(Transform parent, string name, string content, int fontSize, Color col, FontStyle style, Vector2 anchorMin, Vector2 anchorMax, Vector2 sizeDelta)
	{
		//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_0013: Unknown result type (might be due to invalid IL or missing references)
		//IL_0028: Unknown result type (might be due to invalid IL or missing references)
		//IL_0030: 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_005b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0063: Unknown result type (might be due to invalid IL or missing references)
		//IL_006b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0072: Unknown result type (might be due to invalid IL or missing references)
		//IL_007d: Expected O, but got Unknown
		GameObject val = new GameObject(name);
		val.transform.SetParent(parent, false);
		Text obj = val.AddComponent<Text>();
		obj.text = content;
		obj.fontSize = fontSize;
		((Graphic)obj).color = col;
		obj.fontStyle = style;
		obj.alignment = (TextAnchor)4;
		obj.font = Resources.GetBuiltinResource<Font>("LegacyRuntime.ttf");
		obj.supportRichText = false;
		RectTransform component = val.GetComponent<RectTransform>();
		component.anchorMin = anchorMin;
		component.anchorMax = anchorMax;
		component.sizeDelta = sizeDelta;
		component.anchoredPosition = Vector2.zero;
		return val;
	}

	private static void SetBtnColors(Button btn, Color normal, Color hover, Color pressed)
	{
		//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_0009: Unknown result type (might be due to invalid IL or missing references)
		//IL_0011: 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_002c: Unknown result type (might be due to invalid IL or missing references)
		ColorBlock colors = ((Selectable)btn).colors;
		((ColorBlock)(ref colors)).normalColor = normal;
		((ColorBlock)(ref colors)).highlightedColor = hover;
		((ColorBlock)(ref colors)).pressedColor = pressed;
		((ColorBlock)(ref colors)).colorMultiplier = 1f;
		((Selectable)btn).colors = colors;
	}
}