using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Globalization; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using HarmonyLib; using Microsoft.CodeAnalysis; using SkillsPreview.App.Data; using SkillsPreview.App.Locale; using SkillsPreview.App.Logging; using SkillsPreview.App.Store; using SkillsPreview.App.UI.CharacterStatsPanel; using SkillsPreview.App.UI.FavoriteSkillsHud; using SkillsPreview.App.UI.LevelUpToast; using SkillsPreview.App.UI.SettingsPanel; using TMPro; using UnityEngine; using UnityEngine.Events; using UnityEngine.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] [assembly: AssemblyCompany("SkillsPreview")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("0.5.2.0")] [assembly: AssemblyInformationalVersion("0.5.2+567001adb8542b5d7ba2b0a1ba05ef5ad0025561")] [assembly: AssemblyProduct("SkillsPreview")] [assembly: AssemblyTitle("SkillsPreview")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("0.5.2.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.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] [Microsoft.CodeAnalysis.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; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } internal static class IsExternalInit { } } namespace SkillsPreview.App { [BepInPlugin("godzki.skills_preview", "Skills Preview", "0.5.2")] public class Plugin : BaseUnityPlugin { internal static Plugin Instance; internal static ManualLogSource Log; private readonly Harmony _harmony = new Harmony("godzki.skills_preview"); internal static void SaveConfig() { ((BaseUnityPlugin)Instance).Config.Save(); FavoriteSkillsStore.NotifyConfigChanged(); } private void Awake() { Instance = this; Log = ((BaseUnityPlugin)this).Logger; Config.Bind((BaseUnityPlugin)(object)this); _harmony.PatchAll(); Log.LogInfo((object)"Skills Preview 0.5.2 loaded."); } private void OnDestroy() { _harmony.UnpatchSelf(); } } } namespace SkillsPreview.App.UI { internal static class SpriteUtils { private static readonly Dictionary RoundedRectCache = new Dictionary(); private static readonly Dictionary<(int, int), Sprite> RoundedRectFrameCache = new Dictionary<(int, int), Sprite>(); internal static Sprite RoundedRect(int radius) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Expected O, but got Unknown //IL_00a6: 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_00c1: 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) //IL_005f: Unknown result type (might be due to invalid IL or missing references) if (RoundedRectCache.TryGetValue(radius, out Sprite value) && (Object)(object)value != (Object)null) { return value; } int num = radius * 2 + 2; Texture2D val = new Texture2D(num, num, (TextureFormat)5, false); ((Texture)val).filterMode = (FilterMode)1; ((Texture)val).wrapMode = (TextureWrapMode)1; Color32[] array = (Color32[])(object)new Color32[num * num]; for (int i = 0; i < num; i++) { for (int j = 0; j < num; j++) { array[i * num + j] = SampleRoundedRectPixel(j, i, num, num, radius); } } val.SetPixels32(array); val.Apply(false); Vector4 val2 = default(Vector4); ((Vector4)(ref val2))..ctor((float)radius, (float)radius, (float)radius, (float)radius); Sprite val3 = Sprite.Create(val, new Rect(0f, 0f, (float)num, (float)num), new Vector2(0.5f, 0.5f), 100f, 0u, (SpriteMeshType)0, val2); RoundedRectCache[radius] = val3; return val3; } internal static Sprite ResetIcon(int size = 24) { //IL_0004: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Expected O, but got Unknown //IL_002d: 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) //IL_0241: Unknown result type (might be due to invalid IL or missing references) //IL_0243: 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_0247: Unknown result type (might be due to invalid IL or missing references) //IL_026a: 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_0163: Unknown result type (might be due to invalid IL or missing references) //IL_0169: 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_0177: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) Texture2D val = new Texture2D(size, size, (TextureFormat)5, false); ((Texture)val).filterMode = (FilterMode)1; ((Texture)val).wrapMode = (TextureWrapMode)1; Color32[] array = (Color32[])(object)new Color32[size * size]; for (int i = 0; i < array.Length; i++) { array[i] = new Color32((byte)0, (byte)0, (byte)0, (byte)0); } Color32 val2 = default(Color32); ((Color32)(ref val2))..ctor((byte)160, (byte)115, (byte)55, byte.MaxValue); float num = (float)(size - 1) * 0.5f; float num2 = (float)(size - 1) * 0.5f; float num3 = (float)size * 0.44f; float num4 = (float)size * 0.27f; float num5 = (num3 + num4) * 0.5f; float num6 = (num3 - num4) * 0.5f; for (int j = 0; j < size; j++) { for (int k = 0; k < size; k++) { float num7 = (float)k - num; float num8 = (float)j - num2; float num9 = Mathf.Sqrt(num7 * num7 + num8 * num8); if (!(num9 < num4 - 1f) && !(num9 > num3 + 1f)) { float num10 = Mathf.Atan2(num8, num7) * 57.29578f; if (num10 < 0f) { num10 += 360f; } if (!(num10 >= 60f) || !(num10 <= 105f)) { float num11 = Mathf.Min(num9 - num4, num3 - num9); byte b = (byte)((num11 >= 1f) ? byte.MaxValue : ((num11 > 0f) ? ((byte)(255f * num11)) : 0)); array[j * size + k] = new Color32(val2.r, val2.g, val2.b, b); } } } } float num12 = (float)Math.PI / 3f; float num13 = num + num5 * Mathf.Cos(num12); float num14 = num2 + num5 * Mathf.Sin(num12); float num15 = Mathf.Sin(num12); float num16 = 0f - Mathf.Cos(num12); float num17 = Mathf.Cos(num12); float num18 = Mathf.Sin(num12); float num19 = num6 * 2.8f; float num20 = num6 * 1.5f; Vector2 a = default(Vector2); ((Vector2)(ref a))..ctor(num13 + num15 * num19, num14 + num16 * num19); Vector2 b2 = default(Vector2); ((Vector2)(ref b2))..ctor(num13 + num17 * num20, num14 + num18 * num20); Vector2 c = default(Vector2); ((Vector2)(ref c))..ctor(num13 - num17 * num20, num14 - num18 * num20); FillTriangle(array, size, a, b2, c, val2); val.SetPixels32(array); val.Apply(false); return Sprite.Create(val, new Rect(0f, 0f, (float)size, (float)size), new Vector2(0.5f, 0.5f), 100f); } private static void FillTriangle(Color32[] pixels, int size, Vector2 a, Vector2 b, Vector2 c, Color32 color) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_002c: 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) //IL_0038: 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_005b: 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_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: 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_00ba: 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_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) int num = Mathf.Max(0, Mathf.FloorToInt(Mathf.Min(a.x, Mathf.Min(b.x, c.x)))); int num2 = Mathf.Min(size - 1, Mathf.CeilToInt(Mathf.Max(a.x, Mathf.Max(b.x, c.x)))); int num3 = Mathf.Max(0, Mathf.FloorToInt(Mathf.Min(a.y, Mathf.Min(b.y, c.y)))); int num4 = Mathf.Min(size - 1, Mathf.CeilToInt(Mathf.Max(a.y, Mathf.Max(b.y, c.y)))); for (int i = num3; i <= num4; i++) { for (int j = num; j <= num2; j++) { if (PointInTriangle(new Vector2((float)j, (float)i), a, b, c)) { pixels[i * size + j] = color; } } } } private static bool PointInTriangle(Vector2 p, Vector2 a, Vector2 b, Vector2 c) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //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_0007: 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_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_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_001c: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: 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_0031: Unknown result type (might be due to invalid IL or missing references) float num = Cross(p - a, b - a); float num2 = Cross(p - b, c - b); float num3 = Cross(p - c, a - c); if (!(num >= 0f) || !(num2 >= 0f) || !(num3 >= 0f)) { if (num <= 0f && num2 <= 0f) { return num3 <= 0f; } return false; } return true; } private static float Cross(Vector2 v1, Vector2 v2) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) return v1.x * v2.y - v1.y * v2.x; } internal static Sprite RoundedRectFrame(int radius, int frameWidth) { //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Expected O, but got Unknown //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_0155: 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_0080: 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_00f5: 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) (int, int) key = (radius, frameWidth); if (RoundedRectFrameCache.TryGetValue(key, out Sprite value) && (Object)(object)value != (Object)null) { return value; } int num = Mathf.Max(radius * 2 + 2, frameWidth * 2 + 3); int r = Mathf.Max(0, radius - frameWidth); int num2 = num - frameWidth * 2; Texture2D val = new Texture2D(num, num, (TextureFormat)5, false); ((Texture)val).filterMode = (FilterMode)1; ((Texture)val).wrapMode = (TextureWrapMode)1; Color32[] array = (Color32[])(object)new Color32[num * num]; for (int i = 0; i < num; i++) { for (int j = 0; j < num; j++) { byte a = SampleRoundedRectPixel(j, i, num, num, radius).a; int num3 = j - frameWidth; int num4 = i - frameWidth; byte b = (byte)((num3 >= 0 && num4 >= 0 && num3 < num2 && num4 < num2) ? SampleRoundedRectPixel(num3, num4, num2, num2, r).a : 0); array[i * num + j] = new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, (byte)(a * (255 - b) / 255)); } } val.SetPixels32(array); val.Apply(false); Vector4 val2 = default(Vector4); ((Vector4)(ref val2))..ctor((float)radius, (float)radius, (float)radius, (float)radius); Sprite val3 = Sprite.Create(val, new Rect(0f, 0f, (float)num, (float)num), new Vector2(0.5f, 0.5f), 100f, 0u, (SpriteMeshType)0, val2); RoundedRectFrameCache[key] = val3; return val3; } private static Color32 SampleRoundedRectPixel(int x, int y, int w, int h, int r) { //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) float num = Mathf.Clamp(x, r, w - r - 1); float num2 = Mathf.Clamp(y, r, h - r - 1); float num3 = Mathf.Sqrt(((float)x - num) * ((float)x - num) + ((float)y - num2) * ((float)y - num2)); if (num3 <= (float)r - 1f) { return new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue); } if (num3 >= (float)r + 0.5f) { return new Color32((byte)0, (byte)0, (byte)0, (byte)0); } byte b = (byte)(255f * Mathf.Clamp01((float)r + 0.5f - num3)); return new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, b); } } } namespace SkillsPreview.App.UI.SettingsPanel { internal class SettingsPanel { private static Log.Scoped Logger { get; } = Log.For("SettingsPanel"); public GameObject Root { get; private set; } internal bool IsAlive => (Object)(object)Root != (Object)null; internal bool IsVisible { get { if ((Object)(object)Root != (Object)null) { return Root.activeSelf; } return false; } } private SettingsPanel(GameObject root) { Root = root; } internal void Show() { if ((Object)(object)Root != (Object)null) { Root.SetActive(true); } } internal void Hide() { if ((Object)(object)Root != (Object)null) { Root.SetActive(false); } } internal static SettingsPanel Create(Transform skillsFrame) { Font builtinResource = Resources.GetBuiltinResource("Arial.ttf"); GameObject val = SettingsPanelLayout.BuildRoot(skillsFrame); SettingsPanelLayout.BuildBackground(val, skillsFrame); ILabels current = L.Current; Transform content = SettingsPanelLayout.AddScrollView(val.transform); List resets = new List(); List refreshes = new List(); SettingsPanelLayout.AddTitle(val.transform, skillsFrame, current.SectionSkillsPanel); SettingsPanelRows.Populate(content, builtinResource, resets, refreshes, skillsFrame, current); SettingsPanelLayout.AddResetAllButton(val.transform, current.ResetAll, resets, skillsFrame); SettingsPanelLayout.AddCloseButton(val.transform, val, skillsFrame); Logger.Debug("Settings panel created."); return new SettingsPanel(val); } } internal static class SettingsPanelLayout { private const float PanelWidth = 500f; private const float PanelHeight = 620f; private const int SectionFontSize = 12; private static readonly Color PanelBgColor = new Color(0.08f, 0.06f, 0.04f, 0.97f); private static readonly Color SectionColor = new Color(0.65f, 0.52f, 0.28f); internal static GameObject BuildRoot(Transform skillsFrame) { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Expected O, but got Unknown GameObject val = new GameObject("godzki_SettingsPanel", new Type[1] { typeof(RectTransform) }); val.SetActive(false); val.transform.SetParent(skillsFrame, false); val.transform.SetAsLastSibling(); RectTransform component = val.GetComponent(); component.anchorMin = new Vector2(0.5f, 0.5f); component.anchorMax = new Vector2(0.5f, 0.5f); component.pivot = new Vector2(0.5f, 0.5f); component.sizeDelta = new Vector2(500f, 620f); component.anchoredPosition = Vector2.zero; return val; } internal static void BuildBackground(GameObject root, Transform skillsFrame) { //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) //IL_00b5: 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_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0059: 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_005f: 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) Transform obj = skillsFrame.Find("bkg"); Image val = ((obj != null) ? ((Component)obj).GetComponent() : null); if ((Object)(object)val != (Object)null) { GameObject obj2 = Object.Instantiate(((Component)val).gameObject, root.transform); ((Object)obj2).name = "bkg"; RectTransform component = obj2.GetComponent(); component.anchorMin = Vector2.zero; component.anchorMax = Vector2.one; Vector2 offsetMin = (component.offsetMax = Vector2.zero); component.offsetMin = offsetMin; } else { GameObject val2 = new GameObject("bkg", new Type[3] { typeof(RectTransform), typeof(CanvasRenderer), typeof(Image) }); val2.transform.SetParent(root.transform, false); SettingsPanelWidgets.Stretch(val2.GetComponent()); ((Graphic)val2.GetComponent()).color = PanelBgColor; } } internal static void AddTitle(Transform parent, Transform skillsFrame, string label) { //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) Transform obj = skillsFrame.Find("topic"); if ((Object)(object)obj == (Object)null) { throw new InvalidOperationException("topic not found in SkillsFrame"); } GameObject obj2 = Object.Instantiate(((Component)obj).gameObject, parent); ((Object)obj2).name = "Topic"; RectTransform component = obj2.GetComponent(); component.anchorMin = new Vector2(0.5f, 1f); component.anchorMax = new Vector2(0.5f, 1f); component.pivot = new Vector2(0.5f, 1f); component.anchoredPosition = new Vector2(0f, -10f); obj2.GetComponentInChildren().text = label; } internal static Transform AddScrollView(Transform parent) { //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Expected O, but got Unknown //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_005f: 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_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Expected O, but got Unknown //IL_00fb: 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_0148: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_016c: 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_0196: Unknown result type (might be due to invalid IL or missing references) //IL_01a1: Unknown result type (might be due to invalid IL or missing references) //IL_01ac: Unknown result type (might be due to invalid IL or missing references) //IL_01b6: Unknown result type (might be due to invalid IL or missing references) //IL_01d0: Unknown result type (might be due to invalid IL or missing references) //IL_01da: Expected O, but got Unknown //IL_01e7: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("ScrollView", new Type[2] { typeof(RectTransform), typeof(ScrollRect) }); val.transform.SetParent(parent, false); RectTransform component = val.GetComponent(); component.anchorMin = Vector2.zero; component.anchorMax = Vector2.one; component.offsetMin = new Vector2(8f, 90f); component.offsetMax = new Vector2(-8f, -62f); GameObject val2 = new GameObject("Viewport", new Type[4] { typeof(RectTransform), typeof(CanvasRenderer), typeof(Image), typeof(Mask) }); val2.transform.SetParent(val.transform, false); RectTransform component2 = val2.GetComponent(); SettingsPanelWidgets.Stretch(component2); ((Graphic)val2.GetComponent()).color = new Color(0f, 0f, 0f, 0.01f); val2.GetComponent().showMaskGraphic = false; GameObject val3 = new GameObject("Content", new Type[3] { typeof(RectTransform), typeof(VerticalLayoutGroup), typeof(ContentSizeFitter) }); val3.transform.SetParent(val2.transform, false); RectTransform component3 = val3.GetComponent(); component3.anchorMin = new Vector2(0f, 1f); component3.anchorMax = new Vector2(1f, 1f); component3.pivot = new Vector2(0.5f, 1f); component3.anchoredPosition = Vector2.zero; component3.sizeDelta = Vector2.zero; VerticalLayoutGroup component4 = val3.GetComponent(); ((HorizontalOrVerticalLayoutGroup)component4).spacing = 2f; ((LayoutGroup)component4).padding = new RectOffset(24, 24, 24, 24); ((HorizontalOrVerticalLayoutGroup)component4).childForceExpandWidth = true; ((HorizontalOrVerticalLayoutGroup)component4).childForceExpandHeight = false; val3.GetComponent().verticalFit = (FitMode)2; ScrollRect component5 = val.GetComponent(); component5.content = component3; component5.viewport = component2; component5.horizontal = false; component5.vertical = true; component5.scrollSensitivity = 30f; component5.movementType = (MovementType)2; component5.inertia = false; return val3.transform; } internal static void AddSection(Transform parent, Font font, string label) { //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_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) GameObject val = new GameObject("Section_" + label, new Type[4] { typeof(RectTransform), typeof(CanvasRenderer), typeof(Text), typeof(LayoutElement) }); val.transform.SetParent(parent, false); LayoutElement component = val.GetComponent(); float preferredHeight = (component.minHeight = 22f); component.preferredHeight = preferredHeight; Text component2 = val.GetComponent(); component2.font = font; component2.fontSize = 12; component2.fontStyle = (FontStyle)1; component2.alignment = (TextAnchor)6; ((Graphic)component2).color = SectionColor; component2.text = "— " + label; ((Graphic)component2).raycastTarget = false; } internal static void AddResetAllButton(Transform parent, string label, List resets, Transform skillsFrame) { //IL_0053: 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_007d: 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_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Expected O, but got Unknown //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Expected O, but got Unknown List resets2 = resets; Transform obj = skillsFrame.Find("Closebutton"); if ((Object)(object)obj == (Object)null) { throw new InvalidOperationException("Closebutton not found in SkillsFrame"); } GameObject obj2 = Object.Instantiate(((Component)obj).gameObject, parent); ((Object)obj2).name = "ResetBtn"; RectTransform component = obj2.GetComponent(); component.anchorMin = new Vector2(0f, 0f); component.anchorMax = new Vector2(0f, 0f); component.pivot = new Vector2(0f, 0f); component.sizeDelta = new Vector2(130f, 40f); component.anchoredPosition = new Vector2(15f, 30f); obj2.GetComponentInChildren().text = label; Button component2 = obj2.GetComponent