using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; 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 System.Text; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using ChallengeCreator.Networking; using HarmonyLib; using Microsoft.CodeAnalysis; using Newtonsoft.Json; using Peak.Afflictions; using Photon.Pun; using TMPro; using UnityEngine; using UnityEngine.Events; using UnityEngine.Networking; using UnityEngine.SceneManagement; using UnityEngine.UI; using Zorro.Core; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: IgnoresAccessChecksTo("Assembly-CSharp")] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("com.atomic.challengecreator")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.0.4.0")] [assembly: AssemblyInformationalVersion("1.0.4+382f5d3d84be95d9fbde134d924483b4ac27d48b")] [assembly: AssemblyProduct("com.atomic.challengecreator")] [assembly: AssemblyTitle("ChallengeCreator")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.4.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; } } } namespace BepInEx { [AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)] [Conditional("CodeGeneration")] internal sealed class BepInAutoPluginAttribute : Attribute { public BepInAutoPluginAttribute(string? id = null, string? name = null, string? version = null) { } } } namespace BepInEx.Preloader.Core.Patching { [AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)] [Conditional("CodeGeneration")] internal sealed class PatcherAutoPluginAttribute : Attribute { public PatcherAutoPluginAttribute(string? id = null, string? name = null, string? version = null) { } } } namespace ChallengeCreator { public class ChallengeBrowser : MonoBehaviour { [Serializable] public class ChallengeEntry { public string id; public CurrentChallenge config; public string DisplayName => config?.Name ?? "Unnamed"; public string DisplayCreators => config?.Creators ?? "Unknown"; public string DisplayNotes => config?.Notes ?? ""; public string ShortId => id; } [Serializable] public class SupabaseResponse { public string id; public CurrentChallenge config; } [CompilerGenerated] private sealed class d__31 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public ChallengeBrowser <>4__this; private GameObject 5__2; private UnityWebRequest 5__3; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__31(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { int num = <>1__state; if (num == -3 || num == 1) { try { } finally { <>m__Finally1(); } } 5__2 = null; 5__3 = null; <>1__state = -2; } private bool MoveNext() { //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Invalid comparison between Unknown and I4 bool result; try { int num = <>1__state; ChallengeBrowser challengeBrowser = <>4__this; switch (num) { default: result = false; break; case 0: { <>1__state = -1; if ((Object)(object)challengeBrowser.contentContainer == (Object)null) { result = false; break; } challengeBrowser.ClearContentContainer(); 5__2 = challengeBrowser.CreateLoadingText(); string text = "https://dujpxiwctslbpcziquqr.supabase.co/rest/v1/challenges?select=id,config&limit=100"; 5__3 = UnityWebRequest.Get(text); <>1__state = -3; 5__3.SetRequestHeader("apikey", "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImR1anB4aXdjdHNsYnBjemlxdXFyIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzA1MzkzMjIsImV4cCI6MjA4NjExNTMyMn0.FKJ3Mei_i3psMBkWbrZ11HwMuNl2h6-wEFloYGRkOnw"); 5__3.SetRequestHeader("Authorization", "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImR1anB4aXdjdHNsYnBjemlxdXFyIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzA1MzkzMjIsImV4cCI6MjA4NjExNTMyMn0.FKJ3Mei_i3psMBkWbrZ11HwMuNl2h6-wEFloYGRkOnw"); <>2__current = 5__3.SendWebRequest(); <>1__state = 1; result = true; break; } case 1: <>1__state = -3; if ((Object)(object)5__2 != (Object)null) { Object.DestroyImmediate((Object)(object)5__2); } if ((int)5__3.result != 1) { challengeBrowser.ShowErrorMessage("Failed to load challenges: " + 5__3.error); result = false; <>m__Finally1(); break; } try { List list = JsonConvert.DeserializeObject>(5__3.downloadHandler.text); if (list != null) { challengeBrowser.allChallenges.Clear(); foreach (SupabaseResponse item in list) { if (item.config != null) { challengeBrowser.allChallenges.Add(new ChallengeEntry { id = item.id, config = item.config }); } } challengeBrowser.filteredChallenges = new List(challengeBrowser.allChallenges); challengeBrowser.RefreshChallengeList(); } } catch (Exception ex) { challengeBrowser.ShowErrorMessage("Error parsing challenge data: " + ex.Message); } <>m__Finally1(); 5__3 = null; result = false; break; } } catch { //try-fault ((IDisposable)this).Dispose(); throw; } return result; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } private void <>m__Finally1() { <>1__state = -1; if (5__3 != null) { ((IDisposable)5__3).Dispose(); } } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__20 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public ChallengeBrowser <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__20(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { int num = <>1__state; ChallengeBrowser challengeBrowser = <>4__this; switch (num) { default: return false; case 0: <>1__state = -1; <>2__current = null; <>1__state = 1; return true; case 1: <>1__state = -1; <>2__current = null; <>1__state = 2; return true; case 2: <>1__state = -1; <>2__current = null; <>1__state = 3; return true; case 3: <>1__state = -1; <>2__current = null; <>1__state = 4; return true; case 4: <>1__state = -1; if ((Object)(object)challengeBrowser.contentContainer == (Object)null) { if ((Object)(object)challengeBrowser.mainPanel != (Object)null) { Transform val = challengeBrowser.mainPanel.transform.Find("ContentArea/Viewport/Content"); if ((Object)(object)val != (Object)null) { challengeBrowser.contentContainer = val; } } if ((Object)(object)challengeBrowser.contentContainer == (Object)null) { return false; } } ((MonoBehaviour)challengeBrowser).StartCoroutine(challengeBrowser.FetchChallenges()); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__39 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public GameObject entryObj; public ChallengeBrowser <>4__this; public ChallengeEntry entry; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__39(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Expected O, but got Unknown //IL_014a: Unknown result type (might be due to invalid IL or missing references) //IL_0160: 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_018c: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: Expected O, but got Unknown //IL_01f2: Unknown result type (might be due to invalid IL or missing references) //IL_0208: Unknown result type (might be due to invalid IL or missing references) //IL_0214: Unknown result type (might be due to invalid IL or missing references) //IL_0220: 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_0263: Expected O, but got Unknown //IL_0282: Unknown result type (might be due to invalid IL or missing references) //IL_028e: Unknown result type (might be due to invalid IL or missing references) //IL_029a: Unknown result type (might be due to invalid IL or missing references) //IL_02a6: Unknown result type (might be due to invalid IL or missing references) //IL_02cf: Unknown result type (might be due to invalid IL or missing references) //IL_02ef: Unknown result type (might be due to invalid IL or missing references) //IL_02f6: Expected O, but got Unknown //IL_031f: Unknown result type (might be due to invalid IL or missing references) //IL_0335: Unknown result type (might be due to invalid IL or missing references) //IL_034b: Unknown result type (might be due to invalid IL or missing references) //IL_0357: Unknown result type (might be due to invalid IL or missing references) //IL_036d: Unknown result type (might be due to invalid IL or missing references) //IL_03ae: Unknown result type (might be due to invalid IL or missing references) //IL_03b8: Expected O, but got Unknown //IL_03e0: Unknown result type (might be due to invalid IL or missing references) //IL_03e7: Expected O, but got Unknown //IL_0410: Unknown result type (might be due to invalid IL or missing references) //IL_0426: Unknown result type (might be due to invalid IL or missing references) //IL_043c: Unknown result type (might be due to invalid IL or missing references) //IL_0448: Unknown result type (might be due to invalid IL or missing references) //IL_045e: Unknown result type (might be due to invalid IL or missing references) //IL_04bb: Unknown result type (might be due to invalid IL or missing references) int num = <>1__state; ChallengeBrowser challengeBrowser = <>4__this; switch (num) { default: return false; case 0: { <>1__state = -1; LayoutElement component = entryObj.GetComponent(); if ((Object)(object)challengeBrowser.currentExpandedEntry == (Object)(object)entryObj) { Transform val = entryObj.transform.Find("ExpandedContent"); if ((Object)(object)val != (Object)null) { Object.DestroyImmediate((Object)(object)((Component)val).gameObject); } component.preferredHeight = 130f; challengeBrowser.currentExpandedEntry = null; return false; } if ((Object)(object)challengeBrowser.currentExpandedEntry != (Object)null) { Transform val2 = challengeBrowser.currentExpandedEntry.transform.Find("StaticHeader/ButtonsArea/Button_Expand"); if ((Object)(object)val2 != (Object)null) { TextMeshProUGUI componentInChildren = ((Component)val2).GetComponentInChildren(); if ((Object)(object)componentInChildren != (Object)null) { ((TMP_Text)componentInChildren).text = "Expand"; } } Transform val3 = challengeBrowser.currentExpandedEntry.transform.Find("ExpandedContent"); if ((Object)(object)val3 != (Object)null) { Object.DestroyImmediate((Object)(object)((Component)val3).gameObject); } challengeBrowser.currentExpandedEntry.GetComponent().preferredHeight = 130f; } GameObject val4 = new GameObject("ExpandedContent"); val4.transform.SetParent(entryObj.transform, false); RectTransform val5 = val4.AddComponent(); val5.anchorMin = new Vector2(0f, 0f); val5.anchorMax = new Vector2(1f, 0f); val5.pivot = new Vector2(0.5f, 0f); val5.sizeDelta = new Vector2(0f, 350f); Image val6 = val4.AddComponent(); ((Graphic)val6).color = new Color(0f, 0f, 0f, 0.4f); GameObject val7 = new GameObject("ScrollView"); val7.transform.SetParent(val4.transform, false); RectTransform val8 = val7.AddComponent(); val8.anchorMin = new Vector2(0.02f, 0.02f); val8.anchorMax = new Vector2(0.98f, 0.98f); val8.offsetMin = Vector2.zero; val8.offsetMax = Vector2.zero; ScrollRect val9 = val7.AddComponent(); val9.horizontal = false; val9.vertical = true; val9.movementType = (MovementType)2; val9.scrollSensitivity = 20f; GameObject val10 = new GameObject("Viewport"); val10.transform.SetParent(val7.transform, false); RectTransform val11 = val10.AddComponent(); val11.anchorMin = Vector2.zero; val11.anchorMax = Vector2.one; val11.offsetMin = Vector2.zero; val11.offsetMax = Vector2.zero; Image val12 = val10.AddComponent(); ((Graphic)val12).color = new Color(0f, 0f, 0f, 0.25f); Mask val13 = val10.AddComponent(); val13.showMaskGraphic = false; GameObject val14 = new GameObject("Content"); val14.transform.SetParent(val10.transform, false); RectTransform val15 = val14.AddComponent(); val15.anchorMin = new Vector2(0f, 1f); val15.anchorMax = new Vector2(1f, 1f); val15.pivot = new Vector2(0.5f, 1f); val15.anchoredPosition = Vector2.zero; val15.sizeDelta = new Vector2(0f, 0f); VerticalLayoutGroup val16 = val14.AddComponent(); ((HorizontalOrVerticalLayoutGroup)val16).childForceExpandWidth = true; ((HorizontalOrVerticalLayoutGroup)val16).childControlWidth = true; ((HorizontalOrVerticalLayoutGroup)val16).childControlHeight = true; ((HorizontalOrVerticalLayoutGroup)val16).spacing = 0f; ((LayoutGroup)val16).padding = new RectOffset(10, 10, 10, 10); ContentSizeFitter val17 = val14.AddComponent(); val17.verticalFit = (FitMode)2; val9.viewport = val11; val9.content = val15; GameObject val18 = new GameObject("ConfigText"); val18.transform.SetParent(val14.transform, false); RectTransform val19 = val18.AddComponent(); val19.anchorMin = new Vector2(0f, 1f); val19.anchorMax = new Vector2(1f, 1f); val19.pivot = new Vector2(0.5f, 1f); val19.anchoredPosition = Vector2.zero; val19.sizeDelta = new Vector2(0f, 0f); TextMeshProUGUI val20 = val18.AddComponent(); ((TMP_Text)val20).text = JsonConvert.SerializeObject((object)entry.config, (Formatting)1); ((TMP_Text)val20).fontSize = 12f; ((TMP_Text)val20).alignment = (TextAlignmentOptions)257; ((TMP_Text)val20).fontStyle = (FontStyles)0; ((TMP_Text)val20).enableWordWrapping = true; ((TMP_Text)val20).overflowMode = (TextOverflowModes)0; ((Graphic)val20).color = Color.white; if ((Object)(object)UIUtils.gameFont != (Object)null) { ((TMP_Text)val20).font = UIUtils.gameFont; } LayoutElement val21 = val18.AddComponent(); val21.flexibleWidth = 1f; ContentSizeFitter val22 = val18.AddComponent(); val22.verticalFit = (FitMode)2; Canvas.ForceUpdateCanvases(); LayoutRebuilder.ForceRebuildLayoutImmediate(val15); component.preferredHeight = 480f; challengeBrowser.currentExpandedEntry = entryObj; <>2__current = null; <>1__state = 1; return true; } case 1: <>1__state = -1; return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } private const string SUPABASE_URL = "https://dujpxiwctslbpcziquqr.supabase.co/rest/v1/challenges"; private const string ANON_KEY = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImR1anB4aXdjdHNsYnBjemlxdXFyIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzA1MzkzMjIsImV4cCI6MjA4NjExNTMyMn0.FKJ3Mei_i3psMBkWbrZ11HwMuNl2h6-wEFloYGRkOnw"; private GameObject mainCanvas; private GameObject backgroundOverlay; private GameObject mainPanel; private GameObject contentArea; private TMP_InputField searchInput; private ScrollRect scrollRect; private Transform contentContainer; private Material cellMaterial; private bool isInitialized; private List allChallenges = new List(); private List filteredChallenges = new List(); private List entryObjects = new List(); private GameObject currentExpandedEntry; private MainMenu cachedMainMenu; private void Awake() { } public void Show(MainMenu mainMenu) { cachedMainMenu = mainMenu; if ((Object)(object)mainCanvas != (Object)null) { mainCanvas.SetActive(true); if (!isInitialized) { ((MonoBehaviour)this).StartCoroutine(FetchChallenges()); } } else { CreateUI(); ((MonoBehaviour)this).StartCoroutine(FetchChallengesDelayed()); } } [IteratorStateMachine(typeof(d__20))] private IEnumerator FetchChallengesDelayed() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__20(0) { <>4__this = this }; } public void Hide() { if ((Object)(object)mainCanvas != (Object)null) { mainCanvas.SetActive(false); } if ((Object)(object)cachedMainMenu != (Object)null) { Transform val = ((Component)cachedMainMenu).transform.Find("Canvas/MainPage"); if ((Object)(object)val != (Object)null) { ((Component)val).gameObject.SetActive(true); } } } private void CreateUI() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_006e: 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_009a: Expected O, but got Unknown //IL_00d7: 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_00fc: 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_0118: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Expected O, but got Unknown //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Unknown result type (might be due to invalid IL or missing references) mainCanvas = new GameObject("ChallengeBrowser"); mainCanvas.transform.SetParent(((Component)this).transform); Canvas val = mainCanvas.AddComponent(); CanvasScaler val2 = mainCanvas.AddComponent(); GraphicRaycaster val3 = mainCanvas.AddComponent(); val.renderMode = (RenderMode)0; val.sortingOrder = 200; val2.uiScaleMode = (ScaleMode)1; val2.referenceResolution = new Vector2(1920f, 1080f); val2.screenMatchMode = (ScreenMatchMode)0; val2.matchWidthOrHeight = 0.5f; backgroundOverlay = new GameObject("BackgroundOverlay"); backgroundOverlay.transform.SetParent(mainCanvas.transform, false); Image val4 = backgroundOverlay.AddComponent(); ((Graphic)val4).color = new Color(0f, 0f, 0f, 0.87f); RectTransform component = backgroundOverlay.GetComponent(); component.anchorMin = Vector2.zero; component.anchorMax = Vector2.one; component.sizeDelta = Vector2.zero; mainPanel = new GameObject("MainPanel"); mainPanel.transform.SetParent(mainCanvas.transform, false); RectTransform val5 = mainPanel.AddComponent(); val5.anchorMin = new Vector2(0.05f, 0.05f); val5.anchorMax = new Vector2(0.95f, 0.95f); val5.sizeDelta = Vector2.zero; Image val6 = mainPanel.AddComponent(); ((Graphic)val6).color = new Color(0.1792f, 0.1253f, 0.0905f, 0.7294f); LoadCellMaterial(); if ((Object)(object)cellMaterial != (Object)null) { ((Graphic)val6).material = cellMaterial; } CreateSearchBar(); CreateContentArea(); CreateBottomLink(); CreateCloseButton(); isInitialized = true; } private void LoadCellMaterial() { try { GameObject val = GameObject.Find("MainMenu/Canvas/SettingsPage"); if (!((Object)(object)val != (Object)null)) { return; } Transform val2 = val.transform.Find("SettingsPageShared/Content/Parent/SettingsCell(Clone)"); if ((Object)(object)val2 != (Object)null) { Image component = ((Component)val2).GetComponent(); if ((Object)(object)component != (Object)null && (Object)(object)((Graphic)component).material != (Object)null) { cellMaterial = Object.Instantiate(((Graphic)component).material); } } } catch (Exception) { } } private void CreateSearchBar() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Expected O, but got Unknown //IL_0034: 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_0054: Unknown result type (might be due to invalid IL or missing references) //IL_007a: 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_009b: Expected O, but got Unknown //IL_00b7: 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_00cf: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("SearchBar"); val.transform.SetParent(mainPanel.transform, false); RectTransform val2 = val.AddComponent(); val2.anchorMin = new Vector2(0.02f, 0.92f); val2.anchorMax = new Vector2(0.98f, 0.98f); val2.sizeDelta = Vector2.zero; Image val3 = val.AddComponent(); ((Graphic)val3).color = new Color(0.2f, 0.16f, 0.13f, 0.9f); searchInput = val.AddComponent(); GameObject val4 = new GameObject("TextArea"); val4.transform.SetParent(val.transform, false); RectTransform val5 = val4.AddComponent(); val5.anchorMin = Vector2.zero; val5.anchorMax = Vector2.one; val5.sizeDelta = Vector2.zero; searchInput.textComponent = (TMP_Text)(object)CreateInputText(val4.transform); searchInput.placeholder = (Graphic)(object)CreatePlaceholderText(val4.transform); ((UnityEvent)(object)searchInput.onValueChanged).AddListener((UnityAction)OnSearchChanged); } private TextMeshProUGUI CreateInputText(Transform parent) { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Expected O, but got Unknown //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0067: 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_0087: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("Text"); val.transform.SetParent(parent, false); TextMeshProUGUI val2 = val.AddComponent(); ((TMP_Text)val2).fontSize = 20f; ((Graphic)val2).color = Color.white; ((TMP_Text)val2).alignment = (TextAlignmentOptions)513; ((TMP_Text)val2).fontStyle = (FontStyles)0; if ((Object)(object)UIUtils.gameFont != (Object)null) { ((TMP_Text)val2).font = UIUtils.gameFont; } RectTransform component = val.GetComponent(); component.anchorMin = Vector2.zero; component.anchorMax = Vector2.one; component.offsetMin = new Vector2(15f, 5f); component.offsetMax = new Vector2(-15f, -5f); return val2; } private TextMeshProUGUI CreatePlaceholderText(Transform parent) { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Expected O, but got Unknown //IL_0045: 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) //IL_008c: 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_00b6: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("Placeholder"); val.transform.SetParent(parent, false); TextMeshProUGUI val2 = val.AddComponent(); ((TMP_Text)val2).text = "Search by name or shortcode..."; ((TMP_Text)val2).fontSize = 20f; ((Graphic)val2).color = new Color(0.7f, 0.7f, 0.7f); ((TMP_Text)val2).alignment = (TextAlignmentOptions)513; ((TMP_Text)val2).fontStyle = (FontStyles)0; if ((Object)(object)UIUtils.gameFont != (Object)null) { ((TMP_Text)val2).font = UIUtils.gameFont; } RectTransform component = val.GetComponent(); component.anchorMin = Vector2.zero; component.anchorMax = Vector2.one; component.offsetMin = new Vector2(15f, 5f); component.offsetMax = new Vector2(-15f, -5f); return val2; } private void CreateContentArea() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_0063: 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_00c9: Expected O, but got Unknown //IL_00e8: 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_00fe: 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_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Expected O, but got Unknown //IL_0187: 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_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_01d5: Unknown result type (might be due to invalid IL or missing references) //IL_01f2: Unknown result type (might be due to invalid IL or missing references) //IL_01fc: Expected O, but got Unknown contentArea = new GameObject("ContentArea"); contentArea.transform.SetParent(mainPanel.transform, false); RectTransform val = contentArea.AddComponent(); val.anchorMin = new Vector2(0.02f, 0.08f); val.anchorMax = new Vector2(0.98f, 0.9f); val.sizeDelta = Vector2.zero; scrollRect = contentArea.AddComponent(); scrollRect.horizontal = false; scrollRect.vertical = true; scrollRect.movementType = (MovementType)1; scrollRect.inertia = true; scrollRect.scrollSensitivity = 20f; GameObject val2 = new GameObject("Viewport"); val2.transform.SetParent(contentArea.transform, false); RectTransform val3 = val2.AddComponent(); val3.anchorMin = Vector2.zero; val3.anchorMax = Vector2.one; val3.sizeDelta = Vector2.zero; Mask val4 = val2.AddComponent(); val4.showMaskGraphic = false; Image val5 = val2.AddComponent(); ((Graphic)val5).color = new Color(0f, 0f, 0f, 0.3f); ((Graphic)val5).raycastTarget = false; GameObject val6 = new GameObject("Content"); val6.transform.SetParent(val2.transform, false); contentContainer = val6.transform; RectTransform val7 = val6.AddComponent(); val7.anchorMin = new Vector2(0f, 1f); val7.anchorMax = new Vector2(1f, 1f); val7.pivot = new Vector2(0.5f, 1f); val7.anchoredPosition = Vector2.zero; val7.sizeDelta = new Vector2(0f, 0f); VerticalLayoutGroup val8 = val6.AddComponent(); ((LayoutGroup)val8).padding = new RectOffset(20, 20, 20, 20); ((HorizontalOrVerticalLayoutGroup)val8).spacing = 15f; ((LayoutGroup)val8).childAlignment = (TextAnchor)1; ((HorizontalOrVerticalLayoutGroup)val8).childControlHeight = true; ((HorizontalOrVerticalLayoutGroup)val8).childControlWidth = true; ((HorizontalOrVerticalLayoutGroup)val8).childForceExpandWidth = true; ((HorizontalOrVerticalLayoutGroup)val8).childForceExpandHeight = false; ContentSizeFitter val9 = val6.AddComponent(); val9.verticalFit = (FitMode)2; val9.horizontalFit = (FitMode)0; scrollRect.viewport = val3; scrollRect.content = val7; } private void CreateBottomLink() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Expected O, but got Unknown //IL_0034: 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_0054: 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_008a: Expected O, but got Unknown //IL_00c9: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("BottomLink"); val.transform.SetParent(mainPanel.transform, false); RectTransform val2 = val.AddComponent(); val2.anchorMin = new Vector2(0.02f, 0.01f); val2.anchorMax = new Vector2(0.98f, 0.07f); val2.sizeDelta = Vector2.zero; HorizontalLayoutGroup val3 = val.AddComponent(); ((LayoutGroup)val3).childAlignment = (TextAnchor)4; ((HorizontalOrVerticalLayoutGroup)val3).spacing = 8f; ((LayoutGroup)val3).padding = new RectOffset(10, 10, 10, 10); ((HorizontalOrVerticalLayoutGroup)val3).childForceExpandWidth = false; ((HorizontalOrVerticalLayoutGroup)val3).childForceExpandHeight = true; TextMeshProUGUI val4 = CreateText("Want to know how to upload challenges? Go to:", 14, (FontStyles)0); ((TMP_Text)val4).transform.SetParent(val.transform, false); ((Graphic)val4).color = new Color(0.8f, 0.8f, 0.8f); LayoutElement val5 = ((Component)val4).gameObject.AddComponent(); val5.minWidth = 300f; GameObject val6 = CreateLinkButton("atomictyler.dev/#peakPresets"); val6.transform.SetParent(val.transform, false); LayoutElement val7 = val6.AddComponent(); val7.minWidth = 200f; } private GameObject CreateLinkButton(string url) { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Expected O, but got Unknown //IL_003b: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("LinkButton"); TextMeshProUGUI val2 = val.AddComponent(); ((TMP_Text)val2).text = url; ((TMP_Text)val2).fontSize = 14f; ((TMP_Text)val2).fontStyle = (FontStyles)0; ((Graphic)val2).color = new Color(0.4f, 0.8f, 1f); ((TMP_Text)val2).textWrappingMode = (TextWrappingModes)1; if ((Object)(object)UIUtils.gameFont != (Object)null) { ((TMP_Text)val2).font = UIUtils.gameFont; } return val; } private GameObject CreateCloseButton() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Expected O, but got Unknown //IL_0034: 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_005e: 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_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Expected O, but got Unknown //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Expected O, but got Unknown //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("CloseButton"); val.transform.SetParent(mainPanel.transform, false); RectTransform val2 = val.AddComponent(); val2.anchorMin = new Vector2(0.98f, 0.98f); val2.anchorMax = new Vector2(0.99f, 0.99f); val2.sizeDelta = new Vector2(40f, 40f); Image val3 = val.AddComponent(); ((Graphic)val3).color = new Color(0.4f, 0.3f, 0.25f); Button val4 = val.AddComponent