Decompiled source of BepInEx ConfigDrawers v1.1.3

plugins/BepInEx.ConfigDrawers.dll

Decompiled a month ago
using System;
using System.Collections;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Reflection.Emit;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using System.Text;
using System.Text.RegularExpressions;
using BepInEx.Bootstrap;
using BepInEx.ConfigDrawers;
using BepInEx.ConfigDrawers.Components;
using BepInEx.ConfigDrawers.Configuration;
using BepInEx.ConfigDrawers.Drawers;
using BepInEx.ConfigDrawers.Drawers.JsonDrawer;
using BepInEx.ConfigDrawers.Drawers.LegacyBridge;
using BepInEx.ConfigDrawers.Drawers.PrimitiveDrawers;
using BepInEx.ConfigDrawers.Drawers.StructuredDrawers;
using BepInEx.ConfigDrawers.Drawers.UguiScope;
using BepInEx.ConfigDrawers.Files;
using BepInEx.ConfigDrawers.Models;
using BepInEx.ConfigDrawers.Patches;
using BepInEx.ConfigDrawers.UI;
using BepInEx.Configuration;
using BepInEx.Logging;
using ConfigurationManager;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using TMPro;
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.Events;
using UnityEngine.TextCore.LowLevel;
using UnityEngine.UI;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyTitle("BepInEx.ConfigDrawers")]
[assembly: AssemblyDescription("In-game Configuration Manager for Unity BepInEx")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Vapok")]
[assembly: AssemblyProduct("BepInEx.ConfigDrawers")]
[assembly: AssemblyCopyright("Copyright © 2026")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("5E4029F7-70DB-4C5C-BDC3-A882E9437DEB")]
[assembly: AssemblyFileVersion("1.1.3.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.1.3.0")]
[module: UnverifiableCode]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableAttribute : Attribute
	{
		public readonly byte[] NullableFlags;

		public NullableAttribute(byte P_0)
		{
			NullableFlags = new byte[1] { P_0 };
		}

		public NullableAttribute(byte[] P_0)
		{
			NullableFlags = P_0;
		}
	}
	[CompilerGenerated]
	[Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableContextAttribute : Attribute
	{
		public readonly byte Flag;

		public NullableContextAttribute(byte P_0)
		{
			Flag = P_0;
		}
	}
}
namespace ConfigurationManager
{
	public class ConfigurationManager : MonoBehaviour
	{
		public static ConfigurationManager? Instance { get; private set; }

		public bool DisplayingWindow
		{
			get
			{
				if ((Object)(object)ConfigDrawerWindow.Instance != (Object)null)
				{
					return ConfigDrawerWindow.Instance.IsVisible;
				}
				return false;
			}
			set
			{
				if (value)
				{
					ConfigDrawers.OpenWindow();
				}
				else
				{
					ConfigDrawers.CloseWindow();
				}
			}
		}

		public bool OverrideHotkey { get; set; }

		public int RightColumnWidth => 350;

		public void SetRightColumnWidth(int value)
		{
		}

		private void Awake()
		{
			Instance = this;
		}

		public void BuildSettingList()
		{
			ConfigRegistry.Instance.Refresh();
		}
	}
}
namespace BepInEx.ConfigDrawers
{
	[BepInPlugin("vapok.bepinex.configdrawers", "BepInEx.ConfigDrawers", "1.1.3")]
	public class ConfigDrawers : BaseUnityPlugin
	{
		public const string ModGuid = "vapok.bepinex.configdrawers";

		public const string ModName = "BepInEx.ConfigDrawers";

		public const string ModVersion = "1.1.3";

		public const int NexusId = 3909;

		public static ConfigDrawers? Instance { get; private set; }

		public static ManualLogSource? Log
		{
			get
			{
				ConfigDrawers? instance = Instance;
				if (instance == null)
				{
					return null;
				}
				return ((BaseUnityPlugin)instance).Logger;
			}
		}

		public static bool IsOpen
		{
			get
			{
				if ((Object)(object)Instance != (Object)null && (Object)(object)ConfigDrawerWindow.Instance != (Object)null)
				{
					return ConfigDrawerWindow.Instance.IsVisible;
				}
				return false;
			}
		}

		private void Awake()
		{
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0046: Expected O, but got Unknown
			Instance = this;
			ConfigDrawerConfig.Initialize(((BaseUnityPlugin)this).Config);
			Harmony val = new Harmony("vapok.bepinex.configdrawers");
			val.PatchAll(typeof(ConfigDrawers).Assembly);
			LegacyManagerSuppressor.CheckAndSuppress(((BaseUnityPlugin)this).Logger);
			DynamicInputBlocker.Initialize(val, ((BaseUnityPlugin)this).Logger);
			EscapeSimulator.Initialize();
			ConfigFileWatcher.Initialize((MonoBehaviour)(object)this);
			UIFonts.GetPrimaryFont();
			InitializeWindow();
			AttachCompatibilityShim();
		}

		private void InitializeWindow()
		{
			//IL_0018: Unknown result type (might be due to invalid IL or missing references)
			//IL_0022: Expected O, but got Unknown
			Object.DontDestroyOnLoad((Object)new GameObject("ConfigDrawer_Window", new Type[1] { typeof(ConfigDrawerWindow) }));
		}

		private void AttachCompatibilityShim()
		{
			try
			{
				if ((Object)(object)Chainloader.ManagerObject != (Object)null && (Object)(object)Chainloader.ManagerObject.GetComponent<global::ConfigurationManager.ConfigurationManager>() == (Object)null)
				{
					Chainloader.ManagerObject.AddComponent<global::ConfigurationManager.ConfigurationManager>();
				}
			}
			catch (Exception ex)
			{
				((BaseUnityPlugin)this).Logger.LogWarning((object)("Failed to attach compatibility shim: " + ex.Message));
			}
		}

		public static void ToggleWindow()
		{
			if (!((Object)(object)ConfigDrawerWindow.Instance == (Object)null))
			{
				if (ConfigDrawerWindow.Instance.IsVisible)
				{
					CloseWindow();
				}
				else
				{
					OpenWindow();
				}
			}
		}

		public static void OpenWindow()
		{
			if ((Object)(object)ConfigDrawerWindow.Instance == (Object)null || ConfigDrawerWindow.Instance.IsVisible)
			{
				return;
			}
			if (ConfigDrawerConfig.PressEscapeBeforeOpening.Value && (Object)(object)Instance != (Object)null)
			{
				EscapeSimulator.WasEscapedOnOpen = true;
				EscapeSimulator.TriggerSimulatedPress((MonoBehaviour)(object)Instance, delegate
				{
					if ((Object)(object)ConfigDrawerWindow.Instance != (Object)null)
					{
						ConfigDrawerWindow.Instance.SetVisible(visible: true);
					}
				});
			}
			else
			{
				EscapeSimulator.WasEscapedOnOpen = false;
				ConfigDrawerWindow.Instance.SetVisible(visible: true);
			}
		}

		public static void CloseWindow()
		{
			if (!((Object)(object)ConfigDrawerWindow.Instance == (Object)null) && ConfigDrawerWindow.Instance.IsVisible)
			{
				ConfigDrawerWindow.Instance.SetVisible(visible: false);
			}
		}

		private void Update()
		{
			//IL_000c: 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)
			if (ConfigDrawerConfig.ToggleKeybind != null)
			{
				KeyboardShortcut value = ConfigDrawerConfig.ToggleKeybind.Value;
				if (((KeyboardShortcut)(ref value)).IsDown())
				{
					ToggleWindow();
				}
			}
		}
	}
	public interface IUguiDrawerScope
	{
		Transform Container { get; }

		bool IsReadOnly { get; }

		IDisposable Horizontal(float spacing = 4f);

		IDisposable Vertical(float spacing = 4f);

		IDisposable Box(Color? backgroundColor = null, float padding = 4f, float spacing = 4f);

		IDisposable Row(Color? backgroundColor = null, float padding = 4f, float spacing = 4f);

		void Label(string text, float width = -1f);

		void TextField(string value, Action<string> onCommit, float width = -1f);

		void Button(string text, Action onClick, float width = 50f);

		void Button(string text, Action onClick, float width, string? tooltip);

		void Slider(float value, float min, float max, Action<float> onChanged, float width = 120f, string? format = null);

		void Toggle(bool value, string label, Action<bool> onChanged);

		void Space(float pixels);

		void Separator(float height = 1f, Color? color = null);
	}
}
namespace BepInEx.ConfigDrawers.UI
{
	public class ColorSpectrumPicker : MonoBehaviour, IPointerDownHandler, IEventSystemHandler, IDragHandler
	{
		public Action<float, float>? OnPick;

		private RectTransform? _rt;

		private void Awake()
		{
			_rt = ((Component)this).GetComponent<RectTransform>();
		}

		public void OnPointerDown(PointerEventData eventData)
		{
			HandlePointer(eventData);
		}

		public void OnDrag(PointerEventData eventData)
		{
			HandlePointer(eventData);
		}

		private void HandlePointer(PointerEventData eventData)
		{
			//IL_001e: 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_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_005a: Unknown result type (might be due to invalid IL or missing references)
			Vector2 val = default(Vector2);
			if (!((Object)(object)_rt == (Object)null) && OnPick != null && RectTransformUtility.ScreenPointToLocalPointInRectangle(_rt, eventData.position, eventData.pressEventCamera, ref val))
			{
				Rect rect = _rt.rect;
				float arg = Mathf.Clamp01((val.x - ((Rect)(ref rect)).xMin) / ((Rect)(ref rect)).width);
				float arg2 = Mathf.Clamp01((val.y - ((Rect)(ref rect)).yMin) / ((Rect)(ref rect)).height);
				OnPick(arg, arg2);
			}
		}
	}
	public class CyberDropdownOverlay : MonoBehaviour
	{
		private static GameObject? _currentOverlay;

		private static Action? _currentOnClose;

		public static void Show(RectTransform targetButtonRT, string[] options, int selectedIndex, Action<int> onSelect)
		{
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			//IL_0055: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b1: 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_0121: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0134: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01be: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c9: 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_01ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f7: 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)
			Close();
			if ((Object)(object)targetButtonRT == (Object)null || options == null || options.Length == 0)
			{
				return;
			}
			Canvas componentInParent = ((Component)targetButtonRT).GetComponentInParent<Canvas>();
			if ((Object)(object)componentInParent == (Object)null)
			{
				return;
			}
			GameObject val = (_currentOverlay = CreateOverlayRoot(componentInParent));
			Vector3[] array = (Vector3[])(object)new Vector3[4];
			targetButtonRT.GetWorldCorners(array);
			Rect rect = targetButtonRT.rect;
			float num = Mathf.Max(((Rect)(ref rect)).width, 110f);
			int num2 = Mathf.Min(options.Length, 8);
			bool flag = options.Length > num2;
			float num3 = (float)num2 * 24f + 8f;
			float num4 = (flag ? 14f : 8f);
			GameObject val2 = UiFactory.CreatePanel(val.transform, "PopupCard", CyberPalette.ColorIceBlue, CyberPalette.ColorVoidBlack);
			RectTransform component = val2.GetComponent<RectTransform>();
			if (array[0].y < num3 + 10f)
			{
				component.pivot = new Vector2(1f, 0f);
				((Transform)component).position = array[2];
			}
			else
			{
				component.pivot = new Vector2(1f, 1f);
				((Transform)component).position = array[2];
			}
			component.sizeDelta = new Vector2(num + num4, num3);
			Transform val3 = val2.transform.Find("Fill");
			Transform container = (((Object)(object)val3 != (Object)null) ? val3 : val2.transform);
			RectTransform contentRT;
			ScrollRect scrollRect = CreateScrollArea(container, flag, out contentRT, 2f);
			for (int i = 0; i < options.Length; i++)
			{
				int idx = i;
				bool num5 = idx == selectedIndex;
				string labelText = options[idx];
				Color textColor = (num5 ? CyberPalette.ColorGlacialMint : CyberPalette.ColorTextMain);
				Color borderColor = (num5 ? CyberPalette.ColorGlacialMint : CyberPalette.ColorBorderSubtle);
				LayoutElement component2 = UiFactory.CreateCyberButton((Transform)(object)contentRT, $"Item_{idx}", labelText, delegate
				{
					Close();
					onSelect?.Invoke(idx);
				}, borderColor, textColor, num - 6f, 22f).GetComponent<LayoutElement>();
				component2.minHeight = 22f;
				component2.preferredHeight = 22f;
				component2.flexibleHeight = 0f;
				component2.flexibleWidth = 1f;
			}
			if (flag)
			{
				AttachScrollbar(container, scrollRect, 2f);
			}
			val.AddComponent<CyberDropdownOverlay>();
		}

		public static void ShowMulti(RectTransform targetButtonRT, string[] options, Func<int, bool> isIndexSelected, Action<int> onToggle, Action? onClose = null)
		{
			//IL_00d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0146: Unknown result type (might be due to invalid IL or missing references)
			//IL_014b: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bb: 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_0195: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_0452: Unknown result type (might be due to invalid IL or missing references)
			//IL_0457: Unknown result type (might be due to invalid IL or missing references)
			//IL_0465: Unknown result type (might be due to invalid IL or missing references)
			//IL_0476: Unknown result type (might be due to invalid IL or missing references)
			//IL_048b: Unknown result type (might be due to invalid IL or missing references)
			//IL_04a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_04b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_04c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_04ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_04f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f1: 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_0326: Unknown result type (might be due to invalid IL or missing references)
			//IL_0328: 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_03c1: Unknown result type (might be due to invalid IL or missing references)
			Close();
			if ((Object)(object)targetButtonRT == (Object)null || options == null || options.Length == 0)
			{
				return;
			}
			Canvas componentInParent = ((Component)targetButtonRT).GetComponentInParent<Canvas>();
			if ((Object)(object)componentInParent == (Object)null)
			{
				return;
			}
			GameObject val = (_currentOverlay = CreateOverlayRoot(componentInParent));
			_currentOnClose = onClose;
			Vector3[] array = (Vector3[])(object)new Vector3[4];
			targetButtonRT.GetWorldCorners(array);
			int num = 0;
			for (int i = 0; i < options.Length; i++)
			{
				if (options[i] != null && options[i].Length > num)
				{
					num = options[i].Length;
				}
			}
			float num2 = (float)(num + 4) * 7.2f + 32f;
			float[] array2 = new float[3];
			Rect rect = targetButtonRT.rect;
			array2[0] = ((Rect)(ref rect)).width;
			array2[1] = num2;
			array2[2] = 120f;
			float num3 = Mathf.Max(array2);
			int num4 = Mathf.Min(options.Length, 8);
			bool flag = options.Length > num4;
			float num5 = (float)num4 * 24f + 8f + 26f;
			float num6 = (flag ? 14f : 8f);
			GameObject val2 = UiFactory.CreatePanel(val.transform, "PopupCard", CyberPalette.ColorIceBlue, CyberPalette.ColorVoidBlack);
			RectTransform component = val2.GetComponent<RectTransform>();
			if (array[0].y < num5 + 10f)
			{
				component.pivot = new Vector2(1f, 0f);
				((Transform)component).position = array[2];
			}
			else
			{
				component.pivot = new Vector2(1f, 1f);
				((Transform)component).position = array[2];
			}
			component.sizeDelta = new Vector2(num3 + num6, num5);
			Transform val3 = val2.transform.Find("Fill");
			Transform val4 = (((Object)(object)val3 != (Object)null) ? val3 : val2.transform);
			RectTransform contentRT;
			ScrollRect scrollRect = CreateScrollArea(val4, flag, out contentRT, 26f);
			List<TextMeshProUGUI> textList = new List<TextMeshProUGUI>(options.Length);
			List<Image> borderImgList = new List<Image>(options.Length);
			List<CyberHoverHandler?> hoverList = new List<CyberHoverHandler>(options.Length);
			Action<int> updateItemVisual = delegate(int itemIndex)
			{
				//IL_0030: Unknown result type (might be due to invalid IL or missing references)
				//IL_0029: 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_0040: 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_0045: 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_0055: Unknown result type (might be due to invalid IL or missing references)
				//IL_005f: 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_0064: Unknown result type (might be due to invalid IL or missing references)
				//IL_0070: Unknown result type (might be due to invalid IL or missing references)
				//IL_0069: Unknown result type (might be due to invalid IL or missing references)
				//IL_0075: Unknown result type (might be due to invalid IL or missing references)
				//IL_00e1: Unknown result type (might be due to invalid IL or missing references)
				//IL_00f3: Unknown result type (might be due to invalid IL or missing references)
				//IL_00f4: 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_0100: Unknown result type (might be due to invalid IL or missing references)
				//IL_00cf: Unknown result type (might be due to invalid IL or missing references)
				if (itemIndex >= 0 && itemIndex < options.Length)
				{
					bool flag2 = isIndexSelected(itemIndex);
					string text2 = options[itemIndex];
					Color val6 = (flag2 ? CyberPalette.ColorGlacialMint : CyberPalette.ColorTextMain);
					Color val7 = (flag2 ? CyberPalette.ColorGlacialMint : CyberPalette.ColorBorderSubtle);
					Color value = (flag2 ? Color.Lerp(CyberPalette.ColorGlacialMint, Color.white, 0.35f) : CyberPalette.ColorIceBlueBright);
					Color value2 = (flag2 ? Color.white : CyberPalette.ColorIceBlueBright);
					TextMeshProUGUI val8 = textList[itemIndex];
					Image val9 = borderImgList[itemIndex];
					CyberHoverHandler cyberHoverHandler = hoverList[itemIndex];
					if ((Object)(object)val8 != (Object)null)
					{
						((TMP_Text)val8).text = (flag2 ? ("[X]  " + text2) : ("[ ]  " + text2));
						((Graphic)val8).color = val6;
					}
					if ((Object)(object)val9 != (Object)null)
					{
						((Graphic)val9).color = val7;
					}
					if ((Object)(object)cyberHoverHandler != (Object)null)
					{
						Color? hoverBorder = value;
						Color? hoverText = value2;
						cyberHoverHandler.SetNormalColors(val7, val6, null, hoverBorder, hoverText);
					}
				}
			};
			Action updateAllItems = delegate
			{
				for (int j = 0; j < options.Length; j++)
				{
					updateItemVisual(j);
				}
			};
			for (int num7 = 0; num7 < options.Length; num7++)
			{
				int idx = num7;
				string text = options[idx];
				bool num8 = isIndexSelected(idx);
				string labelText = (num8 ? ("[X]  " + text) : ("[ ]  " + text));
				Color textColor = (num8 ? CyberPalette.ColorGlacialMint : CyberPalette.ColorTextMain);
				Color borderColor = (num8 ? CyberPalette.ColorGlacialMint : CyberPalette.ColorBorderSubtle);
				GameObject obj = UiFactory.CreateCyberButton((Transform)(object)contentRT, $"Item_{idx}", labelText, delegate
				{
					onToggle?.Invoke(idx);
					updateAllItems();
				}, borderColor, textColor, num3 - 6f, 22f);
				LayoutElement component2 = obj.GetComponent<LayoutElement>();
				component2.minHeight = 22f;
				component2.preferredHeight = 22f;
				component2.flexibleHeight = 0f;
				component2.flexibleWidth = 1f;
				TextMeshProUGUI componentInChildren = obj.GetComponentInChildren<TextMeshProUGUI>();
				if ((Object)(object)componentInChildren != (Object)null)
				{
					((TMP_Text)componentInChildren).alignment = (TextAlignmentOptions)4097;
					RectTransform component3 = ((Component)componentInChildren).GetComponent<RectTransform>();
					if ((Object)(object)component3 != (Object)null)
					{
						component3.offsetMin = new Vector2(6f, 0f);
						component3.offsetMax = new Vector2(-6f, 0f);
					}
				}
				Image component4 = obj.GetComponent<Image>();
				CyberHoverHandler component5 = obj.GetComponent<CyberHoverHandler>();
				textList.Add(componentInChildren);
				borderImgList.Add(component4);
				hoverList.Add(component5);
			}
			if (flag)
			{
				AttachScrollbar(val4, scrollRect, 26f);
			}
			GameObject val5 = new GameObject("Footer", new Type[1] { typeof(RectTransform) });
			val5.transform.SetParent(val4, false);
			RectTransform component6 = val5.GetComponent<RectTransform>();
			component6.anchorMin = new Vector2(0f, 0f);
			component6.anchorMax = new Vector2(1f, 0f);
			component6.pivot = new Vector2(0.5f, 0f);
			component6.sizeDelta = new Vector2(0f, 24f);
			component6.anchoredPosition = new Vector2(0f, 2f);
			UiFactory.CreateCyberButton(val5.transform, "DoneBtn", "Done", Close, CyberPalette.ColorBorderSubtle, CyberPalette.ColorGlacialMint, num3 - 6f, 20f);
			val.AddComponent<CyberDropdownOverlay>();
		}

		private static GameObject CreateOverlayRoot(Canvas canvas)
		{
			//IL_0018: Unknown result type (might be due to invalid IL or missing references)
			//IL_001e: Expected O, but got Unknown
			//IL_0037: 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_004d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0057: 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_0098: 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_00b1: 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_00c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d1: 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_00f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0110: Unknown result type (might be due to invalid IL or missing references)
			//IL_011a: Expected O, but got Unknown
			GameObject val = new GameObject("DropdownOverlay", new Type[1] { typeof(RectTransform) });
			val.transform.SetParent(((Component)canvas).transform, false);
			RectTransform component = val.GetComponent<RectTransform>();
			component.anchorMin = Vector2.zero;
			component.anchorMax = Vector2.one;
			component.offsetMin = Vector2.zero;
			component.offsetMax = Vector2.zero;
			GameObject val2 = new GameObject("Blocker", new Type[3]
			{
				typeof(RectTransform),
				typeof(Image),
				typeof(Button)
			});
			val2.transform.SetParent(val.transform, false);
			RectTransform component2 = val2.GetComponent<RectTransform>();
			component2.anchorMin = Vector2.zero;
			component2.anchorMax = Vector2.one;
			component2.offsetMin = Vector2.zero;
			component2.offsetMax = Vector2.zero;
			((Graphic)val2.GetComponent<Image>()).color = new Color(0f, 0f, 0f, 0.01f);
			((UnityEvent)val2.GetComponent<Button>().onClick).AddListener(new UnityAction(Close));
			return val;
		}

		private static ScrollRect CreateScrollArea(Transform container, bool needsScroll, out RectTransform contentRT, float bottomOffset)
		{
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Expected O, but got Unknown
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0057: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_0090: Unknown result type (might be due to invalid IL or missing references)
			//IL_007f: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f9: Expected O, but got Unknown
			//IL_011f: 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_014b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0161: 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_018b: Expected O, but got Unknown
			GameObject val = new GameObject("ScrollArea", new Type[3]
			{
				typeof(RectTransform),
				typeof(ScrollRect),
				typeof(RectMask2D)
			});
			val.transform.SetParent(container, false);
			RectTransform component = val.GetComponent<RectTransform>();
			component.anchorMin = Vector2.zero;
			component.anchorMax = Vector2.one;
			component.offsetMin = new Vector2(2f, bottomOffset);
			component.offsetMax = (needsScroll ? new Vector2(-10f, -2f) : new Vector2(-2f, -2f));
			ScrollRect component2 = val.GetComponent<ScrollRect>();
			component2.horizontal = false;
			component2.vertical = needsScroll;
			component2.movementType = (MovementType)2;
			component2.scrollSensitivity = 35f;
			GameObject val2 = new GameObject("Content", new Type[3]
			{
				typeof(RectTransform),
				typeof(VerticalLayoutGroup),
				typeof(ContentSizeFitter)
			});
			val2.transform.SetParent(val.transform, false);
			contentRT = val2.GetComponent<RectTransform>();
			contentRT.anchorMin = new Vector2(0f, 1f);
			contentRT.anchorMax = new Vector2(1f, 1f);
			contentRT.pivot = new Vector2(0.5f, 1f);
			contentRT.sizeDelta = new Vector2(0f, 0f);
			VerticalLayoutGroup component3 = val2.GetComponent<VerticalLayoutGroup>();
			((HorizontalOrVerticalLayoutGroup)component3).spacing = 2f;
			((LayoutGroup)component3).padding = new RectOffset(2, 2, 2, 2);
			((HorizontalOrVerticalLayoutGroup)component3).childControlWidth = true;
			((HorizontalOrVerticalLayoutGroup)component3).childControlHeight = true;
			((HorizontalOrVerticalLayoutGroup)component3).childForceExpandWidth = true;
			((HorizontalOrVerticalLayoutGroup)component3).childForceExpandHeight = false;
			val2.GetComponent<ContentSizeFitter>().verticalFit = (FitMode)2;
			component2.content = contentRT;
			return component2;
		}

		private static void AttachScrollbar(Transform container, ScrollRect scrollRect, float bottomOffset)
		{
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Expected O, but got Unknown
			//IL_0056: 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_0080: Unknown result type (might be due to invalid IL or missing references)
			//IL_0098: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fa: Expected O, but got Unknown
			//IL_0113: Unknown result type (might be due to invalid IL or missing references)
			//IL_011e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0128: Unknown result type (might be due to invalid IL or missing references)
			//IL_0157: 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_016e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0176: 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)
			GameObject val = new GameObject("Scrollbar", new Type[3]
			{
				typeof(RectTransform),
				typeof(Scrollbar),
				typeof(Image)
			});
			val.transform.SetParent(container, false);
			RectTransform component = val.GetComponent<RectTransform>();
			component.anchorMin = new Vector2(1f, 0f);
			component.anchorMax = new Vector2(1f, 1f);
			component.pivot = new Vector2(1f, 0.5f);
			component.sizeDelta = new Vector2(5f, 0f - (bottomOffset + 2f));
			component.anchoredPosition = new Vector2(-2f, bottomOffset / 2f);
			((Graphic)val.GetComponent<Image>()).color = new Color(0.02f, 0.05f, 0.08f, 0.8f);
			GameObject val2 = new GameObject("SlidingArea", new Type[1] { typeof(RectTransform) });
			val2.transform.SetParent(val.transform, false);
			RectTransform component2 = val2.GetComponent<RectTransform>();
			component2.anchorMin = Vector2.zero;
			component2.anchorMax = Vector2.one;
			component2.sizeDelta = Vector2.zero;
			GameObject val3 = new GameObject("Handle", new Type[2]
			{
				typeof(RectTransform),
				typeof(Image)
			});
			val3.transform.SetParent(val2.transform, false);
			RectTransform component3 = val3.GetComponent<RectTransform>();
			component3.sizeDelta = Vector2.zero;
			Image component4 = val3.GetComponent<Image>();
			((Graphic)component4).color = CyberPalette.ColorIceBlue;
			Scrollbar component5 = val.GetComponent<Scrollbar>();
			component5.handleRect = component3;
			((Selectable)component5).targetGraphic = (Graphic)(object)component4;
			component5.direction = (Direction)2;
			scrollRect.verticalScrollbar = component5;
			scrollRect.verticalScrollbarVisibility = (ScrollbarVisibility)0;
		}

		public static void Close()
		{
			if ((Object)(object)_currentOverlay != (Object)null)
			{
				Action? currentOnClose = _currentOnClose;
				_currentOnClose = null;
				Object.Destroy((Object)(object)_currentOverlay);
				_currentOverlay = null;
				currentOnClose?.Invoke();
			}
		}

		private void Update()
		{
			if (Input.GetKeyDown((KeyCode)27))
			{
				Close();
			}
		}
	}
	public class CyberHoverHandler : MonoBehaviour, IPointerEnterHandler, IEventSystemHandler, IPointerExitHandler, IPointerDownHandler, IPointerUpHandler
	{
		private Image? _borderImg;

		private Image? _fillImg;

		private TextMeshProUGUI? _text;

		private Color _normalBorder;

		private Color _hoverBorder;

		private Color _pressedBorder;

		private Color _normalFill;

		private Color _hoverFill;

		private Color _pressedFill;

		private Color _normalText;

		private Color _hoverText;

		private Color _pressedText;

		private bool _isHovered;

		private bool _isPressed;

		public void Init(Image borderImg, Color normalBorder, Color hoverBorder, Image? fillImg = null, Color? normalFill = null, Color? hoverFill = null, Color? pressedBorder = null, Color? pressedFill = null, TextMeshProUGUI? text = null, Color? normalText = null, Color? hoverText = null, Color? pressedText = null)
		{
			//IL_0008: 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_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			//IL_0022: 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_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_003b: 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_0076: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0092: 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_0097: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d7: 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_00ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_010b: 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)
			//IL_0110: Unknown result type (might be due to invalid IL or missing references)
			//IL_012c: 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_0131: 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_0143: Unknown result type (might be due to invalid IL or missing references)
			//IL_0151: Unknown result type (might be due to invalid IL or missing references)
			_borderImg = borderImg;
			_normalBorder = normalBorder;
			_hoverBorder = hoverBorder;
			_pressedBorder = (Color)(((??)pressedBorder) ?? Color.Lerp(hoverBorder, Color.white, 0.45f));
			_fillImg = fillImg;
			_normalFill = (Color)(((??)normalFill) ?? (((Object)(object)fillImg != (Object)null) ? ((Graphic)fillImg).color : Color.clear));
			_hoverFill = (Color)(((??)hoverFill) ?? _normalFill);
			_pressedFill = (Color)(((??)pressedFill) ?? (((Object)(object)fillImg != (Object)null) ? new Color(0.12f, 0.22f, 0.32f, 1f) : Color.clear));
			_text = text;
			if ((Object)(object)text != (Object)null)
			{
				_normalText = (Color)(((??)normalText) ?? ((Graphic)text).color);
				_hoverText = (Color)(((??)hoverText) ?? _normalText);
				_pressedText = (Color)(((??)pressedText) ?? Color.white);
			}
			UpdateVisuals();
		}

		public void OnPointerEnter(PointerEventData eventData)
		{
			_isHovered = true;
			UpdateVisuals();
		}

		public void OnPointerExit(PointerEventData eventData)
		{
			_isHovered = false;
			UpdateVisuals();
		}

		public void OnPointerDown(PointerEventData eventData)
		{
			_isPressed = true;
			UpdateVisuals();
		}

		public void OnPointerUp(PointerEventData eventData)
		{
			_isPressed = false;
			UpdateVisuals();
		}

		public void SetNormalColors(Color normalBorder, Color normalText, Color? normalFill = null, Color? hoverBorder = null, Color? hoverText = null, Color? hoverFill = null, Color? pressedBorder = null, Color? pressedText = null, Color? pressedFill = null)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0002: 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_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_001a: 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_0030: 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_0046: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: Unknown result type (might be due to invalid IL or missing references)
			//IL_005c: 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_0072: Unknown result type (might be due to invalid IL or missing references)
			//IL_0077: Unknown result type (might be due to invalid IL or missing references)
			//IL_0088: 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)
			//IL_009e: 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)
			_normalBorder = normalBorder;
			_normalText = normalText;
			if (normalFill.HasValue)
			{
				_normalFill = normalFill.Value;
			}
			if (hoverBorder.HasValue)
			{
				_hoverBorder = hoverBorder.Value;
			}
			if (hoverText.HasValue)
			{
				_hoverText = hoverText.Value;
			}
			if (hoverFill.HasValue)
			{
				_hoverFill = hoverFill.Value;
			}
			if (pressedBorder.HasValue)
			{
				_pressedBorder = pressedBorder.Value;
			}
			if (pressedText.HasValue)
			{
				_pressedText = pressedText.Value;
			}
			if (pressedFill.HasValue)
			{
				_pressedFill = pressedFill.Value;
			}
			UpdateVisuals();
		}

		public void UpdateVisuals()
		{
			//IL_001d: 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_0086: 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_0103: 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_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0122: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c4: Unknown result type (might be due to invalid IL or missing references)
			if (_isPressed)
			{
				if ((Object)(object)_borderImg != (Object)null)
				{
					((Graphic)_borderImg).color = _pressedBorder;
				}
				if ((Object)(object)_fillImg != (Object)null)
				{
					((Graphic)_fillImg).color = _pressedFill;
				}
				if ((Object)(object)_text != (Object)null)
				{
					((Graphic)_text).color = _pressedText;
				}
			}
			else if (_isHovered)
			{
				if ((Object)(object)_borderImg != (Object)null)
				{
					((Graphic)_borderImg).color = _hoverBorder;
				}
				if ((Object)(object)_fillImg != (Object)null)
				{
					((Graphic)_fillImg).color = _hoverFill;
				}
				if ((Object)(object)_text != (Object)null)
				{
					((Graphic)_text).color = _hoverText;
				}
			}
			else
			{
				if ((Object)(object)_borderImg != (Object)null)
				{
					((Graphic)_borderImg).color = _normalBorder;
				}
				if ((Object)(object)_fillImg != (Object)null)
				{
					((Graphic)_fillImg).color = _normalFill;
				}
				if ((Object)(object)_text != (Object)null)
				{
					((Graphic)_text).color = _normalText;
				}
			}
		}
	}
	public static class CyberPalette
	{
		public static readonly Color ColorVoidBlack = new Color(0.024f, 0.035f, 0.055f, 1f);

		public static readonly Color ColorCardSurface = new Color(0.039f, 0.055f, 0.082f, 1f);

		public static readonly Color ColorIceBlue = new Color(0.392f, 0.941f, 0.988f, 1f);

		public static readonly Color ColorIceBlueBright = new Color(0.647f, 0.953f, 0.988f, 1f);

		public static readonly Color ColorCyberTeal = new Color(0.078f, 0.722f, 0.651f, 1f);

		public static readonly Color ColorGlacialMint = new Color(0f, 0.961f, 0.608f, 1f);

		public static readonly Color ColorWarningAmber = new Color(0.984f, 0.749f, 0.141f, 1f);

		public static readonly Color ColorErrorRed = new Color(0.937f, 0.267f, 0.267f, 1f);

		public static readonly Color ColorTextMain = new Color(0.784f, 0.867f, 0.933f, 1f);

		public static readonly Color ColorTextMuted = new Color(0.482f, 0.604f, 0.725f, 1f);

		public static readonly Color ColorBorderSubtle = new Color(0.392f, 0.941f, 0.988f, 0.22f);

		public static readonly Color ColorBorderCard = new Color(0.125f, 0.23f, 0.34f, 0.85f);

		public static readonly Color ColorSeparator = new Color(0.392f, 0.941f, 0.988f, 0.16f);

		public static readonly Color ColorInputGroove = new Color(0.12f, 0.2f, 0.28f, 0.85f);

		public static readonly Color ColorInputWell = new Color(0.008f, 0.012f, 0.018f, 1f);

		public static readonly Color ColorInputAccent = new Color(0.15f, 0.4f, 0.52f, 0.7f);
	}
	public static class IconFactory
	{
		private static Sprite? _syncSprite;

		private static Sprite? _lockSprite;

		private static Sprite? _textPadSprite;

		private static Sprite? _undoSprite;

		private static Sprite? _redoSprite;

		private static Sprite? _formatSprite;

		private static Sprite? _revertSprite;

		private static Sprite? _saveSprite;

		public static Sprite GetSyncIcon()
		{
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Expected O, but got Unknown
			//IL_0041: 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_0079: Unknown result type (might be due to invalid IL or missing references)
			//IL_0090: 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_00a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c0: 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_00de: 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_00f0: Unknown result type (might be due to invalid IL or missing references)
			//IL_0111: Unknown result type (might be due to invalid IL or missing references)
			//IL_0120: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)_syncSprite != (Object)null)
			{
				return _syncSprite;
			}
			Texture2D val = new Texture2D(16, 16, (TextureFormat)4, false);
			((Texture)val).filterMode = (FilterMode)0;
			Color val2 = default(Color);
			((Color)(ref val2))..ctor(0f, 0f, 0f, 0f);
			Color white = Color.white;
			for (int i = 0; i < 16; i++)
			{
				for (int j = 0; j < 16; j++)
				{
					val.SetPixel(j, i, val2);
				}
			}
			for (int k = 3; k <= 12; k++)
			{
				val.SetPixel(k, 11, white);
			}
			val.SetPixel(11, 12, white);
			val.SetPixel(10, 13, white);
			val.SetPixel(11, 10, white);
			val.SetPixel(10, 9, white);
			for (int l = 3; l <= 12; l++)
			{
				val.SetPixel(l, 4, white);
			}
			val.SetPixel(4, 5, white);
			val.SetPixel(5, 6, white);
			val.SetPixel(4, 3, white);
			val.SetPixel(5, 2, white);
			val.Apply();
			_syncSprite = Sprite.Create(val, new Rect(0f, 0f, 16f, 16f), new Vector2(0.5f, 0.5f));
			return _syncSprite;
		}

		public static Sprite GetLockIcon()
		{
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Expected O, but got Unknown
			//IL_0041: 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_0079: 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_009a: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a4: 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_00b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d9: 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_0117: Unknown result type (might be due to invalid IL or missing references)
			//IL_0120: Unknown result type (might be due to invalid IL or missing references)
			//IL_0129: Unknown result type (might be due to invalid IL or missing references)
			//IL_014a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0159: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ee: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)_lockSprite != (Object)null)
			{
				return _lockSprite;
			}
			Texture2D val = new Texture2D(16, 16, (TextureFormat)4, false);
			((Texture)val).filterMode = (FilterMode)0;
			Color val2 = default(Color);
			((Color)(ref val2))..ctor(0f, 0f, 0f, 0f);
			Color white = Color.white;
			for (int i = 0; i < 16; i++)
			{
				for (int j = 0; j < 16; j++)
				{
					val.SetPixel(j, i, val2);
				}
			}
			for (int k = 6; k <= 9; k++)
			{
				val.SetPixel(k, 13, white);
			}
			val.SetPixel(5, 12, white);
			val.SetPixel(10, 12, white);
			val.SetPixel(5, 11, white);
			val.SetPixel(10, 11, white);
			val.SetPixel(5, 10, white);
			val.SetPixel(10, 10, white);
			val.SetPixel(5, 9, white);
			val.SetPixel(10, 9, white);
			for (int l = 2; l <= 8; l++)
			{
				for (int m = 4; m <= 11; m++)
				{
					val.SetPixel(m, l, white);
				}
			}
			val.SetPixel(7, 5, val2);
			val.SetPixel(8, 5, val2);
			val.SetPixel(7, 4, val2);
			val.SetPixel(8, 4, val2);
			val.Apply();
			_lockSprite = Sprite.Create(val, new Rect(0f, 0f, 16f, 16f), new Vector2(0.5f, 0.5f));
			return _lockSprite;
		}

		public static Sprite GetTextPadIcon()
		{
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Expected O, but got Unknown
			//IL_0041: 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_0079: Unknown result type (might be due to invalid IL or missing references)
			//IL_0095: Unknown result type (might be due to invalid IL or missing references)
			//IL_009f: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0117: Unknown result type (might be due to invalid IL or missing references)
			//IL_0143: Unknown result type (might be due to invalid IL or missing references)
			//IL_0152: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)_textPadSprite != (Object)null)
			{
				return _textPadSprite;
			}
			Texture2D val = new Texture2D(16, 16, (TextureFormat)4, false);
			((Texture)val).filterMode = (FilterMode)0;
			Color val2 = default(Color);
			((Color)(ref val2))..ctor(0f, 0f, 0f, 0f);
			Color white = Color.white;
			for (int i = 0; i < 16; i++)
			{
				for (int j = 0; j < 16; j++)
				{
					val.SetPixel(j, i, val2);
				}
			}
			for (int k = 6; k <= 9; k++)
			{
				val.SetPixel(k, 14, white);
			}
			for (int l = 3; l <= 12; l++)
			{
				val.SetPixel(l, 13, white);
				val.SetPixel(l, 1, white);
			}
			for (int m = 1; m <= 13; m++)
			{
				val.SetPixel(3, m, white);
				val.SetPixel(12, m, white);
			}
			for (int n = 5; n <= 10; n++)
			{
				val.SetPixel(n, 10, white);
			}
			for (int num = 5; num <= 10; num++)
			{
				val.SetPixel(num, 7, white);
			}
			for (int num2 = 5; num2 <= 8; num2++)
			{
				val.SetPixel(num2, 4, white);
			}
			val.Apply();
			_textPadSprite = Sprite.Create(val, new Rect(0f, 0f, 16f, 16f), new Vector2(0.5f, 0.5f));
			return _textPadSprite;
		}

		public static Sprite GetUndoIcon()
		{
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Expected O, but got Unknown
			//IL_0041: 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_0073: Unknown result type (might be due to invalid IL or missing references)
			//IL_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0086: Unknown result type (might be due to invalid IL or missing references)
			//IL_0090: Unknown result type (might be due to invalid IL or missing references)
			//IL_0099: 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_00a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e0: 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_0117: 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)
			if ((Object)(object)_undoSprite != (Object)null)
			{
				return _undoSprite;
			}
			Texture2D val = new Texture2D(16, 16, (TextureFormat)4, false);
			((Texture)val).filterMode = (FilterMode)0;
			Color val2 = default(Color);
			((Color)(ref val2))..ctor(0f, 0f, 0f, 0f);
			Color white = Color.white;
			for (int i = 0; i < 16; i++)
			{
				for (int j = 0; j < 16; j++)
				{
					val.SetPixel(j, i, val2);
				}
			}
			val.SetPixel(3, 9, white);
			val.SetPixel(4, 10, white);
			val.SetPixel(4, 8, white);
			val.SetPixel(5, 11, white);
			val.SetPixel(5, 7, white);
			for (int k = 5; k <= 10; k++)
			{
				val.SetPixel(k, 9, white);
			}
			for (int l = 5; l <= 10; l++)
			{
				val.SetPixel(l, 8, white);
			}
			for (int m = 5; m <= 8; m++)
			{
				val.SetPixel(11, m, white);
				val.SetPixel(12, m, white);
			}
			val.Apply();
			_undoSprite = Sprite.Create(val, new Rect(0f, 0f, 16f, 16f), new Vector2(0.5f, 0.5f));
			return _undoSprite;
		}

		public static Sprite GetRedoIcon()
		{
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Expected O, but got Unknown
			//IL_0041: 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_0074: Unknown result type (might be due to invalid IL or missing references)
			//IL_007f: 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_0094: Unknown result type (might be due to invalid IL or missing references)
			//IL_009e: 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_00ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c9: 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_00ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_011a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0129: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)_redoSprite != (Object)null)
			{
				return _redoSprite;
			}
			Texture2D val = new Texture2D(16, 16, (TextureFormat)4, false);
			((Texture)val).filterMode = (FilterMode)0;
			Color val2 = default(Color);
			((Color)(ref val2))..ctor(0f, 0f, 0f, 0f);
			Color white = Color.white;
			for (int i = 0; i < 16; i++)
			{
				for (int j = 0; j < 16; j++)
				{
					val.SetPixel(j, i, val2);
				}
			}
			val.SetPixel(12, 9, white);
			val.SetPixel(11, 10, white);
			val.SetPixel(11, 8, white);
			val.SetPixel(10, 11, white);
			val.SetPixel(10, 7, white);
			for (int k = 5; k <= 10; k++)
			{
				val.SetPixel(k, 9, white);
			}
			for (int l = 5; l <= 10; l++)
			{
				val.SetPixel(l, 8, white);
			}
			for (int m = 5; m <= 8; m++)
			{
				val.SetPixel(3, m, white);
				val.SetPixel(4, m, white);
			}
			val.Apply();
			_redoSprite = Sprite.Create(val, new Rect(0f, 0f, 16f, 16f), new Vector2(0.5f, 0.5f));
			return _redoSprite;
		}

		public static Sprite GetFormatIcon()
		{
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Expected O, but got Unknown
			//IL_0041: 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_0073: Unknown result type (might be due to invalid IL or missing references)
			//IL_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0087: Unknown result type (might be due to invalid IL or missing references)
			//IL_0090: Unknown result type (might be due to invalid IL or missing references)
			//IL_0099: 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_00ab: 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_00c1: 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: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f4: Unknown result type (might be due to invalid IL or missing references)
			//IL_0115: Unknown result type (might be due to invalid IL or missing references)
			//IL_0124: 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)
			if ((Object)(object)_formatSprite != (Object)null)
			{
				return _formatSprite;
			}
			Texture2D val = new Texture2D(16, 16, (TextureFormat)4, false);
			((Texture)val).filterMode = (FilterMode)0;
			Color val2 = default(Color);
			((Color)(ref val2))..ctor(0f, 0f, 0f, 0f);
			Color white = Color.white;
			for (int i = 0; i < 16; i++)
			{
				for (int j = 0; j < 16; j++)
				{
					val.SetPixel(j, i, val2);
				}
			}
			val.SetPixel(5, 12, white);
			val.SetPixel(4, 11, white);
			val.SetPixel(4, 9, white);
			val.SetPixel(3, 8, white);
			val.SetPixel(4, 7, white);
			val.SetPixel(4, 5, white);
			val.SetPixel(5, 4, white);
			val.SetPixel(10, 12, white);
			val.SetPixel(11, 11, white);
			val.SetPixel(11, 9, white);
			val.SetPixel(12, 8, white);
			val.SetPixel(11, 7, white);
			val.SetPixel(11, 5, white);
			val.SetPixel(10, 4, white);
			val.Apply();
			_formatSprite = Sprite.Create(val, new Rect(0f, 0f, 16f, 16f), new Vector2(0.5f, 0.5f));
			return _formatSprite;
		}

		public static Sprite GetRevertIcon()
		{
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Expected O, but got Unknown
			//IL_0041: 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_0073: Unknown result type (might be due to invalid IL or missing references)
			//IL_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0087: Unknown result type (might be due to invalid IL or missing references)
			//IL_0091: 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_00a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f3: 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)
			//IL_0117: Unknown result type (might be due to invalid IL or missing references)
			//IL_0120: 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)
			if ((Object)(object)_revertSprite != (Object)null)
			{
				return _revertSprite;
			}
			Texture2D val = new Texture2D(16, 16, (TextureFormat)4, false);
			((Texture)val).filterMode = (FilterMode)0;
			Color val2 = default(Color);
			((Color)(ref val2))..ctor(0f, 0f, 0f, 0f);
			Color white = Color.white;
			for (int i = 0; i < 16; i++)
			{
				for (int j = 0; j < 16; j++)
				{
					val.SetPixel(j, i, val2);
				}
			}
			val.SetPixel(3, 11, white);
			val.SetPixel(4, 12, white);
			val.SetPixel(3, 10, white);
			val.SetPixel(2, 10, white);
			for (int k = 5; k <= 9; k++)
			{
				val.SetPixel(k, 12, white);
			}
			val.SetPixel(10, 11, white);
			val.SetPixel(11, 10, white);
			for (int l = 6; l <= 9; l++)
			{
				val.SetPixel(12, l, white);
			}
			val.SetPixel(11, 5, white);
			val.SetPixel(10, 4, white);
			for (int m = 6; m <= 9; m++)
			{
				val.SetPixel(m, 3, white);
			}
			val.SetPixel(5, 4, white);
			val.SetPixel(4, 5, white);
			val.Apply();
			_revertSprite = Sprite.Create(val, new Rect(0f, 0f, 16f, 16f), new Vector2(0.5f, 0.5f));
			return _revertSprite;
		}

		public static Sprite GetSaveIcon()
		{
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Expected O, but got Unknown
			//IL_0041: 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_0079: Unknown result type (might be due to invalid IL or missing references)
			//IL_0090: 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_00bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d6: 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_00fd: 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_011e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0128: Unknown result type (might be due to invalid IL or missing references)
			//IL_0175: Unknown result type (might be due to invalid IL or missing references)
			//IL_0184: 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)
			if ((Object)(object)_saveSprite != (Object)null)
			{
				return _saveSprite;
			}
			Texture2D val = new Texture2D(16, 16, (TextureFormat)4, false);
			((Texture)val).filterMode = (FilterMode)0;
			Color val2 = default(Color);
			((Color)(ref val2))..ctor(0f, 0f, 0f, 0f);
			Color white = Color.white;
			for (int i = 0; i < 16; i++)
			{
				for (int j = 0; j < 16; j++)
				{
					val.SetPixel(j, i, val2);
				}
			}
			for (int k = 3; k <= 11; k++)
			{
				val.SetPixel(k, 13, white);
			}
			val.SetPixel(12, 12, white);
			for (int l = 2; l <= 11; l++)
			{
				val.SetPixel(12, l, white);
			}
			for (int m = 3; m <= 12; m++)
			{
				val.SetPixel(m, 2, white);
			}
			for (int n = 2; n <= 13; n++)
			{
				val.SetPixel(3, n, white);
			}
			for (int num = 5; num <= 9; num++)
			{
				val.SetPixel(num, 12, white);
				val.SetPixel(num, 11, white);
				val.SetPixel(num, 10, white);
			}
			val.SetPixel(8, 11, val2);
			val.SetPixel(8, 12, val2);
			for (int num2 = 5; num2 <= 10; num2++)
			{
				for (int num3 = 4; num3 <= 7; num3++)
				{
					val.SetPixel(num2, num3, white);
				}
			}
			val.Apply();
			_saveSprite = Sprite.Create(val, new Rect(0f, 0f, 16f, 16f), new Vector2(0.5f, 0.5f));
			return _saveSprite;
		}
	}
	public static class UIExtensions
	{
		public static RectTransform SetAnchor(this RectTransform rectTransform, Vector2 min, Vector2 max)
		{
			//IL_0001: 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)
			rectTransform.anchorMin = min;
			rectTransform.anchorMax = max;
			return rectTransform;
		}

		public static RectTransform SetAnchorMin(this RectTransform rectTransform, Vector2 min)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			rectTransform.anchorMin = min;
			return rectTransform;
		}

		public static RectTransform SetAnchorMax(this RectTransform rectTransform, Vector2 max)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			rectTransform.anchorMax = max;
			return rectTransform;
		}

		public static RectTransform SetPivot(this RectTransform rectTransform, Vector2 pivot)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			rectTransform.pivot = pivot;
			return rectTransform;
		}

		public static RectTransform SetSizeDelta(this RectTransform rectTransform, Vector2 sizeDelta)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			rectTransform.sizeDelta = sizeDelta;
			return rectTransform;
		}

		public static RectTransform SetAnchoredPosition(this RectTransform rectTransform, Vector2 position)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			rectTransform.anchoredPosition = position;
			return rectTransform;
		}

		public static RectTransform SetOffsets(this RectTransform rectTransform, Vector2 minOffset, Vector2 maxOffset)
		{
			//IL_0001: 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)
			rectTransform.offsetMin = minOffset;
			rectTransform.offsetMax = maxOffset;
			return rectTransform;
		}

		public static CanvasGroup SetAlpha(this CanvasGroup canvasGroup, float alpha)
		{
			canvasGroup.alpha = alpha;
			return canvasGroup;
		}

		public static CanvasGroup SetInteractable(this CanvasGroup canvasGroup, bool interactable)
		{
			canvasGroup.interactable = interactable;
			return canvasGroup;
		}

		public static CanvasGroup SetBlocksRaycasts(this CanvasGroup canvasGroup, bool blocksRaycasts)
		{
			canvasGroup.blocksRaycasts = blocksRaycasts;
			return canvasGroup;
		}

		public static Image SetColor(this Image image, Color color)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			((Graphic)image).color = color;
			return image;
		}

		public static Image SetRaycastTarget(this Image image, bool raycastTarget)
		{
			((Graphic)image).raycastTarget = raycastTarget;
			return image;
		}

		public static LayoutElement SetDimensions(this LayoutElement element, float minWidth, float minHeight, float preferredWidth, float preferredHeight, float flexibleWidth = 0f, float flexibleHeight = 0f)
		{
			element.minWidth = minWidth;
			element.minHeight = minHeight;
			element.preferredWidth = preferredWidth;
			element.preferredHeight = preferredHeight;
			element.flexibleWidth = flexibleWidth;
			element.flexibleHeight = flexibleHeight;
			return element;
		}

		public static LayoutElement SetFixedWidth(this LayoutElement element, float width)
		{
			element.minWidth = width;
			element.preferredWidth = width;
			element.flexibleWidth = 0f;
			return element;
		}

		public static LayoutElement SetFixedHeight(this LayoutElement element, float height)
		{
			element.minHeight = height;
			element.preferredHeight = height;
			element.flexibleHeight = 0f;
			return element;
		}

		public static T SetChildControl<T>(this T layoutGroup, bool width, bool height) where T : HorizontalOrVerticalLayoutGroup
		{
			((HorizontalOrVerticalLayoutGroup)layoutGroup).childControlWidth = width;
			((HorizontalOrVerticalLayoutGroup)layoutGroup).childControlHeight = height;
			return layoutGroup;
		}

		public static T SetChildForceExpand<T>(this T layoutGroup, bool width, bool height) where T : HorizontalOrVerticalLayoutGroup
		{
			((HorizontalOrVerticalLayoutGroup)layoutGroup).childForceExpandWidth = width;
			((HorizontalOrVerticalLayoutGroup)layoutGroup).childForceExpandHeight = height;
			return layoutGroup;
		}

		public static T SetSpacing<T>(this T layoutGroup, float spacing) where T : HorizontalOrVerticalLayoutGroup
		{
			((HorizontalOrVerticalLayoutGroup)layoutGroup).spacing = spacing;
			return layoutGroup;
		}

		public static T SetPadding<T>(this T layoutGroup, int left, int right, int top, int bottom) where T : LayoutGroup
		{
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Expected O, but got Unknown
			((LayoutGroup)layoutGroup).padding = new RectOffset(left, right, top, bottom);
			return layoutGroup;
		}

		public static T SetChildAlignment<T>(this T layoutGroup, TextAnchor alignment) where T : LayoutGroup
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			((LayoutGroup)layoutGroup).childAlignment = alignment;
			return layoutGroup;
		}

		public static ContentSizeFitter SetHorizontalFit(this ContentSizeFitter fitter, FitMode fitMode)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			fitter.horizontalFit = fitMode;
			return fitter;
		}

		public static ContentSizeFitter SetVerticalFit(this ContentSizeFitter fitter, FitMode fitMode)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			fitter.verticalFit = fitMode;
			return fitter;
		}
	}
	public static class UiFactory
	{
		public static float GetFontScaleFactor()
		{
			return ConfigDrawerConfig.UiFontSize?.Value switch
			{
				FontSizeScale.Small => 0.85f, 
				FontSizeScale.Large => 1.08f, 
				_ => 0.95f, 
			};
		}

		public static float GetScaledFontSize(float baseSize)
		{
			return Mathf.Round(baseSize * GetFontScaleFactor());
		}

		public static TMP_FontAsset? ResolveFont()
		{
			return UIFonts.GetPrimaryFont();
		}

		public static TMP_FontAsset? ResolveTerminalFont()
		{
			return UIFonts.GetTerminalFont();
		}

		public static void RefreshAllFonts(GameObject root)
		{
			UIFonts.RefreshAllFonts(root);
		}

		public static GameObject CreatePanel(Transform parent, string name, Color borderColor, Color fillColor, float borderWidth = 1f)
		{
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_0027: Expected O, but got Unknown
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0065: Unknown result type (might be due to invalid IL or missing references)
			//IL_006a: 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_008f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0094: 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_00a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b9: Unknown result type (might be due to invalid IL or missing references)
			GameObject val = new GameObject(name, new Type[2]
			{
				typeof(RectTransform),
				typeof(Image)
			});
			val.transform.SetParent(parent, false);
			((Graphic)val.GetComponent<Image>()).color = borderColor;
			GameObject val2 = new GameObject("Fill", new Type[2]
			{
				typeof(RectTransform),
				typeof(Image)
			});
			val2.transform.SetParent(val.transform, false);
			float num = Mathf.Max(borderWidth, 0.5f);
			val2.GetComponent<RectTransform>().SetAnchor(Vector2.zero, Vector2.one).SetOffsets(new Vector2(num, num), new Vector2(0f - num, 0f - num));
			((Graphic)val2.GetComponent<Image>()).color = fillColor;
			return val;
		}

		public static void AddBorderOutline(Transform parent, Color borderColor, float width = 1f)
		{
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0037: 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_0057: 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_006b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0076: Unknown result type (might be due to invalid IL or missing references)
			//IL_007b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0091: 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_00a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b5: 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)
			//IL_00da: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e6: 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_00f0: Unknown result type (might be due to invalid IL or missing references)
			float num = Mathf.Max(width, 0.5f);
			CreateBorderLine(parent, "BorderTop", new Vector2(0f, 1f), new Vector2(1f, 1f), new Vector2(0f, 0f - num), Vector2.zero, borderColor);
			CreateBorderLine(parent, "BorderBottom", new Vector2(0f, 0f), new Vector2(1f, 0f), Vector2.zero, new Vector2(0f, num), borderColor);
			CreateBorderLine(parent, "BorderLeft", new Vector2(0f, 0f), new Vector2(0f, 1f), Vector2.zero, new Vector2(num, 0f), borderColor);
			CreateBorderLine(parent, "BorderRight", new Vector2(1f, 0f), new Vector2(1f, 1f), new Vector2(0f - num, 0f), Vector2.zero, borderColor);
		}

		private static void CreateBorderLine(Transform parent, string name, Vector2 anchorMin, Vector2 anchorMax, Vector2 offsetMin, Vector2 offsetMax, Color color)
		{
			//IL_0021: 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_0033: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: 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_0048: Unknown result type (might be due to invalid IL or missing references)
			//IL_004f: Unknown result type (might be due to invalid IL or missing references)
			//IL_005c: Unknown result type (might be due to invalid IL or missing references)
			GameObject val = new GameObject(name, new Type[2]
			{
				typeof(RectTransform),
				typeof(Image)
			});
			val.transform.SetParent(parent, false);
			RectTransform component = val.GetComponent<RectTransform>();
			component.anchorMin = anchorMin;
			component.anchorMax = anchorMax;
			component.offsetMin = offsetMin;
			component.offsetMax = offsetMax;
			Image component2 = val.GetComponent<Image>();
			((Graphic)component2).color = color;
			((Graphic)component2).raycastTarget = false;
		}

		public static GameObject CreateCyberButton(Transform parent, string name, string labelText, Action onClick, Color borderColor, Color textColor, float width = -1f, float height = 24f, bool enableHover = true)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0004: 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_0093: Unknown result type (might be due to invalid IL or missing references)
			//IL_0098: Unknown result type (might be due to invalid IL or missing references)
			//IL_009f: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ac: 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_00b7: 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)
			//IL_00da: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_013f: 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_02c6: Expected O, but got Unknown
			//IL_0193: Unknown result type (might be due to invalid IL or missing references)
			//IL_0195: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bd: 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_01c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0207: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_020c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0240: Unknown result type (might be due to invalid IL or missing references)
			//IL_0225: Unknown result type (might be due to invalid IL or missing references)
			//IL_0245: Unknown result type (might be due to invalid IL or missing references)
			//IL_0250: Unknown result type (might be due to invalid IL or missing references)
			//IL_0249: Unknown result type (might be due to invalid IL or missing references)
			//IL_0255: Unknown result type (might be due to invalid IL or missing references)
			//IL_0257: Unknown result type (might be due to invalid IL or missing references)
			//IL_025c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0262: Unknown result type (might be due to invalid IL or missing references)
			//IL_0264: 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_0272: Unknown result type (might be due to invalid IL or missing references)
			//IL_0279: Unknown result type (might be due to invalid IL or missing references)
			//IL_0280: Unknown result type (might be due to invalid IL or missing references)
			//IL_0289: Unknown result type (might be due to invalid IL or missing references)
			//IL_0290: Unknown result type (might be due to invalid IL or missing references)
			//IL_0297: Unknown result type (might be due to invalid IL or missing references)
			GameObject val = CreatePanel(parent, name, borderColor, CyberPalette.ColorVoidBlack);
			float num = ((width > 0f) ? width : 50f);
			val.GetComponent<RectTransform>().SetSizeDelta(new Vector2(num, height));
			val.AddComponent<LayoutElement>().SetDimensions(num, height, num, height);
			Transform val2 = val.transform.Find("Fill");
			Transform val3 = (((Object)(object)val2 != (Object)null) ? val2 : val.transform);
			GameObject val4 = new GameObject("Text", new Type[1] { typeof(RectTransform) });
			val4.SetActive(false);
			val4.transform.SetParent(val3, false);
			val4.GetComponent<RectTransform>().SetAnchor(Vector2.zero, Vector2.one).SetOffsets(new Vector2(3f, 0f), new Vector2(-3f, 0f));
			TextMeshProUGUI val5 = val4.AddComponent<TextMeshProUGUI>();
			TMP_FontAsset val6 = ResolveFont();
			if ((Object)(object)val6 != (Object)null)
			{
				((TMP_Text)val5).font = val6;
				if ((Object)(object)((TMP_Asset)val6).material != (Object)null)
				{
					((TMP_Text)val5).fontSharedMaterial = ((TMP_Asset)val6).material;
				}
			}
			((TMP_Text)val5).text = labelText;
			((TMP_Text)val5).fontSize = GetScaledFontSize(10.5f);
			((Graphic)val5).color = textColor;
			((TMP_Text)val5).alignment = (TextAlignmentOptions)514;
			((TMP_Text)val5).textWrappingMode = (TextWrappingModes)0;
			((TMP_Text)val5).overflowMode = (TextOverflowModes)0;
			val4.SetActive(true);
			if (enableHover)
			{
				CyberHoverHandler cyberHoverHandler = val.AddComponent<CyberHoverHandler>();
				Image component = val.GetComponent<Image>();
				Image fillImg = (((Object)(object)val2 != (Object)null) ? ((Component)val2).GetComponent<Image>() : null);
				bool num2 = borderColor == CyberPalette.ColorErrorRed;
				Color hoverBorder = (Color)(num2 ? new Color(1f, 0.45f, 0.45f, 1f) : CyberPalette.ColorIceBlueBright);
				Color value = (Color)(num2 ? new Color(1f, 0.85f, 0.85f, 1f) : Color.white);
				Color value2 = (Color)(num2 ? new Color(0.18f, 0.04f, 0.04f, 1f) : CyberPalette.ColorCardSurface);
				Color value3 = (num2 ? new Color(0.35f, 0.08f, 0.08f, 1f) : new Color(0.12f, 0.22f, 0.32f, 1f));
				Color value4 = (num2 ? Color.white : CyberPalette.ColorIceBlueBright);
				Color white = Color.white;
				cyberHoverHandler.Init(component, borderColor, hoverBorder, fillImg, CyberPalette.ColorVoidBlack, value2, value, value3, val5, textColor, value4, white);
			}
			Button obj = val.AddComponent<Button>();
			((Selectable)obj).transition = (Transition)0;
			((UnityEvent)obj.onClick).AddListener(new UnityAction(onClick.Invoke));
			return val;
		}

		public static TextMeshProUGUI CreateLabel(Transform parent, string name, string text, Color color, float fontSize = 11f, TextAlignmentOptions alignment = (TextAlignmentOptions)513)
		{
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_001a: Expected O, but got Unknown
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0081: Unknown result type (might be due to invalid IL or missing references)
			GameObject val = new GameObject(name, new Type[1] { typeof(RectTransform) });
			val.SetActive(false);
			val.transform.SetParent(parent, false);
			TextMeshProUGUI val2 = val.AddComponent<TextMeshProUGUI>();
			TMP_FontAsset val3 = ResolveFont();
			if ((Object)(object)val3 != (Object)null)
			{
				((TMP_Text)val2).font = val3;
				if ((Object)(object)((TMP_Asset)val3).material != (Object)null)
				{
					((TMP_Text)val2).fontSharedMaterial = ((TMP_Asset)val3).material;
				}
			}
			((TMP_Text)val2).text = text;
			((TMP_Text)val2).fontSize = GetScaledFontSize(fontSize);
			((Graphic)val2).color = color;
			((TMP_Text)val2).alignment = alignment;
			((TMP_Text)val2).textWrappingMode = (TextWrappingModes)0;
			((TMP_Text)val2).overflowMode = (TextOverflowModes)1;
			val.SetActive(true);
			return val2;
		}

		public static (GameObject Root, TMP_InputField Input) CreateInputField(Transform parent, string name, string initialText, Action<string> onCommit, float width = 120f, float height = 24f, string placeholderText = "", bool multiline = false, bool wrapText = true, float horizontalPadding = 8f)
		{
			//IL_000f: 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_0049: 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_0216: Expected O, but got Unknown
			//IL_022d: 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_013c: Expected O, but got Unknown
			//IL_015c: Unknown result type (might be due to invalid IL or missing references)
			//IL_016b: Unknown result type (might be due to invalid IL or missing references)
			//IL_017f: 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_019d: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bb: 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_0262: Unknown result type (might be due to invalid IL or missing references)
			//IL_0288: 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_02aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_0299: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_02da: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0302: Unknown result type (might be due to invalid IL or missing references)
			//IL_0307: Unknown result type (might be due to invalid IL or missing references)
			//IL_0319: Unknown result type (might be due to invalid IL or missing references)
			//IL_035c: Unknown result type (might be due to invalid IL or missing references)
			//IL_03e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_03ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_03f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0408: Unknown result type (might be due to invalid IL or missing references)
			//IL_040e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0413: Unknown result type (might be due to invalid IL or missing references)
			//IL_041d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0422: Unknown result type (might be due to invalid IL or missing references)
			//IL_042d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0484: Unknown result type (might be due to invalid IL or missing references)
			//IL_0584: Unknown result type (might be due to invalid IL or missing references)
			//IL_0592: Unknown result type (might be due to invalid IL or missing references)
			//IL_05ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_05df: Unknown result type (might be due to invalid IL or missing references)
			//IL_0623: Unknown result type (might be due to invalid IL or missing references)
			//IL_063c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0643: Unknown result type (might be due to invalid IL or missing references)
			//IL_064d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0657: Unknown result type (might be due to invalid IL or missing references)
			//IL_0661: Unknown result type (might be due to invalid IL or missing references)
			GameObject val = CreatePanel(parent, name, CyberPalette.ColorInputGroove, CyberPalette.ColorInputWell);
			float num = ((width > 0f) ? width : 120f);
			if (height > 0f)
			{
				val.GetComponent<RectTransform>().SetSizeDelta(new Vector2(num, height));
			}
			LayoutElement obj = val.AddComponent<LayoutElement>();
			obj.minWidth = num;
			obj.preferredWidth = ((width > 0f) ? num : (-1f));
			obj.flexibleWidth = ((width > 0f) ? 0f : 1f);
			obj.minHeight = ((height > 0f) ? height : 60f);
			obj.preferredHeight = ((height > 0f) ? height : (-1f));
			obj.flexibleHeight = ((height > 0f) ? 0f : 1f);
			Transform val2 = val.transform.Find("Fill");
			Transform val3 = (((Object)(object)val2 != (Object)null) ? val2 : val.transform);
			Image blImg = null;
			if (!multiline)
			{
				GameObject val4 = new GameObject("BottomAccent", new Type[2]
				{
					typeof(RectTransform),
					typeof(Image)
				});
				val4.transform.SetParent(val3, false);
				val4.GetComponent<RectTransform>().SetAnchor(new Vector2(0f, 0f), new Vector2(1f, 0f)).SetPivot(new Vector2(0.5f, 0f))
					.SetSizeDelta(new Vector2(0f, 1.5f))
					.SetAnchoredPosition(Vector2.zero);
				blImg = val4.GetComponent<Image>();
				((Graphic)blImg).color = CyberPalette.ColorInputAccent;
				((Graphic)blImg).raycastTarget = false;
			}
			float scaledFontSize = GetScaledFontSize(10f);
			GameObject val5 = new GameObject("TextArea", new Type[3]
			{
				typeof(RectTransform),
				typeof(RectMask2D),
				typeof(Image)
			});
			val5.transform.SetParent(val3, false);
			Image component = val5.GetComponent<Image>();
			((Graphic)component).color = Color.clear;
			((Graphic)component).raycastTarget = true;
			float num2 = (multiline ? 6f : Mathf.Max(horizontalPadding, 2f));
			RectTransform textViewport = val5.GetComponent<RectTransform>().SetAnchor(Vector2.zero, Vector2.one).SetOffsets(multiline ? new Vector2(6f, 6f) : new Vector2(num2, 0f), multiline ? new Vector2(-6f, -6f) : new Vector2(0f - num2, 0f));
			GameObject val6 = new GameObject("Text", new Type[1] { typeof(RectTransform) });
			val6.SetActive(false);
			val6.transform.SetParent(val5.transform, false);
			val6.GetComponent<RectTransform>().SetAnchor(Vector2.zero, Vector2.one).SetOffsets(Vector2.zero, Vector2.zero);
			TMP_FontAsset val7 = ResolveFont();
			TextMeshProUGUI val8 = val6.AddComponent<TextMeshProUGUI>();
			if ((Object)(object)val7 != (Object)null)
			{
				((TMP_Text)val8).font = val7;
				if ((Object)(object)((TMP_Asset)val7).material != (Object)null)
				{
					((TMP_Text)val8).fontSharedMaterial = ((TMP_Asset)val7).material;
				}
			}
			((TMP_Text)val8).fontSize = scaledFontSize;
			((Graphic)val8).color = CyberPalette.ColorTextMain;
			((TMP_Text)val8).alignment = (TextAlignmentOptions)(multiline ? 257 : 4097);
			((TMP_Text)val8).textWrappingMode = (TextWrappingModes)((multiline && wrapText) ? 1 : 0);
			((TMP_Text)val8).richText = false;
			((TMP_Text)val8).overflowMode = (TextOverflowModes)0;
			((TMP_Text)val8).maxVisibleCharacters = int.MaxValue;
			((TMP_Text)val8).maxVisibleWords = int.MaxValue;
			((TMP_Text)val8).maxVisibleLines = int.MaxValue;
			((Graphic)val8).raycastTarget = false;
			val6.SetActive(true);
			GameObject val9 = new GameObject("Placeholder", new Type[1] { typeof(RectTransform) });
			val9.SetActive(false);
			val9.transform.SetParent(val5.transform, false);
			val9.GetComponent<RectTransform>().SetAnchor(Vector2.zero, Vector2.one).SetOffsets(Vector2.zero, Vector2.zero);
			TextMeshProUGUI val10 = val9.AddComponent<TextMeshProUGUI>();
			if ((Object)(object)val7 != (Object)null)
			{
				((TMP_Text)val10).font = val7;
				if ((Object)(object)((TMP_Asset)val7).material != (Object)null)
				{
					((TMP_Text)val10).fontSharedMaterial = ((TMP_Asset)val7).material;
				}
			}
			((TMP_Text)val10).fontSize = scaledFontSize;
			((Graphic)val10).color = new Color(0.35f, 0.48f, 0.58f, 0.55f);
			((TMP_Text)val10).text = placeholderText ?? string.Empty;
			((TMP_Text)val10).alignment = (TextAlignmentOptions)(multiline ? 257 : 4097);
			((TMP_Text)val10).textWrappingMode = (TextWrappingModes)((multiline && wrapText) ? 1 : 0);
			((TMP_Text)val10).richText = false;
			((Graphic)val10).raycastTarget = false;
			val9.SetActive(true);
			Image borderImg = val.GetComponent<Image>();
			if ((Object)(object)borderImg != (Object)null)
			{
				((Graphic)borderImg).raycastTarget = true;
			}
			Image val11 = (((Object)(object)val2 != (Object)null) ? ((Component)val2).GetComponent<Image>() : null);
			if ((Object)(object)val11 != (Object)null)
			{
				((Graphic)val11).raycastTarget = false;
			}
			TMP_InputField val12 = val.AddComponent<TMP_InputField>();
			val12.textComponent = (TMP_Text)(object)val8;
			val12.textViewport = textViewport;
			((Selectable)val12).targetGraphic = (Graphic)(object)(((Object)(object)borderImg != (Object)null) ? borderImg : val.GetComponent<Image>());
			val12.placeholder = (Graphic)(object)val10;
			val12.lineType = (LineType)(multiline ? 2 : 0);
			Navigation navigation = default(Navigation);
			((Navigation)(ref navigation)).mode = (Mode)0;
			((Selectable)val12).navigation = navigation;
			((Selectable)val12).transition = (Transition)0;
			val12.customCaretColor = true;
			val12.caretColor = CyberPalette.ColorIceBlueBright;
			val12.caretWidth = 3;
			val12.caretBlinkRate = 0.85f;
			val12.selectionColor = new Color(0.15f, 0.55f, 0.85f, 0.35f);
			if (multiline)
			{
				val12.onFocusSelectAll = false;
			}
			((Behaviour)val12).enabled = false;
			((Behaviour)val12).enabled = true;
			if ((Object)(object)borderImg != (Object)null && !multiline)
			{
				val.AddComponent<CyberHoverHandler>().Init(borderImg, CyberPalette.ColorInputGroove, new Color(0.22f, 0.38f, 0.5f, 0.9f), val11, CyberPalette.ColorInputWell, CyberPalette.ColorInputWell, CyberPalette.ColorIceBlueBright, CyberPalette.ColorInputWell);
			}
			((UnityEvent<string>)(object)val12.onSelect).AddListener((UnityAction<string>)delegate
			{
				//IL_0014: Unknown result type (might be due to invalid IL or missing references)
				//IL_0032: Unknown result type (might be due to invalid IL or missing references)
				if ((Object)(object)borderImg != (Object)null)
				{
					((Graphic)borderImg).color = CyberPalette.ColorIceBlueBright;
				}
				if ((Object)(object)blImg != (Object)null)
				{
					((Graphic)blImg).color = CyberPalette.ColorIceBlueBright;
				}
			});
			((UnityEvent<string>)(object)val12.onDeselect).AddListener((UnityAction<string>)delegate
			{
				//IL_0014: Unknown result type (might be due to invalid IL or missing references)
				//IL_0032: Unknown result type (might be due to invalid IL or missing references)
				if ((Object)(object)borderImg != (Object)null)
				{
					((Graphic)borderImg).color = CyberPalette.ColorInputGroove;
				}
				if ((Object)(object)blImg != (Object)null)
				{
					((Graphic)blImg).color = CyberPalette.ColorInputAccent;
				}
			});
			val12.text = initialText;
			((UnityEvent<string>)(object)val12.onEndEdit).AddListener((UnityAction<string>)delegate(string obj2)
			{
				onCommit?.Invoke(obj2);
			});
			return (Root: val, Input: val12);
		}

		public static RectTransform? AttachTextPadIcon(Transform leftArea, TextMeshProUGUI label)
		{
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Expected O, but got Unknown
			//IL_005c: 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_007f: 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_00b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d3: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)leftArea == (Object)null || (Object)(object)label == (Object)null)
			{
				return null;
			}
			GameObject val = new GameObject("TextPadIcon", new Type[2]
			{
				typeof(RectTransform),
				typeof(Image)
			});
			val.transform.SetParent(leftArea, false);
			RectTransform obj = val.GetComponent<RectTransform>().SetAnchor(new Vector2(0f, 0.5f), new Vector2(0f, 0.5f)).SetPivot(new Vector2(0f, 0.5f))
				.SetSizeDelta(new Vector2(13f, 13f));
			((TMP_Text)label).ForceMeshUpdate(false, false);
			obj.anchoredPosition = new Vector2(((TMP_Text)label).preferredWidth + 6f, 0f);
			Image component = val.GetComponent<Image>();
			component.sprite = IconFactory.GetTextPadIcon();
			((Graphic)component).color = CyberPalette.ColorTextMuted;
			((Graphic)component).raycastTarget = false;
			return obj;
		}

		public static (GameObject Root, Image IconImage) CreateIconButton(Transform parent, string name, Sprite iconSprite, string tooltipHeader, string tooltipBody, Action onClick, Color borderColor, Color iconColor, float size = 24f)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0004: 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_00ad: 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_00bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e5: 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_010f: 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_0131: 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_0165: Unknown result type (might be due to invalid IL or missing references)
			//IL_016f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0171: Unknown result type (might be due to invalid IL or missing references)
			//IL_017d: Unknown result type (might be due to invalid IL or missing references)
			//IL_017f: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e7: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ec: 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_022a: 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_0196: Unknown result type (might be due to invalid IL or missing references)
			//IL_022f: 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)
			//IL_0253: Unknown result type (might be due to invalid IL or missing references)
			//IL_0258: Unknown result type (might be due to invalid IL or missing references)
			//IL_025a: Unknown result type (might be due to invalid IL or missing references)
			//IL_025f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0265: Unknown result type (might be due to invalid IL or missing references)
			//IL_0267: Unknown result type (might be due to invalid IL or missing references)
			//IL_026b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0275: Unknown result type (might be due to invalid IL or missing references)
			//IL_027c: 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_028b: 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_0299: 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_02c9: Expected O, but got Unknown
			//IL_020f: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f4: Unknown result type (might be due to invalid IL or missing references)
			GameObject val = CreatePanel(parent, name, borderColor, CyberPalette.ColorVoidBlack);
			val.GetComponent<RectTransform>().SetSizeDelta(new Vector2(size, size));
			LayoutElement obj = val.AddComponent<LayoutElement>();
			obj.minWidth = size;
			obj.preferredWidth = size;
			obj.flexibleWidth = 0f;
			obj.minHeight = size;
			obj.preferredHeight = size;
			obj.flexibleHeight = 0f;
			Transform val2 = val.transform.Find("Fill");
			Transform val3 = (((Object)(object)val2 != (Object)null) ? val2 : val.transform);
			GameObject val4 = new GameObject("Icon", new Type[2]
			{
				typeof(RectTransform),
				typeof(Image)
			});
			val4.transform.SetParent(val3, false);
			RectTransform component = val4.GetCom