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.Security; using System.Security.Permissions; using System.Text; using System.Text.RegularExpressions; using Archipelago.MultiClient.Net; using Archipelago.MultiClient.Net.Colors; using Archipelago.MultiClient.Net.Converters; using Archipelago.MultiClient.Net.Enums; using Archipelago.MultiClient.Net.Helpers; using Archipelago.MultiClient.Net.MessageLog.Messages; using Archipelago.MultiClient.Net.MessageLog.Parts; using Archipelago.MultiClient.Net.Models; using Archipelago.MultiClient.Net.Packets; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using HarmonyLib; using Microsoft.CodeAnalysis; using Newtonsoft.Json.Linq; using Pikuniku.Achievements; using Pikuniku.Drawing; using Pikuniku.Persistence; using Rewired; using TMPro; using UnityEngine; using UnityEngine.EventSystems; using UnityEngine.Events; using UnityEngine.SceneManagement; using UnityEngine.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: IgnoresAccessChecksTo("Assembly-CSharp")] [assembly: AssemblyCompany("PikunikuAPMod")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+769ef2132f199e35f20c8a16e601f4740d45f8b9")] [assembly: AssemblyProduct("PikunikuAPMod")] [assembly: AssemblyTitle("PikunikuAPMod")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Embedded] internal sealed class IsReadOnlyAttribute : Attribute { } [CompilerGenerated] [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 PikunikuAPMod { public class APConnectionPanel : UI_MenuPanel { private class NavVisual { public Selectable Selectable; public RectTransform Rect; public Image Background; public Outline Outline; public Shadow Shadow; public Vector2 CurrentOffset = Vector2.zero; public Vector2 CurrentShadowDist = Vector2.zero; public float CurrentShadowAlpha; } internal UI_MenuPanel_Aventure AventurePanel; private TMP_InputField _hostnameField; private TMP_InputField _portField; private TMP_InputField _slotField; private TMP_InputField _passwordField; private TextMeshProUGUI _statusText; private TMP_FontAsset _gameFont; private Sprite _bgSprite; private NavVisual[] _nav; private int _navIndex; private static readonly Color NormalBg = Color.white; private static readonly Color NormalOutline = Color.black; private static readonly Vector2 NormalOutlineDist = new Vector2(4f, -4f); private static readonly Color SolidShadowColor = new Color(0f, 0f, 0f, 1f); private static readonly Vector2 SolidShadowDist = new Vector2(8f, -8f); private static readonly Vector2 SelectedOffset = new Vector2(-4f, 4f); public static APConnectionPanel Instance { get; private set; } public static APConnectionPanel CreateFor(UI_PauseMenu pauseMenu, UI_MenuPanel_Aventure aventurePanel) { //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Expected O, but got Unknown //IL_0062: 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_0093: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: 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_00ef: 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_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_0189: Unknown result type (might be due to invalid IL or missing references) //IL_018f: Invalid comparison between Unknown and I4 //IL_0080: 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_0193: Unknown result type (might be due to invalid IL or missing references) //IL_0199: Invalid comparison between Unknown and I4 //IL_0292: Unknown result type (might be due to invalid IL or missing references) //IL_029c: Expected O, but got Unknown //IL_02a2: Unknown result type (might be due to invalid IL or missing references) //IL_02ac: Expected O, but got Unknown //IL_02b2: Unknown result type (might be due to invalid IL or missing references) //IL_02bc: Expected O, but got Unknown //IL_02c2: Unknown result type (might be due to invalid IL or missing references) //IL_02cc: Expected O, but got Unknown //IL_02de: Unknown result type (might be due to invalid IL or missing references) //IL_02e8: Expected O, but got Unknown //IL_02fa: Unknown result type (might be due to invalid IL or missing references) //IL_0304: Expected O, but got Unknown //IL_01d1: Unknown result type (might be due to invalid IL or missing references) //IL_01de: Unknown result type (might be due to invalid IL or missing references) //IL_01eb: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)Instance != (Object)null) { return Instance; } Transform parent = ((Transform)((UI_MenuPanel)aventurePanel).selfRect).parent; GameObject val = new GameObject("APConnectionPanel"); RectTransform val2 = val.AddComponent(); ((Transform)val2).SetParent(parent, false); RectTransform selfRect = ((UI_MenuPanel)aventurePanel).selfRect; RectTransform component = ((Component)parent).GetComponent(); float num; if ((Object)(object)component != (Object)null) { Rect rect = component.rect; if (((Rect)(ref rect)).height > 1f) { rect = component.rect; num = ((Rect)(ref rect)).height; goto IL_008e; } } num = 720f; goto IL_008e; IL_008e: float num2 = num; val2.anchorMin = new Vector2(selfRect.anchorMin.x, 0.5f); val2.anchorMax = new Vector2(selfRect.anchorMax.x, 0.5f); val2.pivot = selfRect.pivot; val2.sizeDelta = new Vector2(selfRect.sizeDelta.x, num2); val2.anchoredPosition = Vector2.zero; ((Transform)val2).localScale = ((Transform)selfRect).localScale; ((Transform)val2).localPosition = ((Transform)selfRect).localPosition; ((Transform)val2).localRotation = ((Transform)selfRect).localRotation; val.layer = ((Component)aventurePanel).gameObject.layer; Canvas selfCanvas = ((UI_MenuPanel)aventurePanel).selfCanvas; Canvas val3 = val.AddComponent(); val3.renderMode = selfCanvas.renderMode; val3.sortingOrder = selfCanvas.sortingOrder; val3.sortingLayerID = selfCanvas.sortingLayerID; val3.overrideSorting = selfCanvas.overrideSorting; val3.pixelPerfect = selfCanvas.pixelPerfect; if ((int)selfCanvas.renderMode == 1 || (int)selfCanvas.renderMode == 2) { val3.worldCamera = selfCanvas.worldCamera; } ((Behaviour)val3).enabled = false; CanvasScaler component2 = ((Component)((UI_MenuPanel)aventurePanel).selfCanvas).GetComponent(); if ((Object)(object)component2 != (Object)null) { CanvasScaler obj = val.AddComponent(); obj.uiScaleMode = component2.uiScaleMode; obj.referenceResolution = component2.referenceResolution; obj.screenMatchMode = component2.screenMatchMode; obj.matchWidthOrHeight = component2.matchWidthOrHeight; obj.referencePixelsPerUnit = component2.referencePixelsPerUnit; } val.AddComponent(); CanvasGroup val4 = val.AddComponent(); val4.interactable = false; APConnectionPanel panel = val.AddComponent(); ((UI_MenuPanel)panel).manager = pauseMenu; ((UI_MenuPanel)panel).selfRect = val2; ((UI_MenuPanel)panel).selfCanvas = val3; ((UI_MenuPanel)panel).canvasGroup = val4; ((UI_MenuPanel)panel).FullGameObject = val; ((UI_MenuPanel)panel).allowBackButton = true; panel.AventurePanel = aventurePanel; ((UI_MenuPanel)panel).OnBackButton = new UnityEvent(); ((UI_MenuPanel)panel).OnPreEnableEvent = new UnityEvent(); ((UI_MenuPanel)panel).OnEnableEvent = new UnityEvent(); ((UI_MenuPanel)panel).OnDisableEvent = new UnityEvent(); ((UI_MenuPanel)panel).OnBackButton.AddListener((UnityAction)delegate { pauseMenu.SwitchToPanelFromBack((UI_MenuPanel)(object)panel); }); ((UI_MenuPanel)panel).OnPreEnableEvent.AddListener((UnityAction)delegate { if ((Object)(object)panel._statusText != (Object)null) { ((TMP_Text)panel._statusText).text = string.Empty; } }); panel.GrabGameStyle(aventurePanel); panel.BuildUI(); ArchipelagoHandler archipelagoHandler = PikunikuAPMod.ArchipelagoHandler; if ((Object)(object)archipelagoHandler != (Object)null) { archipelagoHandler.OnConnected += panel.OnConnected; archipelagoHandler.OnConnectionFailed += panel.OnConnectionFailed; } Instance = panel; Log.Info("APConnectionPanel created as sibling of adventure panel."); return panel; } private void OnDestroy() { ArchipelagoHandler archipelagoHandler = PikunikuAPMod.ArchipelagoHandler; if ((Object)(object)archipelagoHandler != (Object)null) { archipelagoHandler.OnConnected -= OnConnected; archipelagoHandler.OnConnectionFailed -= OnConnectionFailed; } Instance = null; } public override void CustomPanelUpdate() { UpdateAnimation(); if (_nav == null || _nav.Length == 0) { return; } SyncIndexFromEventSystem(); bool flag = Input.GetKeyDown((KeyCode)274) || RewiredNavDown(); bool flag2 = Input.GetKeyDown((KeyCode)273) || RewiredNavUp(); if (Input.GetKeyDown((KeyCode)9)) { if (Input.GetKey((KeyCode)304) || Input.GetKey((KeyCode)303)) { flag2 = true; } else { flag = true; } } if (flag) { Move(1); } else if (flag2) { Move(-1); } ApplyHighlight(); } private void Move(int delta) { int num = _nav.Length; int num2 = _navIndex; for (int i = 0; i < num; i++) { num2 = (num2 + delta + num) % num; if ((Object)(object)_nav[num2]?.Selectable != (Object)null && _nav[num2].Selectable.IsInteractable()) { break; } } SelectIndex(num2); } private void SelectIndex(int i) { if (_nav == null || i < 0 || i >= _nav.Length) { return; } NavVisual[] nav = _nav; for (int j = 0; j < nav.Length; j++) { Selectable obj = nav[j]?.Selectable; TMP_InputField val = (TMP_InputField)(object)((obj is TMP_InputField) ? obj : null); if (val != null && val.isFocused) { val.DeactivateInputField(); } } _navIndex = i; Selectable selectable = _nav[i].Selectable; if ((Object)(object)EventSystem.current != (Object)null) { EventSystem.current.SetSelectedGameObject(((Component)selectable).gameObject); } TMP_InputField val2 = (TMP_InputField)(object)((selectable is TMP_InputField) ? selectable : null); if (val2 != null) { val2.ActivateInputField(); val2.MoveTextEnd(false); } ApplyHighlight(); } private void SyncIndexFromEventSystem() { GameObject val = (((Object)(object)EventSystem.current != (Object)null) ? EventSystem.current.currentSelectedGameObject : null); if ((Object)(object)val == (Object)null) { return; } for (int i = 0; i < _nav.Length; i++) { if ((Object)(object)_nav[i]?.Selectable != (Object)null && (Object)(object)((Component)_nav[i].Selectable).gameObject == (Object)(object)val) { _navIndex = i; break; } } } private void ApplyHighlight() { } private void UpdateAnimation() { //IL_004f: 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_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0060: 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_0065: 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_0080: 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_008a: 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_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: 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_0180: 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_0128: 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_014f: 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) if (_nav == null) { return; } float unscaledDeltaTime = Time.unscaledDeltaTime; float num = 60f; float num2 = 120f; float num3 = 10f; for (int i = 0; i < _nav.Length; i++) { NavVisual navVisual = _nav[i]; if (navVisual == null) { continue; } bool num4 = i == _navIndex; Vector2 val = (num4 ? SelectedOffset : Vector2.zero); Vector2 val2 = (num4 ? SolidShadowDist : Vector2.zero); float num5 = (num4 ? 1f : 0f); navVisual.CurrentOffset = Vector2.MoveTowards(navVisual.CurrentOffset, val, unscaledDeltaTime * num); navVisual.CurrentShadowDist = Vector2.MoveTowards(navVisual.CurrentShadowDist, val2, unscaledDeltaTime * num2); navVisual.CurrentShadowAlpha = Mathf.MoveTowards(navVisual.CurrentShadowAlpha, num5, unscaledDeltaTime * num3); if ((Object)(object)navVisual.Rect != (Object)null) { navVisual.Rect.anchoredPosition = navVisual.CurrentOffset; ((Transform)navVisual.Rect).localScale = Vector3.one; } if ((Object)(object)navVisual.Shadow != (Object)null) { bool flag = navVisual.CurrentShadowAlpha > 0.01f; ((Behaviour)navVisual.Shadow).enabled = flag; if (flag) { Color solidShadowColor = SolidShadowColor; solidShadowColor.a = navVisual.CurrentShadowAlpha; navVisual.Shadow.effectColor = solidShadowColor; navVisual.Shadow.effectDistance = navVisual.CurrentShadowDist; } } if ((Object)(object)navVisual.Outline != (Object)null) { ((Shadow)navVisual.Outline).effectColor = NormalOutline; ((Shadow)navVisual.Outline).effectDistance = NormalOutlineDist; ((Behaviour)navVisual.Outline).enabled = true; } if ((Object)(object)navVisual.Background != (Object)null) { ((Graphic)navVisual.Background).color = NormalBg; } } } private static NavVisual BuildNavVisual(Selectable sel) { GameObject gameObject = ((Component)sel).gameObject; NavVisual navVisual = new NavVisual { Selectable = sel, Rect = gameObject.GetComponent(), Background = gameObject.GetComponent(), Outline = gameObject.GetComponent() }; Shadow[] components = gameObject.GetComponents(); foreach (Shadow val in components) { if (!(val is Outline)) { navVisual.Shadow = val; break; } } return navVisual; } private void WireSubmitAdvance(TMP_InputField field, int indexOfField) { ((UnityEvent)(object)field.onSubmit).AddListener((UnityAction)delegate { SelectIndex(Mathf.Min(indexOfField + 1, _nav.Length - 1)); }); } private static Player GetRewiredPlayer() { if ((Object)(object)PlayerManager.S == (Object)null) { return null; } PlayerClass player = PlayerManager.S.GetPlayer(0); if (player == null) { return null; } return player.GetRewiredPlayer(); } private static bool RewiredNavUp() { Player rewiredPlayer = GetRewiredPlayer(); if (rewiredPlayer != null) { return rewiredPlayer.GetButtonDown("UIVertical"); } return false; } private static bool RewiredNavDown() { Player rewiredPlayer = GetRewiredPlayer(); if (rewiredPlayer != null) { return rewiredPlayer.GetNegativeButtonDown("UIVertical"); } return false; } private void OnConnected() { if ((Object)(object)AventurePanel != (Object)null) { AventurePanel.hasCheckedForAdventure = false; AventurePanel.CheckMainStory(); } base.manager.SwitchToPanel((UI_MenuPanel)(object)AventurePanel); } private void OnConnectionFailed(string error) { if ((Object)(object)_statusText != (Object)null) { ((TMP_Text)_statusText).text = "Failed: " + error; } } private void GrabGameStyle(UI_MenuPanel_Aventure aventurePanel) { TextMeshProUGUI componentInChildren = ((Component)((UI_MenuPanel)aventurePanel).selfCanvas).GetComponentInChildren(true); if ((Object)(object)componentInChildren != (Object)null) { _gameFont = ((TMP_Text)componentInChildren).font; } UI_Button[] array = Resources.FindObjectsOfTypeAll(); foreach (UI_Button val in array) { Image img_background = val.img_background; if ((Object)(object)((img_background != null) ? img_background.sprite : null) != (Object)null) { _bgSprite = val.img_background.sprite; break; } } Log.Info("APConnectionPanel style: font=" + (((Object)(object)_gameFont != (Object)null) ? ((Object)_gameFont).name : "null") + ", sprite=" + (((Object)(object)_bgSprite != (Object)null) ? ((Object)_bgSprite).name : "null")); } private void BuildUI() { //IL_0090: 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_0099: 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_00a1: 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_00c7: 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_010a: Expected O, but got Unknown //IL_0286: 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_029c: Unknown result type (might be due to invalid IL or missing references) LastConnectionInfo lastConnectionInfo = FileWriter.ReadLastConnection(); string defaultValue = Fallback(lastConnectionInfo?.Host, "archipelago.gg"); string defaultValue2 = Fallback(lastConnectionInfo?.Port, "38281"); string defaultValue3 = Fallback(lastConnectionInfo?.SlotName, ""); string defaultValue4 = lastConnectionInfo?.Password ?? ""; GameObject val = MakeRect("Container", ((Component)this).transform); RectTransform component = val.GetComponent(); Vector2 val2 = default(Vector2); ((Vector2)(ref val2))..ctor(0.5f, 0.5f); component.pivot = val2; Vector2 anchorMin = (component.anchorMax = val2); component.anchorMin = anchorMin; component.anchoredPosition = new Vector2(0f, 15f); component.sizeDelta = new Vector2(560f, 660f); VerticalLayoutGroup obj = val.AddComponent(); ((LayoutGroup)obj).childAlignment = (TextAnchor)1; ((HorizontalOrVerticalLayoutGroup)obj).spacing = 10f; ((HorizontalOrVerticalLayoutGroup)obj).childForceExpandWidth = true; ((HorizontalOrVerticalLayoutGroup)obj).childForceExpandHeight = false; ((LayoutGroup)obj).padding = new RectOffset(10, 10, 10, 10); AddSpacer(val.transform, 15f); AddTitle(val.transform, "Archipelago"); AddSpacer(val.transform, 5f); AddHorizontalLine(val.transform, 8f); AddSpacer(val.transform, 10f); _hostnameField = AddInputRow(val.transform, "Host", defaultValue); _portField = AddInputRow(val.transform, "Port", defaultValue2); _slotField = AddInputRow(val.transform, "Slot Name", defaultValue3); _passwordField = AddInputRow(val.transform, "Password", defaultValue4, isPassword: true); AddSpacer(val.transform, 25f); Button val4 = AddConnectButton(val.transform); _statusText = AddStatusLabel(val.transform); Selectable[] array = (Selectable[])(object)new Selectable[5] { (Selectable)_hostnameField, (Selectable)_portField, (Selectable)_slotField, (Selectable)_passwordField, (Selectable)val4 }; _nav = new NavVisual[array.Length]; for (int i = 0; i < array.Length; i++) { _nav[i] = BuildNavVisual(array[i]); } NavVisual[] nav = _nav; foreach (NavVisual navVisual in nav) { Navigation navigation = navVisual.Selectable.navigation; ((Navigation)(ref navigation)).mode = (Mode)0; navVisual.Selectable.navigation = navigation; navVisual.Selectable.transition = (Transition)0; if ((Object)(object)navVisual.Shadow != (Object)null) { ((Behaviour)navVisual.Shadow).enabled = false; } } WireSubmitAdvance(_hostnameField, 0); WireSubmitAdvance(_portField, 1); WireSubmitAdvance(_slotField, 2); WireSubmitAdvance(_passwordField, 3); base.toSelectFirst = ((Component)_hostnameField).gameObject; _navIndex = 0; ApplyHighlight(); } private void AddTitle(Transform parent, string text) { //IL_0025: 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_0077: Unknown result type (might be due to invalid IL or missing references) GameObject obj = MakeRect("Title", parent); TextMeshProUGUI val = obj.AddComponent(); ((TMP_Text)val).text = text; ((TMP_Text)val).fontSize = 65f; ((Graphic)val).color = Color.black; ((TMP_Text)val).fontStyle = (FontStyles)0; ((TMP_Text)val).alignment = (TextAlignmentOptions)1028; ApplyFont(val); Shadow obj2 = obj.AddComponent(); obj2.effectColor = new Color(1f, 1f, 1f, 0.8f); obj2.effectDistance = new Vector2(2f, -2f); obj.AddComponent().preferredHeight = 65f; } private TMP_InputField AddInputRow(Transform parent, string label, string defaultValue, bool isPassword = false) { //IL_0077: 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_012a: Unknown result type (might be due to invalid IL or missing references) //IL_013e: 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_0164: 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_0195: 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_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_01cd: Unknown result type (might be due to invalid IL or missing references) //IL_0206: 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_02dd: 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) GameObject val = MakeRect("Row_" + label, parent); VerticalLayoutGroup obj = val.AddComponent(); ((LayoutGroup)obj).childAlignment = (TextAnchor)0; ((HorizontalOrVerticalLayoutGroup)obj).spacing = 2f; ((HorizontalOrVerticalLayoutGroup)obj).childForceExpandWidth = true; ((HorizontalOrVerticalLayoutGroup)obj).childForceExpandHeight = false; val.AddComponent().preferredHeight = 90f; GameObject obj2 = MakeRect("Label_" + label, val.transform); TextMeshProUGUI val2 = obj2.AddComponent(); ((TMP_Text)val2).text = label; ((TMP_Text)val2).fontSize = 30f; ((Graphic)val2).color = Color.black; ((TMP_Text)val2).alignment = (TextAlignmentOptions)513; ApplyFont(val2); obj2.AddComponent().preferredHeight = 30f; GameObject val3 = MakeRect("FieldWrapper_" + label, val.transform); val3.AddComponent().preferredHeight = 52f; GameObject val4 = MakeRect("Field_" + label, val3.transform); Image val5 = val4.AddComponent(); ((Graphic)val5).color = Color.white; if ((Object)(object)_bgSprite != (Object)null) { val5.sprite = _bgSprite; val5.type = (Type)1; } ((Behaviour)val4.AddComponent()).enabled = false; Outline obj3 = val4.AddComponent(); ((Shadow)obj3).effectColor = Color.black; ((Shadow)obj3).effectDistance = new Vector2(4f, -4f); RectTransform component = val4.GetComponent(); component.anchorMin = new Vector2(0.3f, 0f); component.anchorMax = Vector2.one; component.sizeDelta = Vector2.zero; GameObject val6 = MakeRect("Viewport", val4.transform); RectTransform component2 = val6.GetComponent(); component2.anchorMin = Vector2.zero; component2.anchorMax = Vector2.one; component2.offsetMin = new Vector2(12f, 6f); component2.offsetMax = new Vector2(-12f, -6f); val6.AddComponent(); GameObject obj4 = MakeRect("Text", val6.transform); TextMeshProUGUI val7 = obj4.AddComponent(); ((TMP_Text)val7).fontSize = 26f; ((Graphic)val7).color = Color.black; ((TMP_Text)val7).alignment = (TextAlignmentOptions)513; ApplyFont(val7); FillParent(obj4.GetComponent()); GameObject obj5 = MakeRect("Placeholder", val6.transform); TextMeshProUGUI val8 = obj5.AddComponent(); ((TMP_Text)val8).text = label.ToLower() + "..."; ((TMP_Text)val8).fontSize = 26f; ((Graphic)val8).color = new Color(0.4f, 0.4f, 0.4f, 0.8f); ((TMP_Text)val8).fontStyle = (FontStyles)2; ((TMP_Text)val8).alignment = (TextAlignmentOptions)513; ApplyFont(val8); FillParent(obj5.GetComponent()); TMP_InputField val9 = val4.AddComponent(); val9.textViewport = component2; val9.textComponent = (TMP_Text)(object)val7; val9.placeholder = (Graphic)(object)val8; val9.text = defaultValue; val9.caretColor = Color.black; val9.selectionColor = new Color(0.3f, 0.6f, 1f, 0.4f); if (isPassword) { val9.inputType = (InputType)2; } return val9; } private Button AddConnectButton(Transform parent) { //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003f: 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_005b: 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_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Expected O, but got Unknown GameObject val = MakeRect("ButtonWrapper_Connect", parent); val.AddComponent().preferredHeight = 65f; GameObject val2 = MakeRect("Button_Connect", val.transform); RectTransform component = val2.GetComponent(); component.anchorMin = Vector2.zero; component.anchorMax = Vector2.one; component.sizeDelta = Vector2.zero; Image val3 = val2.AddComponent(); ((Graphic)val3).color = Color.white; if ((Object)(object)_bgSprite != (Object)null) { val3.sprite = _bgSprite; val3.type = (Type)1; } Outline obj = val2.AddComponent(); ((Shadow)obj).effectColor = Color.black; ((Shadow)obj).effectDistance = new Vector2(4f, -4f); Shadow obj2 = val2.AddComponent(); obj2.effectColor = new Color(0f, 0f, 0f, 0.25f); obj2.effectDistance = new Vector2(3f, -3f); GameObject obj3 = MakeRect("Label", val2.transform); TextMeshProUGUI val4 = obj3.AddComponent(); ((TMP_Text)val4).text = "Connect"; ((TMP_Text)val4).fontSize = 30f; ((Graphic)val4).color = Color.black; ((TMP_Text)val4).fontStyle = (FontStyles)0; ((TMP_Text)val4).alignment = (TextAlignmentOptions)514; ApplyFont(val4); FillParent(obj3.GetComponent()); val2.AddComponent().preferredHeight = 65f; Button obj4 = val2.AddComponent