Decompiled source of AskaUI v0.0.6
BepInEx\plugins\AskaUI\AskaUI.dll
Decompiled 2 days ago
The result has been truncated due to the large size, download it to view full contents!
using System; 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 ASKAPanelKit; using ASKAUI; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using BepInEx.Core.Logging.Interpolation; using BepInEx.Logging; using BepInEx.Unity.IL2CPP; using HarmonyLib; using Il2CppInterop.Runtime.Attributes; using Il2CppInterop.Runtime.Injection; using Il2CppInterop.Runtime.InteropTypes.Arrays; using Microsoft.CodeAnalysis; using SSSGame; using SSSGame.UI; using SandSailorStudio.Attributes; using SandSailorStudio.UI; using TMPro; using UnityEngine; using UnityEngine.InputSystem; using UnityEngine.InputSystem.Controls; using UnityEngine.InputSystem.Utilities; using UnityEngine.Profiling; using UnityEngine.SceneManagement; using UnityEngine.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")] [assembly: AssemblyCompany("DEATH STUDIOS")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyDescription("ASKA UI Framework — Config Management And Panel Registry For BepInEx IL2CPP Mods.")] [assembly: AssemblyFileVersion("0.0.6.0")] [assembly: AssemblyInformationalVersion("0.0.6+2eb37794b32916412ebcb0dfd350cd795fb081cc")] [assembly: AssemblyProduct("AskaUI")] [assembly: AssemblyTitle("AskaUI")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("0.0.6.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] 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.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace ASKAPanelKit { public static class PK { public static readonly Color ColOverlay = new Color(0.01f, 0.02f, 0.02f, 0.78f); public static readonly Color ColPanel = new Color(0.04f, 0.05f, 0.05f, 0.985f); public static readonly Color ColHeader = new Color(0.09f, 0.1f, 0.1f, 0.99f); public static readonly Color ColAccent = new Color(0.92f, 0.38f, 0.08f, 1f); public static readonly Color ColAccentDim = new Color(0.23f, 0.24f, 0.24f, 1f); public static readonly Color ColText = new Color(1f, 0.6f, 0.26f, 1f); public static readonly Color ColMuted = new Color(0.94f, 0.72f, 0.52f, 1f); public static readonly Color ColGreen = new Color(0.33f, 0.82f, 0.46f, 1f); public static readonly Color ColRed = new Color(0.84f, 0.32f, 0.26f, 1f); public static readonly Color ColInput = new Color(0.09f, 0.09f, 0.09f, 1f); private static void EnsureBuilt() { ASKAUIKit.EnsureBuilt(); } public static void Header(string title, string desc = null) { EnsureBuilt(); ASKAUIKit.DrawSectionHeader(title, desc); } public static void BeginSection(string title) { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0018: 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) EnsureBuilt(); GUILayout.Space(6f); Color color = GUI.color; GUI.color = ColAccent; GUILayout.Label(title, ASKAUIKit.StSection, (GUILayoutOption[])(object)new GUILayoutOption[2] { GUILayout.ExpandWidth(true), GUILayout.Height(44f) }); GUI.color = color; GUILayout.Space(2f); } public static void EndSection() { GUILayout.Space(4f); } public static void BeginCard() { EnsureBuilt(); ASKAUIKit.BeginCard(); } public static void EndCard() { ASKAUIKit.EndCard(); } public static bool BoolRow(string label, bool current, string hint = null) { EnsureBuilt(); return ASKAUIKit.DrawBoolRow(label, current, hint); } public static float FloatRow(string label, float current, float min, float max, string suffix = "", float step = 1f) { EnsureBuilt(); return ASKAUIKit.DrawFloatRow(label, current, min, max, suffix, step); } public static int IntRow(string label, int current, int min, int max, string suffix = "") { EnsureBuilt(); return ASKAUIKit.DrawIntRow(label, current, min, max, suffix); } public static void StatRow(string label, string value) { EnsureBuilt(); ASKAUIKit.DrawStatRow(label, value); } public static void ColoredStatRow(string label, string value, Color color) { //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_0064: Unknown result type (might be due to invalid IL or missing references) EnsureBuilt(); GUILayout.BeginHorizontal(ASKAUIKit.StCard, (Il2CppReferenceArray<GUILayoutOption>)null); GUILayout.Label(label, ASKAUIKit.StLabel, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(540f) }); GUILayout.FlexibleSpace(); Color color2 = GUI.color; GUI.color = color; GUILayout.Label(value, ASKAUIKit.StValue, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(300f) }); GUI.color = color2; GUILayout.EndHorizontal(); } public static void ProgressRow(string label, float current, float max) { EnsureBuilt(); ASKAUIKit.DrawProgressBar(label, current, max); } public static bool Btn(string label, float width = 180f) { EnsureBuilt(); return ASKAUIKit.DrawButton(label, width); } public static bool ActionButton(string label, string color = "accent") { EnsureBuilt(); return (color == "green") ? ASKAUIKit.DrawButtonGreen(label) : ((color == "red") ? ASKAUIKit.DrawButtonRed(label) : ASKAUIKit.DrawButton(label)); } public static bool ResetToDefaultsBtn() { return ActionButton("↺ Reset to Defaults", "red"); } public static void BeginButtonRow() { GUILayout.BeginHorizontal((Il2CppReferenceArray<GUILayoutOption>)null); } public static void EndButtonRow() { GUILayout.EndHorizontal(); } public static void HelpBox(string text, string type = "info") { EnsureBuilt(); if (!(type == "error")) { if (type == "warning") { ASKAUIKit.DrawWarningBox(text); } else { ASKAUIKit.DrawInfoBox(text); } } else { ASKAUIKit.DrawErrorBox(text); } } public static void Separator() { EnsureBuilt(); ASKAUIKit.DrawSeparator(); } public static void Footer(string text) { EnsureBuilt(); ASKAUIKit.DrawFooter(text); } public static void Badge(string text, Color color) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: 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_0033: Unknown result type (might be due to invalid IL or missing references) EnsureBuilt(); Color color2 = GUI.color; GUI.color = color; GUILayout.Label(text, ASKAUIKit.StLabel, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(100f) }); GUI.color = color2; } public static int DropdownRow(string label, int selected, string[] options, string hint = null) { EnsureBuilt(); GUILayout.BeginVertical(ASKAUIKit.StCard, (Il2CppReferenceArray<GUILayoutOption>)null); GUILayout.BeginHorizontal((Il2CppReferenceArray<GUILayoutOption>)null); GUILayout.Label(label, ASKAUIKit.StLabel, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(540f) }); GUILayout.FlexibleSpace(); if (GUILayout.Button("◀", ASKAUIKit.StSmallBtn, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(36f) })) { selected = (selected - 1 + options.Length) % options.Length; } GUILayout.Label(options[selected], ASKAUIKit.StValue, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(160f) }); if (GUILayout.Button("▶", ASKAUIKit.StSmallBtn, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(36f) })) { selected = (selected + 1) % options.Length; } GUILayout.EndHorizontal(); if (!string.IsNullOrWhiteSpace(hint)) { GUILayout.Label(hint, ASKAUIKit.StMuted, (Il2CppReferenceArray<GUILayoutOption>)null); } GUILayout.EndVertical(); return selected; } public static void Reset() { ASKAUIKit.Reset(); } public static string TextField(string label, string current, float width = 300f) { EnsureBuilt(); GUILayout.BeginHorizontal((Il2CppReferenceArray<GUILayoutOption>)null); GUILayout.Label(label, ASKAUIKit.StLabel, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(width) }); string result = GUILayout.TextField(current, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(200f) }); GUILayout.EndHorizontal(); return result; } public static bool ToggleRow(string label, bool current) { return BoolRow(label, current); } public static bool BeginCollapsible(string title, bool defaultOpen) { BeginSection(title); BeginCard(); return defaultOpen; } public static void EndCollapsible() { EndCard(); EndSection(); } } } namespace ASKAUI { public struct HUDSnapshot { public float Health; public float HealthMax; public float Warmth; public float WarmthMax; public float Food; public float FoodMax; public float Water; public float WaterMax; public float Stamina; public float StaminaMax; public bool Valid; } public class ASKAHUDOverlay : MonoBehaviour { public static ConfigEntry<bool> CfgEnabled; public static ConfigEntry<bool> CfgHideVanilla; public static ConfigEntry<float> CfgX; public static ConfigEntry<float> CfgY; public static ConfigEntry<float> CfgBarW; public static ConfigEntry<float> CfgBarH; public static ConfigEntry<float> CfgGap; public static HUDSnapshot LiveSnap; internal static FieldInfo FCurrentValue; internal static FieldInfo FMax; internal static FieldInfo FHealthAttr; internal static FieldInfo FWarmthAttr; internal static FieldInfo FFoodAttr; internal static FieldInfo FWaterAttr; internal static FieldInfo FStaminaAttr; internal static bool FieldsReady; private PlayerHUDMenu _hudMenu; private bool _vanillaHidden; private float _hudSearchTimer; private string _lastScene = ""; private const float HudSearchInterval = 3f; private GUIStyle _stLabel; private GUIStyle _stValue; private bool _stylesReady; private static readonly Color C_Health = new Color(0.85f, 0.22f, 0.22f, 1f); private static readonly Color C_Warmth = new Color(0.2f, 0.55f, 0.9f, 1f); private static readonly Color C_Food = new Color(0.78f, 0.55f, 0.18f, 1f); private static readonly Color C_Water = new Color(0.22f, 0.72f, 0.88f, 1f); private static readonly Color C_Stamina = new Color(0.33f, 0.82f, 0.46f, 1f); private static readonly Color C_BgBar = new Color(0.08f, 0.08f, 0.08f, 0.8f); private static readonly Color C_Border = new Color(0.92f, 0.38f, 0.08f, 0.6f); private static readonly Color C_Text = new Color(1f, 0.6f, 0.26f, 1f); private static readonly Color C_Muted = new Color(0.7f, 0.65f, 0.58f, 1f); public static ASKAHUDOverlay Instance { get; private set; } public HUDSnapshot Snap => LiveSnap; public ASKAHUDOverlay(IntPtr ptr) : base(ptr) { } public void Reset() { _stylesReady = false; } internal static void BuildFieldCache() { //IL_02a0: Unknown result type (might be due to invalid IL or missing references) //IL_02a7: Expected O, but got Unknown if (FieldsReady) { return; } try { FCurrentValue = typeof(Property).GetField("_currentValue", BindingFlags.Instance | BindingFlags.NonPublic); FMax = typeof(VariableAttribute).GetField("max", BindingFlags.Instance | BindingFlags.Public); FHealthAttr = typeof(PlayerWidget).GetField("_healthAttr", BindingFlags.Instance | BindingFlags.NonPublic); FWarmthAttr = typeof(PlayerWidget).GetField("_warmthAttr", BindingFlags.Instance | BindingFlags.NonPublic); FFoodAttr = typeof(PlayerWidget).GetField("_foodAttr", BindingFlags.Instance | BindingFlags.NonPublic); FWaterAttr = typeof(PlayerWidget).GetField("_waterAttr", BindingFlags.Instance | BindingFlags.NonPublic); FStaminaAttr = typeof(PlayerWidget).GetField("_staminaAttr", BindingFlags.Instance | BindingFlags.NonPublic); FieldsReady = FCurrentValue != null && FMax != null && FHealthAttr != null && FWarmthAttr != null && FFoodAttr != null && FWaterAttr != null && FStaminaAttr != null; ManualLogSource loggerInstance = ASKAUIPlugin.LoggerInstance; if (loggerInstance != null) { loggerInstance.LogInfo((object)($"[ASKAUI-HUD] Field cache ready={FieldsReady}" + ((!FieldsReady) ? $" curVal={FCurrentValue != null} max={FMax != null} h={FHealthAttr != null} w={FWarmthAttr != null} f={FFoodAttr != null} wa={FWaterAttr != null} s={FStaminaAttr != null}" : ""))); } } catch (Exception ex) { ManualLogSource loggerInstance2 = ASKAUIPlugin.LoggerInstance; if (loggerInstance2 != null) { bool flag = default(bool); BepInExWarningLogInterpolatedStringHandler val = new BepInExWarningLogInterpolatedStringHandler(33, 1, ref flag); if (flag) { ((BepInExLogInterpolatedStringHandler)val).AppendLiteral("[ASKAUI-HUD] Field cache failed: "); ((BepInExLogInterpolatedStringHandler)val).AppendFormatted<string>(ex.Message); } loggerInstance2.LogWarning(val); } } } internal static (float cur, float max) ReadAttr(FieldInfo attrField, PlayerWidget pw) { try { if (attrField == null || (Object)(object)pw == (Object)null) { return (cur: 0f, max: 100f); } object? value = attrField.GetValue(pw); VariableAttribute val = (VariableAttribute)((value is VariableAttribute) ? value : null); if (val == null) { return (cur: 0f, max: 100f); } float item = ((FCurrentValue != null) ? ((float)FCurrentValue.GetValue(val)) : 0f); float num = ((FMax != null) ? ((float)FMax.GetValue(val)) : 100f); return (cur: item, max: (num > 0f) ? num : 100f); } catch { return (cur: 0f, max: 100f); } } private void Awake() { Instance = this; } private void OnDestroy() { RestoreVanillaHUD(); } private void Update() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) Scene activeScene = SceneManager.GetActiveScene(); string name = ((Scene)(ref activeScene)).name; if (name != _lastScene) { _lastScene = name; _hudMenu = null; _vanillaHidden = false; _hudSearchTimer = 0f; LiveSnap = default(HUDSnapshot); } if (!IsEnabled()) { RestoreVanillaHUD(); return; } _hudSearchTimer -= Time.deltaTime; if (_hudSearchTimer <= 0f) { _hudSearchTimer = 3f; if ((Object)(object)_hudMenu == (Object)null) { try { _hudMenu = Object.FindObjectOfType<PlayerHUDMenu>(); } catch { } } } ManageVanillaVisibility(); } private void OnGUI() { //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: 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_015e: Unknown result type (might be due to invalid IL or missing references) //IL_0192: Unknown result type (might be due to invalid IL or missing references) if (IsEnabled() && LiveSnap.Valid) { EnsureStyles(); float x = CfgX?.Value ?? 20f; float num = CfgY?.Value ?? 20f; float w = CfgBarW?.Value ?? 220f; float num2 = CfgBarH?.Value ?? 26f; float num3 = CfgGap?.Value ?? 10f; DrawBar(x, num + (num2 + num3) * 0f, w, num2, "HEALTH", LiveSnap.Health, LiveSnap.HealthMax, C_Health); DrawBar(x, num + (num2 + num3) * 1f, w, num2, "WARMTH", LiveSnap.Warmth, LiveSnap.WarmthMax, C_Warmth); DrawBar(x, num + (num2 + num3) * 2f, w, num2, "FOOD", LiveSnap.Food, LiveSnap.FoodMax, C_Food); DrawBar(x, num + (num2 + num3) * 3f, w, num2, "WATER", LiveSnap.Water, LiveSnap.WaterMax, C_Water); DrawBar(x, num + (num2 + num3) * 4f, w, num2, "STAMINA", LiveSnap.Stamina, LiveSnap.StaminaMax, C_Stamina); } } private void ManageVanillaVisibility() { bool flag = CfgHideVanilla?.Value ?? true; if (flag && !_vanillaHidden) { HideVanillaHUD(); } if (!flag && _vanillaHidden) { RestoreVanillaHUD(); } } private void HideVanillaHUD() { //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Expected O, but got Unknown if ((Object)(object)_hudMenu == (Object)null) { return; } try { _hudMenu.SetHudActive(false); _vanillaHidden = true; ManualLogSource loggerInstance = ASKAUIPlugin.LoggerInstance; if (loggerInstance != null) { loggerInstance.LogInfo((object)"[ASKAUI-HUD] Vanilla HUD hidden."); } } catch (Exception ex) { ManualLogSource loggerInstance2 = ASKAUIPlugin.LoggerInstance; if (loggerInstance2 != null) { bool flag = default(bool); BepInExWarningLogInterpolatedStringHandler val = new BepInExWarningLogInterpolatedStringHandler(36, 1, ref flag); if (flag) { ((BepInExLogInterpolatedStringHandler)val).AppendLiteral("[ASKAUI-HUD] HideVanillaHUD failed: "); ((BepInExLogInterpolatedStringHandler)val).AppendFormatted<string>(ex.Message); } loggerInstance2.LogWarning(val); } } } public void RestoreVanillaHUD() { if (!_vanillaHidden) { return; } try { if ((Object)(object)_hudMenu == (Object)null) { _hudMenu = Object.FindObjectOfType<PlayerHUDMenu>(); } if ((Object)(object)_hudMenu != (Object)null) { _hudMenu.SetHudActive(true); _vanillaHidden = false; ManualLogSource loggerInstance = ASKAUIPlugin.LoggerInstance; if (loggerInstance != null) { loggerInstance.LogInfo((object)"[ASKAUI-HUD] Vanilla HUD restored."); } } } catch { } } public static bool IsEnabled() { return CfgEnabled?.Value ?? false; } private void EnsureStyles() { //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0027: 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_0038: 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_004d: Expected O, but got Unknown //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_006e: 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_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Expected O, but got Unknown //IL_009c: Unknown result type (might be due to invalid IL or missing references) if (!_stylesReady) { _stylesReady = true; _stLabel = new GUIStyle(GUI.skin.label) { fontSize = 14, fontStyle = (FontStyle)1, wordWrap = false, alignment = (TextAnchor)3 }; _stLabel.normal.textColor = C_Text; _stValue = new GUIStyle(GUI.skin.label) { fontSize = 13, wordWrap = false, alignment = (TextAnchor)5 }; _stValue.normal.textColor = C_Muted; } } private void DrawBar(float x, float y, float w, float h, string label, float val, float max, Color fillCol) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: 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_0043: Unknown result type (might be due to invalid IL or missing references) //IL_005d: 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_00aa: 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_00c9: 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_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: 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_018e: 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_0133: Unknown result type (might be due to invalid IL or missing references) float num = w + 80f; float num2 = ((max > 0f) ? Mathf.Clamp01(val / max) : 0f); FillRect(new Rect(x, y, num, h), C_BgBar); DrawOutline(new Rect(x, y, num, h), C_Border); GUI.Label(new Rect(x + 4f, y, 74f, h), label, _stLabel); float num3 = x + 80f; float num4 = w - 4f; FillRect(new Rect(num3, y + 2f, num4, h - 4f), new Color(0f, 0f, 0f, 0.45f)); if (num2 > 0f) { Color color = GUI.color; GUI.color = ((num2 < 0.2f) ? Color.Lerp(fillCol, Color.white, Mathf.PingPong(Time.time * 2f, 1f) * 0.35f) : fillCol); GUI.DrawTexture(new Rect(num3 + 1f, y + 3f, (num4 - 2f) * num2, h - 6f), (Texture)(object)Texture2D.whiteTexture); GUI.color = color; } string text = ((max > 0f) ? $"{val:F0} / {max:F0}" : "-- / --"); GUI.Label(new Rect(num3, y, num4, h), text, _stValue); } private static void FillRect(Rect r, Color c) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000e: 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) Color color = GUI.color; GUI.color = c; GUI.DrawTexture(r, (Texture)(object)Texture2D.whiteTexture); GUI.color = color; } private static void DrawOutline(Rect r, Color c) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0007: 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_0058: Unknown result type (might be due to invalid IL or missing references) //IL_0082: 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_00c2: Unknown result type (might be due to invalid IL or missing references) Color color = GUI.color; GUI.color = c; GUI.DrawTexture(new Rect(((Rect)(ref r)).x, ((Rect)(ref r)).y, ((Rect)(ref r)).width, 1f), (Texture)(object)Texture2D.whiteTexture); GUI.DrawTexture(new Rect(((Rect)(ref r)).x, ((Rect)(ref r)).yMax - 1f, ((Rect)(ref r)).width, 1f), (Texture)(object)Texture2D.whiteTexture); GUI.DrawTexture(new Rect(((Rect)(ref r)).x, ((Rect)(ref r)).y, 1f, ((Rect)(ref r)).height), (Texture)(object)Texture2D.whiteTexture); GUI.DrawTexture(new Rect(((Rect)(ref r)).xMax - 1f, ((Rect)(ref r)).y, 1f, ((Rect)(ref r)).height), (Texture)(object)Texture2D.whiteTexture); GUI.color = color; } } [HarmonyPatch(typeof(PlayerWidget))] internal static class PlayerWidgetPatches { [HarmonyPatch("_OnSetHealth")] [HarmonyPostfix] private static void PostHealth(PlayerWidget __instance) { if (ASKAHUDOverlay.FieldsReady) { (float cur, float max) tuple = ASKAHUDOverlay.ReadAttr(ASKAHUDOverlay.FHealthAttr, __instance); float item = tuple.cur; float item2 = tuple.max; HUDSnapshot liveSnap = ASKAHUDOverlay.LiveSnap; liveSnap.Health = item; liveSnap.HealthMax = item2; liveSnap.Valid = true; ASKAHUDOverlay.LiveSnap = liveSnap; } } [HarmonyPatch("_OnSetWarmth")] [HarmonyPostfix] private static void PostWarmth(PlayerWidget __instance) { if (ASKAHUDOverlay.FieldsReady) { (float cur, float max) tuple = ASKAHUDOverlay.ReadAttr(ASKAHUDOverlay.FWarmthAttr, __instance); float item = tuple.cur; float item2 = tuple.max; HUDSnapshot liveSnap = ASKAHUDOverlay.LiveSnap; liveSnap.Warmth = item; liveSnap.WarmthMax = item2; liveSnap.Valid = true; ASKAHUDOverlay.LiveSnap = liveSnap; } } [HarmonyPatch("_OnSetFood")] [HarmonyPostfix] private static void PostFood(PlayerWidget __instance) { if (ASKAHUDOverlay.FieldsReady) { (float cur, float max) tuple = ASKAHUDOverlay.ReadAttr(ASKAHUDOverlay.FFoodAttr, __instance); float item = tuple.cur; float item2 = tuple.max; HUDSnapshot liveSnap = ASKAHUDOverlay.LiveSnap; liveSnap.Food = item; liveSnap.FoodMax = item2; liveSnap.Valid = true; ASKAHUDOverlay.LiveSnap = liveSnap; } } [HarmonyPatch("_OnSetWater")] [HarmonyPostfix] private static void PostWater(PlayerWidget __instance) { if (ASKAHUDOverlay.FieldsReady) { (float cur, float max) tuple = ASKAHUDOverlay.ReadAttr(ASKAHUDOverlay.FWaterAttr, __instance); float item = tuple.cur; float item2 = tuple.max; HUDSnapshot liveSnap = ASKAHUDOverlay.LiveSnap; liveSnap.Water = item; liveSnap.WaterMax = item2; liveSnap.Valid = true; ASKAHUDOverlay.LiveSnap = liveSnap; } } [HarmonyPatch("_OnSetStamina")] [HarmonyPostfix] private static void PostStamina(PlayerWidget __instance) { if (ASKAHUDOverlay.FieldsReady) { (float cur, float max) tuple = ASKAHUDOverlay.ReadAttr(ASKAHUDOverlay.FStaminaAttr, __instance); float item = tuple.cur; float item2 = tuple.max; HUDSnapshot liveSnap = ASKAHUDOverlay.LiveSnap; liveSnap.Stamina = item; liveSnap.StaminaMax = item2; liveSnap.Valid = true; ASKAHUDOverlay.LiveSnap = liveSnap; } } } [AttributeUsage(AttributeTargets.Method, AllowMultiple = false)] public class ASKAUIEntryPointAttribute : Attribute { } public static class AskaUIInGameTab { private static bool _injected; public static void RegisterIl2CppType() { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Expected O, but got Unknown try { if (!ClassInjector.IsTypeRegisteredInIl2Cpp<AskaUITabPage>()) { ClassInjector.RegisterTypeInIl2Cpp<AskaUITabPage>(); } } catch (Exception ex) { ManualLogSource loggerInstance = ASKAUIPlugin.LoggerInstance; if (loggerInstance != null) { bool flag = default(bool); BepInExErrorLogInterpolatedStringHandler val = new BepInExErrorLogInterpolatedStringHandler(37, 1, ref flag); if (flag) { ((BepInExLogInterpolatedStringHandler)val).AppendLiteral("[ASKAUI] IL2CPP registration failed: "); ((BepInExLogInterpolatedStringHandler)val).AppendFormatted<string>(ex.Message); } loggerInstance.LogError(val); } } } [HarmonyPatch(typeof(SettingsMenu), "Start")] [HarmonyPostfix] public static void Start_Postfix(SettingsMenu __instance) { //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Expected O, but got Unknown if (_injected) { return; } try { _InjectTab(__instance); _injected = true; } catch (Exception ex) { ManualLogSource loggerInstance = ASKAUIPlugin.LoggerInstance; if (loggerInstance != null) { bool flag = default(bool); BepInExErrorLogInterpolatedStringHandler val = new BepInExErrorLogInterpolatedStringHandler(28, 1, ref flag); if (flag) { ((BepInExLogInterpolatedStringHandler)val).AppendLiteral("[ASKAUI] Tab inject failed: "); ((BepInExLogInterpolatedStringHandler)val).AppendFormatted<string>(ex.Message); } loggerInstance.LogError(val); } } } private static void _InjectTab(SettingsMenu menu) { //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Expected O, but got Unknown //IL_01ec: Unknown result type (might be due to invalid IL or missing references) //IL_01f9: Unknown result type (might be due to invalid IL or missing references) //IL_0206: Unknown result type (might be due to invalid IL or missing references) //IL_0213: Unknown result type (might be due to invalid IL or missing references) //IL_018f: Unknown result type (might be due to invalid IL or missing references) //IL_019e: 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_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_01cb: Unknown result type (might be due to invalid IL or missing references) //IL_01da: Unknown result type (might be due to invalid IL or missing references) TabGroupControls mainTabGroup = menu.MainTabGroup; if ((Object)(object)mainTabGroup == (Object)null) { ManualLogSource loggerInstance = ASKAUIPlugin.LoggerInstance; if (loggerInstance != null) { loggerInstance.LogWarning((object)"[ASKAUI] MainTabGroup is null — skipping tab inject."); } return; } if (((TabGroup)mainTabGroup).buttons == null || ((TabGroup)mainTabGroup).buttons.Count == 0) { ManualLogSource loggerInstance2 = ASKAUIPlugin.LoggerInstance; if (loggerInstance2 != null) { loggerInstance2.LogWarning((object)"[ASKAUI] No existing tab buttons to clone — skipping."); } return; } TabButton val = ((TabGroup)mainTabGroup).buttons[0]; GameObject val2 = Object.Instantiate<GameObject>(((Component)val).gameObject, ((Component)val).transform.parent); ((Object)val2).name = "TabBtn_ASKAUI_Mods"; TabButton component = val2.GetComponent<TabButton>(); if ((Object)(object)component == (Object)null) { Object.Destroy((Object)(object)val2); ManualLogSource loggerInstance3 = ASKAUIPlugin.LoggerInstance; if (loggerInstance3 != null) { loggerInstance3.LogError((object)"[ASKAUI] Cloned object has no TabButton component."); } return; } component.order = ((TabGroup)mainTabGroup).buttons.Count + 10; TextMeshProUGUI componentInChildren = val2.GetComponentInChildren<TextMeshProUGUI>(); if ((Object)(object)componentInChildren != (Object)null) { ((TMP_Text)componentInChildren).text = "MODS"; } Transform val3 = ((Component)menu).transform; if ((Object)(object)val.page != (Object)null) { val3 = ((Component)val.page).transform.parent; } GameObject val4 = new GameObject("TabPage_ASKAUI_Mods"); val4.transform.SetParent(val3, false); RectTransform val5 = val4.AddComponent<RectTransform>(); if ((Object)(object)val.page != (Object)null) { RectTransform component2 = ((Component)val.page).GetComponent<RectTransform>(); if ((Object)(object)component2 != (Object)null) { val5.anchorMin = component2.anchorMin; val5.anchorMax = component2.anchorMax; val5.offsetMin = component2.offsetMin; val5.offsetMax = component2.offsetMax; val5.anchoredPosition = component2.anchoredPosition; val5.sizeDelta = component2.sizeDelta; } } else { val5.anchorMin = Vector2.zero; val5.anchorMax = Vector2.one; val5.offsetMin = Vector2.zero; val5.offsetMax = Vector2.zero; } AskaUITabPage page = val4.AddComponent<AskaUITabPage>(); val4.SetActive(false); component.page = (TabPage)(object)page; component.group = (TabGroup)(object)mainTabGroup; ((TabGroup)mainTabGroup).AddButton(component); mainTabGroup.SortButtons(); ManualLogSource loggerInstance4 = ASKAUIPlugin.LoggerInstance; if (loggerInstance4 != null) { loggerInstance4.LogInfo((object)"[ASKAUI] 'MODS' tab injected successfully."); } } } public static class ASKAUIKit { public const string KitVersion = "1.2.0"; public static readonly Color ColPanel = new Color(0.04f, 0.05f, 0.05f, 0.985f); public static readonly Color ColPanelSoft = new Color(0.1f, 0.11f, 0.1f, 0.96f); public static readonly Color ColHeader = new Color(0.09f, 0.1f, 0.1f, 0.99f); public static readonly Color ColAccent = new Color(0.92f, 0.38f, 0.08f, 1f); public static readonly Color ColAccentDim = new Color(0.23f, 0.24f, 0.24f, 1f); public static readonly Color ColText = new Color(1f, 0.6f, 0.26f, 1f); public static readonly Color ColMuted = new Color(0.7f, 0.68f, 0.64f, 1f); public static readonly Color ColGreen = new Color(0.33f, 0.82f, 0.46f, 1f); public static readonly Color ColRed = new Color(0.84f, 0.32f, 0.26f, 1f); public static readonly Color ColWarning = new Color(0.92f, 0.72f, 0.22f, 1f); public static readonly Color ColInfo = new Color(0.22f, 0.62f, 0.92f, 1f); private static GUIStyle _stRowStyle; private static GUIStyle _stAccentLine; private static GUIStyle _stBadgeAccent; private static GUIStyle _stInfoWarning; private static GUIStyle _stInfoError; private static GUIStyle _stInfoBlue; private static GUIStyle _stSectionTitle; private static GUIStyle _stAccentBar; private static GUIStyle _stCardShadow; private static Texture2D _texPanel; private static Texture2D _texPanelSoft; private static Texture2D _texHeader; private static Texture2D _texAccent; private static Texture2D _texAccentDim; private static Texture2D _texAccentHover; private static Texture2D _texAccentPressed; private static Texture2D _texGreen; private static Texture2D _texRed; private static Texture2D _texWarning; private static Texture2D _texInfo; private static Texture2D _texProgressBg; private static Texture2D _texProgressFill; private static Texture2D _texShadow; public static GUIStyle StLabel { get; private set; } public static GUIStyle StMuted { get; private set; } public static GUIStyle StSection { get; private set; } public static GUIStyle StCard { get; private set; } public static GUIStyle StButton { get; private set; } public static GUIStyle StButtonOn { get; private set; } public static GUIStyle StButtonOff { get; private set; } public static GUIStyle StValue { get; private set; } public static GUIStyle StTab { get; private set; } public static GUIStyle StTabActive { get; private set; } public static GUIStyle StBadge { get; private set; } public static GUIStyle StSmallBtn { get; private set; } public static GUIStyle StProgressBg { get; private set; } public static GUIStyle StProgressFill { get; private set; } public static GUIStyle StSeparator { get; private set; } public static GUIStyle StFooter { get; private set; } public static void EnsureBuilt() { if (StLabel == null) { Build(); } } public static void Reset() { StLabel = null; } private static void Build() { //IL_0017: 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_0055: Unknown result type (might be due to invalid IL or missing references) //IL_006e: 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_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: 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_0122: 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_0140: 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_0172: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Unknown result type (might be due to invalid IL or missing references) //IL_01dd: Unknown result type (might be due to invalid IL or missing references) //IL_01e6: Unknown result type (might be due to invalid IL or missing references) //IL_01ee: 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) //IL_0204: Expected O, but got Unknown //IL_020f: 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_021d: 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_022b: Unknown result type (might be due to invalid IL or missing references) //IL_023b: Expected O, but got Unknown //IL_0246: Unknown result type (might be due to invalid IL or missing references) //IL_024b: Unknown result type (might be due to invalid IL or missing references) //IL_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_026d: 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_027c: Expected O, but got Unknown //IL_027d: Unknown result type (might be due to invalid IL or missing references) //IL_0284: Unknown result type (might be due to invalid IL or missing references) //IL_028e: Expected O, but got Unknown //IL_028f: Unknown result type (might be due to invalid IL or missing references) //IL_0294: Unknown result type (might be due to invalid IL or missing references) //IL_029e: Expected O, but got Unknown //IL_029f: Unknown result type (might be due to invalid IL or missing references) //IL_02a8: Unknown result type (might be due to invalid IL or missing references) //IL_02b0: Unknown result type (might be due to invalid IL or missing references) //IL_02bd: Expected O, but got Unknown //IL_02c8: Unknown result type (might be due to invalid IL or missing references) //IL_02cd: Unknown result type (might be due to invalid IL or missing references) //IL_02de: Unknown result type (might be due to invalid IL or missing references) //IL_02e4: 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_02f4: Unknown result type (might be due to invalid IL or missing references) //IL_02fe: Expected O, but got Unknown //IL_02ff: Unknown result type (might be due to invalid IL or missing references) //IL_0308: Unknown result type (might be due to invalid IL or missing references) //IL_0312: Expected O, but got Unknown //IL_0313: 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_0323: Expected O, but got Unknown //IL_0329: Expected O, but got Unknown //IL_032f: Unknown result type (might be due to invalid IL or missing references) //IL_0344: Unknown result type (might be due to invalid IL or missing references) //IL_0359: Unknown result type (might be due to invalid IL or missing references) //IL_0373: Unknown result type (might be due to invalid IL or missing references) //IL_0378: Unknown result type (might be due to invalid IL or missing references) //IL_0381: Unknown result type (might be due to invalid IL or missing references) //IL_0389: Unknown result type (might be due to invalid IL or missing references) //IL_0391: Unknown result type (might be due to invalid IL or missing references) //IL_0397: Unknown result type (might be due to invalid IL or missing references) //IL_03a7: Expected O, but got Unknown //IL_03b2: Unknown result type (might be due to invalid IL or missing references) //IL_03b7: Unknown result type (might be due to invalid IL or missing references) //IL_03c0: Unknown result type (might be due to invalid IL or missing references) //IL_03c8: Unknown result type (might be due to invalid IL or missing references) //IL_03d4: Unknown result type (might be due to invalid IL or missing references) //IL_03da: Unknown result type (might be due to invalid IL or missing references) //IL_03e4: Expected O, but got Unknown //IL_03e5: Unknown result type (might be due to invalid IL or missing references) //IL_03ec: Unknown result type (might be due to invalid IL or missing references) //IL_03f6: Expected O, but got Unknown //IL_03f7: 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_0419: Unknown result type (might be due to invalid IL or missing references) //IL_042a: Unknown result type (might be due to invalid IL or missing references) //IL_0430: Unknown result type (might be due to invalid IL or missing references) //IL_043b: Unknown result type (might be due to invalid IL or missing references) //IL_044c: 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_0462: Expected O, but got Unknown //IL_0468: Unknown result type (might be due to invalid IL or missing references) //IL_046d: Unknown result type (might be due to invalid IL or missing references) //IL_047e: 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_048f: 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_04a6: Unknown result type (might be due to invalid IL or missing references) //IL_04b1: Unknown result type (might be due to invalid IL or missing references) //IL_04c2: Unknown result type (might be due to invalid IL or missing references) //IL_04c8: Unknown result type (might be due to invalid IL or missing references) //IL_04d8: Expected O, but got Unknown //IL_04e3: Unknown result type (might be due to invalid IL or missing references) //IL_04e8: Unknown result type (might be due to invalid IL or missing references) //IL_04f1: Unknown result type (might be due to invalid IL or missing references) //IL_04f9: Unknown result type (might be due to invalid IL or missing references) //IL_04ff: Unknown result type (might be due to invalid IL or missing references) //IL_050a: Unknown result type (might be due to invalid IL or missing references) //IL_051b: Unknown result type (might be due to invalid IL or missing references) //IL_0523: Unknown result type (might be due to invalid IL or missing references) //IL_0528: Unknown result type (might be due to invalid IL or missing references) //IL_0532: Expected O, but got Unknown //IL_0533: Unknown result type (might be due to invalid IL or missing references) //IL_0544: Expected O, but got Unknown //IL_054f: Unknown result type (might be due to invalid IL or missing references) //IL_0554: Unknown result type (might be due to invalid IL or missing references) //IL_055d: Unknown result type (might be due to invalid IL or missing references) //IL_0565: Unknown result type (might be due to invalid IL or missing references) //IL_0571: Unknown result type (might be due to invalid IL or missing references) //IL_0576: Unknown result type (might be due to invalid IL or missing references) //IL_0580: Expected O, but got Unknown //IL_0581: Unknown result type (might be due to invalid IL or missing references) //IL_0586: Unknown result type (might be due to invalid IL or missing references) //IL_0590: Expected O, but got Unknown //IL_0591: Unknown result type (might be due to invalid IL or missing references) //IL_05a2: Unknown result type (might be due to invalid IL or missing references) //IL_05a8: Unknown result type (might be due to invalid IL or missing references) //IL_05b3: Unknown result type (might be due to invalid IL or missing references) //IL_05c4: Unknown result type (might be due to invalid IL or missing references) //IL_05ca: Unknown result type (might be due to invalid IL or missing references) //IL_05d5: Unknown result type (might be due to invalid IL or missing references) //IL_05e6: Unknown result type (might be due to invalid IL or missing references) //IL_05ec: Unknown result type (might be due to invalid IL or missing references) //IL_05fc: Expected O, but got Unknown //IL_0607: Unknown result type (might be due to invalid IL or missing references) //IL_060c: Unknown result type (might be due to invalid IL or missing references) //IL_061d: Unknown result type (might be due to invalid IL or missing references) //IL_0622: Unknown result type (might be due to invalid IL or missing references) //IL_062c: Expected O, but got Unknown //IL_062d: Unknown result type (might be due to invalid IL or missing references) //IL_0632: Unknown result type (might be due to invalid IL or missing references) //IL_063c: Expected O, but got Unknown //IL_063d: Unknown result type (might be due to invalid IL or missing references) //IL_0642: Unknown result type (might be due to invalid IL or missing references) //IL_064c: Expected O, but got Unknown //IL_064d: Unknown result type (might be due to invalid IL or missing references) //IL_065e: Expected O, but got Unknown //IL_0669: Unknown result type (might be due to invalid IL or missing references) //IL_066e: Unknown result type (might be due to invalid IL or missing references) //IL_067f: Unknown result type (might be due to invalid IL or missing references) //IL_0684: Unknown result type (might be due to invalid IL or missing references) //IL_068e: Expected O, but got Unknown //IL_068f: Unknown result type (might be due to invalid IL or missing references) //IL_0694: Unknown result type (might be due to invalid IL or missing references) //IL_069e: Expected O, but got Unknown //IL_069f: Unknown result type (might be due to invalid IL or missing references) //IL_06a4: Unknown result type (might be due to invalid IL or missing references) //IL_06ae: Expected O, but got Unknown //IL_06af: Unknown result type (might be due to invalid IL or missing references) //IL_06c0: Expected O, but got Unknown //IL_06cb: Unknown result type (might be due to invalid IL or missing references) //IL_06d0: Unknown result type (might be due to invalid IL or missing references) //IL_06e1: Unknown result type (might be due to invalid IL or missing references) //IL_06e6: Unknown result type (might be due to invalid IL or missing references) //IL_06f0: Expected O, but got Unknown //IL_06f1: Unknown result type (might be due to invalid IL or missing references) //IL_06f6: Unknown result type (might be due to invalid IL or missing references) //IL_0700: Expected O, but got Unknown //IL_0701: Unknown result type (might be due to invalid IL or missing references) //IL_0706: Unknown result type (might be due to invalid IL or missing references) //IL_0710: Expected O, but got Unknown //IL_0711: Unknown result type (might be due to invalid IL or missing references) //IL_0722: Expected O, but got Unknown //IL_072d: Unknown result type (might be due to invalid IL or missing references) //IL_0732: Unknown result type (might be due to invalid IL or missing references) //IL_073b: Unknown result type (might be due to invalid IL or missing references) //IL_0743: Unknown result type (might be due to invalid IL or missing references) //IL_075d: Unknown result type (might be due to invalid IL or missing references) //IL_0768: Unknown result type (might be due to invalid IL or missing references) //IL_0770: Unknown result type (might be due to invalid IL or missing references) //IL_0775: Unknown result type (might be due to invalid IL or missing references) //IL_077f: Expected O, but got Unknown //IL_0785: Expected O, but got Unknown //IL_0790: Unknown result type (might be due to invalid IL or missing references) //IL_0795: Unknown result type (might be due to invalid IL or missing references) //IL_07a6: Unknown result type (might be due to invalid IL or missing references) //IL_07ab: Unknown result type (might be due to invalid IL or missing references) //IL_07b5: Expected O, but got Unknown //IL_07b6: Unknown result type (might be due to invalid IL or missing references) //IL_07bb: Unknown result type (might be due to invalid IL or missing references) //IL_07c5: Expected O, but got Unknown //IL_07c6: Unknown result type (might be due to invalid IL or missing references) //IL_07cb: Unknown result type (might be due to invalid IL or missing references) //IL_07d5: Expected O, but got Unknown //IL_07d6: Unknown result type (might be due to invalid IL or missing references) //IL_07e7: Expected O, but got Unknown //IL_07f1: Unknown result type (might be due to invalid IL or missing references) //IL_07f6: Unknown result type (might be due to invalid IL or missing references) //IL_07ff: Unknown result type (might be due to invalid IL or missing references) //IL_0807: Unknown result type (might be due to invalid IL or missing references) //IL_080f: Unknown result type (might be due to invalid IL or missing references) //IL_0815: Unknown result type (might be due to invalid IL or missing references) //IL_0825: Expected O, but got Unknown //IL_082f: Unknown result type (might be due to invalid IL or missing references) //IL_0834: Unknown result type (might be due to invalid IL or missing references) //IL_0845: Unknown result type (might be due to invalid IL or missing references) //IL_084a: Unknown result type (might be due to invalid IL or missing references) //IL_0854: Expected O, but got Unknown //IL_0855: Unknown result type (might be due to invalid IL or missing references) //IL_085a: Unknown result type (might be due to invalid IL or missing references) //IL_0864: Expected O, but got Unknown //IL_0865: Unknown result type (might be due to invalid IL or missing references) //IL_086a: Unknown result type (might be due to invalid IL or missing references) //IL_0874: Expected O, but got Unknown //IL_0875: Unknown result type (might be due to invalid IL or missing references) //IL_0886: Expected O, but got Unknown //IL_0890: Unknown result type (might be due to invalid IL or missing references) //IL_0895: Unknown result type (might be due to invalid IL or missing references) //IL_08a6: Unknown result type (might be due to invalid IL or missing references) //IL_08ab: Unknown result type (might be due to invalid IL or missing references) //IL_08b5: Expected O, but got Unknown //IL_08b6: Unknown result type (might be due to invalid IL or missing references) //IL_08bb: Unknown result type (might be due to invalid IL or missing references) //IL_08c5: Expected O, but got Unknown //IL_08c6: Unknown result type (might be due to invalid IL or missing references) //IL_08cb: Unknown result type (might be due to invalid IL or missing references) //IL_08d5: Expected O, but got Unknown //IL_08d6: Unknown result type (might be due to invalid IL or missing references) //IL_08e7: Expected O, but got Unknown //IL_08f1: Unknown result type (might be due to invalid IL or missing references) //IL_08f6: Unknown result type (might be due to invalid IL or missing references) //IL_0907: Unknown result type (might be due to invalid IL or missing references) //IL_090d: Unknown result type (might be due to invalid IL or missing references) //IL_0918: Unknown result type (might be due to invalid IL or missing references) //IL_0929: Unknown result type (might be due to invalid IL or missing references) //IL_092f: Unknown result type (might be due to invalid IL or missing references) //IL_093a: Unknown result type (might be due to invalid IL or missing references) //IL_093f: Unknown result type (might be due to invalid IL or missing references) //IL_0949: Expected O, but got Unknown //IL_094a: Unknown result type (might be due to invalid IL or missing references) //IL_094f: Unknown result type (might be due to invalid IL or missing references) //IL_0959: Expected O, but got Unknown //IL_095a: Unknown result type (might be due to invalid IL or missing references) //IL_0961: Unknown result type (might be due to invalid IL or missing references) //IL_096b: Expected O, but got Unknown //IL_0971: Expected O, but got Unknown //IL_0976: Unknown result type (might be due to invalid IL or missing references) //IL_097b: Unknown result type (might be due to invalid IL or missing references) //IL_098c: Unknown result type (might be due to invalid IL or missing references) //IL_0992: Unknown result type (might be due to invalid IL or missing references) //IL_09a2: Expected O, but got Unknown //IL_09b6: Unknown result type (might be due to invalid IL or missing references) //IL_09d9: Unknown result type (might be due to invalid IL or missing references) //IL_09fc: Unknown result type (might be due to invalid IL or missing references) _texPanel = MakeGradientV(32, new Color(0.06f, 0.07f, 0.07f, 0.985f), new Color(0.04f, 0.05f, 0.05f, 0.985f)); _texPanelSoft = MakeGradientV(32, new Color(0.13f, 0.14f, 0.13f, 0.96f), new Color(0.1f, 0.11f, 0.1f, 0.96f)); _texHeader = MakeGradientH(128, new Color(0.15f, 0.08f, 0.04f, 0.99f), new Color(0.09f, 0.1f, 0.1f, 0.99f)); _texAccent = MakeTex(ColAccent); _texAccentDim = MakeTex(ColAccentDim); _texAccentHover = MakeTex(new Color(0.96f, 0.48f, 0.12f, 1f)); _texAccentPressed = MakeTex(new Color(0.7f, 0.25f, 0.05f, 1f)); _texGreen = MakeTex(ColGreen); _texRed = MakeTex(ColRed); _texWarning = MakeTex(ColWarning); _texInfo = MakeTex(ColInfo); _texProgressBg = MakeTex(new Color(0.12f, 0.13f, 0.13f, 0.96f)); _texProgressFill = MakeGradientH(64, ColAccent, new Color(0.98f, 0.55f, 0.18f, 1f)); _texShadow = MakeTex(new Color(0f, 0f, 0f, 0.15f)); GUIStyle val = new GUIStyle(GUI.skin.label) { fontSize = 18, fontStyle = (FontStyle)1 }; val.normal.textColor = ColText; StLabel = val; GUIStyle val2 = new GUIStyle(GUI.skin.label) { fontSize = 15, wordWrap = true }; val2.normal.textColor = ColMuted; StMuted = val2; GUIStyle val3 = new GUIStyle(GUI.skin.box); val3.normal.background = _texHeader; val3.normal.textColor = ColText; val3.border = new RectOffset(0, 0, 0, 0); val3.padding = new RectOffset(14, 14, 8, 8); val3.margin = new RectOffset(0, 0, 0, 8); val3.fontSize = 18; val3.fontStyle = (FontStyle)1; val3.alignment = (TextAnchor)3; StSection = val3; GUIStyle val4 = new GUIStyle(GUI.skin.box); val4.normal.background = _texPanel; val4.normal.textColor = ColText; val4.border = new RectOffset(0, 0, 0, 0); val4.padding = new RectOffset(14, 14, 12, 12); val4.margin = new RectOffset(0, 0, 0, 10); StCard = val4; StButton = MakeBtn(_texAccentDim, ColText); StButtonOn = MakeBtn(_texAccent, ColPanel); StButtonOff = MakeBtn(_texAccentDim, ColRed); GUIStyle val5 = new GUIStyle(GUI.skin.label) { fontSize = 16, fontStyle = (FontStyle)1, alignment = (TextAnchor)5 }; val5.normal.textColor = ColAccent; StValue = val5; GUIStyle val6 = new GUIStyle(GUI.skin.button) { fontSize = 17, fontStyle = (FontStyle)1, fixedHeight = 46f, margin = new RectOffset(0, 10, 0, 0), padding = new RectOffset(12, 12, 8, 8) }; val6.normal.background = _texPanelSoft; val6.normal.textColor = ColMuted; val6.hover.background = _texAccentDim; val6.hover.textColor = ColText; val6.active.background = _texAccent; val6.active.textColor = ColPanel; StTab = val6; GUIStyle val7 = new GUIStyle(StTab); val7.normal.background = _texAccent; val7.normal.textColor = ColPanel; val7.hover.background = _texAccent; val7.hover.textColor = ColPanel; val7.active.background = _texAccent; val7.active.textColor = ColPanel; StTabActive = val7; GUIStyle val8 = new GUIStyle(GUI.skin.label) { fontSize = 12, fontStyle = (FontStyle)1 }; val8.normal.textColor = ColPanel; val8.normal.background = _texAccent; val8.alignment = (TextAnchor)4; val8.padding = new RectOffset(6, 6, 1, 1); val8.fixedHeight = 20f; StBadge = val8; GUIStyle val9 = new GUIStyle(GUI.skin.button) { fontSize = 13, fontStyle = (FontStyle)1, fixedHeight = 28f, margin = new RectOffset(0, 6, 0, 0), padding = new RectOffset(8, 8, 4, 4) }; val9.normal.background = _texAccentDim; val9.normal.textColor = ColText; val9.hover.background = _texAccent; val9.hover.textColor = ColPanel; val9.active.background = _texAccent; val9.active.textColor = ColPanel; StSmallBtn = val9; GUIStyle val10 = new GUIStyle(GUI.skin.box); val10.normal.background = _texProgressBg; val10.border = new RectOffset(0, 0, 0, 0); val10.margin = new RectOffset(0, 0, 0, 0); val10.padding = new RectOffset(0, 0, 0, 0); val10.fixedHeight = 22f; StProgressBg = val10; GUIStyle val11 = new GUIStyle(GUI.skin.box); val11.normal.background = _texProgressFill; val11.border = new RectOffset(0, 0, 0, 0); val11.margin = new RectOffset(0, 0, 0, 0); val11.padding = new RectOffset(0, 0, 0, 0); val11.fixedHeight = 22f; StProgressFill = val11; GUIStyle val12 = new GUIStyle(GUI.skin.box); val12.normal.background = _texAccentDim; val12.border = new RectOffset(0, 0, 0, 0); val12.margin = new RectOffset(0, 0, 6, 6); val12.padding = new RectOffset(0, 0, 0, 0); val12.fixedHeight = 1f; StSeparator = val12; GUIStyle val13 = new GUIStyle(GUI.skin.label) { fontSize = 13, fontStyle = (FontStyle)2 }; val13.normal.textColor = new Color(0.94f, 0.72f, 0.52f, 0.45f); val13.alignment = (TextAnchor)4; val13.padding = new RectOffset(0, 0, 8, 4); StFooter = val13; GUIStyle val14 = new GUIStyle(GUI.skin.box); val14.normal.background = _texAccent; val14.border = new RectOffset(0, 0, 0, 0); val14.margin = new RectOffset(0, 0, 0, 0); val14.padding = new RectOffset(0, 0, 0, 0); val14.fixedHeight = 2f; _stAccentLine = val14; GUIStyle val15 = new GUIStyle(GUI.skin.label) { fontSize = 18, fontStyle = (FontStyle)1, alignment = (TextAnchor)3 }; val15.normal.textColor = ColText; _stSectionTitle = val15; GUIStyle val16 = new GUIStyle(GUI.skin.box); val16.normal.background = _texAccent; val16.border = new RectOffset(0, 0, 0, 0); val16.margin = new RectOffset(0, 0, 0, 0); val16.padding = new RectOffset(0, 0, 0, 0); val16.fixedWidth = 3f; _stAccentBar = val16; GUIStyle val17 = new GUIStyle(GUI.skin.box); val17.normal.background = _texShadow; val17.border = new RectOffset(0, 0, 0, 0); val17.margin = new RectOffset(0, 0, 0, 0); val17.padding = new RectOffset(0, 0, 0, 0); val17.fixedHeight = 1f; _stCardShadow = val17; GUIStyle val18 = new GUIStyle(GUI.skin.box); val18.normal.background = _texPanelSoft; val18.normal.textColor = ColText; val18.hover.background = _texAccentDim; val18.hover.textColor = ColText; val18.border = new RectOffset(0, 0, 0, 0); val18.margin = new RectOffset(0, 0, 0, 6); val18.padding = new RectOffset(12, 12, 8, 8); _stRowStyle = val18; GUIStyle val19 = new GUIStyle(StBadge); val19.normal.background = _texAccent; val19.normal.textColor = Color.white; _stBadgeAccent = val19; _stInfoWarning = MakeInfoBox(new Color(0.92f, 0.72f, 0.22f, 0.15f)); _stInfoError = MakeInfoBox(new Color(0.84f, 0.32f, 0.26f, 0.15f)); _stInfoBlue = MakeInfoBox(new Color(0.22f, 0.62f, 0.92f, 0.12f)); } public static void DrawSectionHeader(string title, string desc = null) { GUILayout.BeginHorizontal(StSection, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(44f) }); GUILayout.Box("", _stAccentBar, (GUILayoutOption[])(object)new GUILayoutOption[2] { GUILayout.Width(3f), GUILayout.ExpandHeight(true) }); GUILayout.Label(title, _stSectionTitle, (Il2CppReferenceArray<GUILayoutOption>)null); GUILayout.EndHorizontal(); GUILayout.Box("", _stAccentLine, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(true) }); if (!string.IsNullOrWhiteSpace(desc)) { GUILayout.Label(desc, StMuted, (Il2CppReferenceArray<GUILayoutOption>)null); GUILayout.Space(4f); } } public static void BeginCard() { GUILayout.BeginVertical(StCard, (Il2CppReferenceArray<GUILayoutOption>)null); } public static void EndCard() { GUILayout.EndVertical(); GUILayout.Box("", _stCardShadow, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(true) }); GUILayout.Box("", _stAccentLine, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(true) }); } public static bool DrawBoolRow(string label, bool current, string hint = null) { GUILayout.BeginVertical(_stRowStyle, (Il2CppReferenceArray<GUILayoutOption>)null); GUILayout.BeginHorizontal((Il2CppReferenceArray<GUILayoutOption>)null); GUILayout.Label(label, StLabel, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(540f) }); GUILayout.FlexibleSpace(); GUILayout.Label(current ? "ON" : "OFF", StValue, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(52f) }); bool flag = GUILayout.Button("OFF", current ? StButton : StButtonOff, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(88f) }); bool flag2 = GUILayout.Button("ON", current ? StButtonOn : StButton, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(88f) }); GUILayout.EndHorizontal(); if (!string.IsNullOrWhiteSpace(hint)) { GUILayout.Label(hint, StMuted, (Il2CppReferenceArray<GUILayoutOption>)null); } GUILayout.EndVertical(); if (flag) { return false; } if (flag2) { return true; } return current; } public static float DrawFloatRow(string label, float current, float min, float max, string suffix = "", float step = 1f) { GUILayout.BeginVertical(_stRowStyle, (Il2CppReferenceArray<GUILayoutOption>)null); GUILayout.BeginHorizontal((Il2CppReferenceArray<GUILayoutOption>)null); GUILayout.Label(label, StLabel, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(540f) }); GUILayout.FlexibleSpace(); if (GUILayout.Button($"-{step}", StButton, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(72f) })) { current = Mathf.Clamp(current - step, min, max); } GUILayout.Label(current.ToString("F1") + suffix, StValue, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(160f) }); if (GUILayout.Button($"+{step}", StButtonOn, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(72f) })) { current = Mathf.Clamp(current + step, min, max); } GUILayout.EndHorizontal(); GUILayout.Label($"Range: {min:F0}–{max:F0}{suffix}", StMuted, (Il2CppReferenceArray<GUILayoutOption>)null); GUILayout.EndVertical(); return current; } public static int DrawIntRow(string label, int current, int min, int max, string suffix = "") { GUILayout.BeginVertical(_stRowStyle, (Il2CppReferenceArray<GUILayoutOption>)null); GUILayout.BeginHorizontal((Il2CppReferenceArray<GUILayoutOption>)null); GUILayout.Label(label, StLabel, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(540f) }); GUILayout.FlexibleSpace(); if (GUILayout.Button("-1", StButton, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(72f) })) { current = Mathf.Clamp(current - 1, min, max); } GUILayout.Label(current + suffix, StValue, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(160f) }); if (GUILayout.Button("+1", StButtonOn, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(72f) })) { current = Mathf.Clamp(current + 1, min, max); } GUILayout.EndHorizontal(); GUILayout.Label($"Range: {min}–{max}{suffix}", StMuted, (Il2CppReferenceArray<GUILayoutOption>)null); GUILayout.EndVertical(); return current; } public static bool DrawButton(string label, float width = 180f) { return GUILayout.Button(label, StButton, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(width) }); } public static bool DrawButtonGreen(string label, float width = 180f) { return GUILayout.Button(label, StButtonOn, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(width) }); } public static bool DrawButtonRed(string label, float width = 180f) { return GUILayout.Button(label, StButtonOff, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(width) }); } public static bool DrawSmallButton(string label, float width = 100f) { return GUILayout.Button(label, StSmallBtn, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(width) }); } public static void DrawStatRow(string label, string value) { GUILayout.BeginHorizontal(_stRowStyle, (Il2CppReferenceArray<GUILayoutOption>)null); GUILayout.Label(label, StLabel, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(540f) }); GUILayout.FlexibleSpace(); GUILayout.Label(value, StValue, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(300f) }); GUILayout.EndHorizontal(); } public static void DrawHeaderWithBadge(string title, string badge, Color badgeColor) { GUILayout.BeginHorizontal(StSection, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(44f) }); GUILayout.Box("", _stAccentBar, (GUILayoutOption[])(object)new GUILayoutOption[2] { GUILayout.Width(3f), GUILayout.ExpandHeight(true) }); GUILayout.Label(title, _stSectionTitle, (Il2CppReferenceArray<GUILayoutOption>)null); GUILayout.FlexibleSpace(); GUILayout.Label(badge, _stBadgeAccent, (Il2CppReferenceArray<GUILayoutOption>)null); GUILayout.EndHorizontal(); GUILayout.Space(4f); } public static void DrawBadge(string text, Color color) { GUILayout.Label(text, _stBadgeAccent, (Il2CppReferenceArray<GUILayoutOption>)null); } public static void DrawSeparator() { GUILayout.Box("", StSeparator, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(true) }); } public static void DrawFooter(string text) { GUILayout.FlexibleSpace(); GUILayout.Label(text, StFooter, (Il2CppReferenceArray<GUILayoutOption>)null); } public static void DrawProgressBar(string label, float current, float max) { //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: 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_0152: Unknown result type (might be due to invalid IL or missing references) GUILayout.BeginVertical(_stRowStyle, (Il2CppReferenceArray<GUILayoutOption>)null); GUILayout.BeginHorizontal((Il2CppReferenceArray<GUILayoutOption>)null); GUILayout.Label(label, StLabel, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(400f) }); GUILayout.FlexibleSpace(); float num = ((max > 0f) ? Mathf.Clamp01(current / max) : 0f); GUILayout.Label($"{current:F0} / {max:F0} ({num * 100f:F0}%)", StValue, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(300f) }); GUILayout.EndHorizontal(); GUILayout.Space(4f); Rect rect = GUILayoutUtility.GetRect(200f, 22f); GUI.Box(rect, "", StProgressBg); if (num > 0f) { Rect val = default(Rect); ((Rect)(ref val))..ctor(((Rect)(ref rect)).x + 2f, ((Rect)(ref rect)).y + 2f, (((Rect)(ref rect)).width - 4f) * num, ((Rect)(ref rect)).height - 4f); GUI.Box(val, "", StProgressFill); } GUILayout.EndVertical(); } public static bool DrawToggleRow(string label, bool current) { GUILayout.BeginVertical(_stRowStyle, (Il2CppReferenceArray<GUILayoutOption>)null); GUILayout.BeginHorizontal((Il2CppReferenceArray<GUILayoutOption>)null); GUILayout.Label(label, StLabel, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(540f) }); GUILayout.FlexibleSpace(); current = GUILayout.Toggle(current, current ? "ON" : "OFF", current ? StButtonOn : StButtonOff, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(100f) }); GUILayout.EndHorizontal(); GUILayout.EndVertical(); return current; } public static string DrawTextInputRow(string label, string current) { GUILayout.BeginVertical(_stRowStyle, (Il2CppReferenceArray<GUILayoutOption>)null); GUILayout.BeginHorizontal((Il2CppReferenceArray<GUILayoutOption>)null); GUILayout.Label(label, StLabel, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(300f) }); GUI.SetNextControlName("ASKAUI_TxtInput"); string result = GUILayout.TextField(current ?? "", 200, (GUILayoutOption[])(object)new GUILayoutOption[2] { GUILayout.Width(400f), GUILayout.Height(32f) }); GUILayout.EndHorizontal(); GUILayout.EndVertical(); return result; } public static void DrawInfoBox(string message, Color bgColor) { GUILayout.Box(message, _stInfoBlue, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(true) }); } public static void DrawWarningBox(string message) { GUILayout.Box(message, _stInfoWarning, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(true) }); } public static void DrawErrorBox(string message) { GUILayout.Box(message, _stInfoError, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(true) }); } public static void DrawInfoBox(string message) { GUILayout.Box(message, _stInfoBlue, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(true) }); } private static GUIStyle MakeInfoBox(Color bgColor) { //IL_000b: 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_0016: 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_0028: 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_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Expected O, but got Unknown //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Expected O, but got Unknown //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Expected O, but got Unknown //IL_0068: 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_007a: Expected O, but got Unknown GUIStyle val = new GUIStyle(GUI.skin.box); val.normal.background = MakeTex(bgColor); val.normal.textColor = ColText; val.border = new RectOffset(0, 0, 0, 0); val.padding = new RectOffset(14, 14, 10, 10); val.margin = new RectOffset(0, 0, 0, 10); val.fontSize = 15; val.wordWrap = true; return val; } private static GUIStyle MakeBtn(Texture2D bg, Color text) { //IL_000a: 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_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0020: 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_0031: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Expected O, but got Unknown //IL_003c: 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_004d: Expected O, but got Unknown //IL_004e: 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_0068: 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_007f: 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_0097: 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_00a5: Expected O, but got Unknown GUIStyle val = new GUIStyle(GUI.skin.button) { fontSize = 14, fontStyle = (FontStyle)1, fixedHeight = 36f, margin = new RectOffset(0, 8, 0, 0), padding = new RectOffset(10, 10, 6, 6) }; val.normal.background = bg; val.normal.textColor = text; val.hover.background = _texAccentHover; val.hover.textColor = text; val.active.background = _texAccentPressed; val.active.textColor = text; return val; } private static Texture2D MakeTex(Color color) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Expected O, but got Unknown //IL_000c: Unknown result type (might be due to invalid IL or missing references) Texture2D val = new Texture2D(1, 1); val.SetPixel(0, 0, color); val.Apply(); return val; } private static Texture2D MakeGradientH(int width, Color left, Color right) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Expected O, but got Unknown //IL_0021: 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_0024: Unknown result type (might be due to invalid IL or missing references) Texture2D val = new Texture2D(width, 1); ((Texture)val).wrapMode = (TextureWrapMode)1; for (int i = 0; i < width; i++) { float num = (float)i / (float)(width - 1); val.SetPixel(i, 0, Color.Lerp(left, right, num)); } val.Apply(); return val; } private static Texture2D MakeGradientV(int height, Color top, Color bottom) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Expected O, but got Unknown //IL_0021: 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_0024: Unknown result type (might be due to invalid IL or missing references) Texture2D val = new Texture2D(1, height); ((Texture)val).wrapMode = (TextureWrapMode)1; for (int i = 0; i < height; i++) { float num = (float)i / (float)(height - 1); val.SetPixel(0, i, Color.Lerp(top, bottom, num)); } val.Apply(); return val; } } public class ASKAUIModInfo { public string Name { get; } public string Category { get; } public Action Draw { get; } public ASKAUIModInfo(string name, Action draw, string category = "General") { Name = name; Draw = draw; Category = category; } } public static class ASKAUIModRegistry { internal static readonly ManualLogSource Logger = Logger.CreateLogSource("AskaUI"); private static readonly List<ASKAUIModInfo> _mods = new List<ASKAUIModInfo>(); private static readonly Dictionary<string, List<ConfigEntryBase>> _configs = new Dictionary<string, List<ConfigEntryBase>>(); public static IReadOnlyList<(string Name, Action Draw)> Panels { get { List<(string, Action)> list = new List<(string, Action)>(); foreach (ASKAUIModInfo mod in _mods) { list.Add((mod.Name, mod.Draw)); } return list; } } public static IReadOnlyList<ASKAUIModInfo> Mods => _mods; public static IReadOnlyDictionary<string, List<ConfigEntryBase>> RegisteredConfigs => _configs; public static void RegisterPanel(string name, Action drawCallback) { RegisterPanel(name, drawCallback, "General"); } public static void RegisterPanel(string name, Action drawCallback, string category) { //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Expected O, but got Unknown //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Expected O, but got Unknown if (string.IsNullOrWhiteSpace(name) || drawCallback == null) { return; } bool flag = default(bool); BepInExDebugLogInterpolatedStringHandler val; for (int i = 0; i < _mods.Count; i++) { if (string.Equals(_mods[i].Name, name, StringComparison.OrdinalIgnoreCase)) { _mods[i] = new ASKAUIModInfo(name, drawCallback, category); val = new BepInExDebugLogInterpolatedStringHandler(45, 2, ref flag); if (flag) { ((BepInExLogInterpolatedStringHandler)val).AppendLiteral("[ASKAUI] Panel '"); ((BepInExLogInterpolatedStringHandler)val).AppendFormatted<string>(name); ((BepInExLogInterpolatedStringHandler)val).AppendLiteral("' re-registered (category: "); ((BepInExLogInterpolatedStringHandler)val).AppendFormatted<string>(category); ((BepInExLogInterpolatedStringHandler)val).AppendLiteral(")."); } Logger.LogDebug(val); return; } } _mods.Add(new ASKAUIModInfo(name, drawCallback, category)); val = new BepInExDebugLogInterpolatedStringHandler(42, 2, ref flag); if (flag) { ((BepInExLogInterpolatedStringHandler)val).AppendLiteral("[ASKAUI] Panel '"); ((BepInExLogInterpolatedStringHandler)val).AppendFormatted<string>(name); ((BepInExLogInterpolatedStringHandler)val).AppendLiteral("' registered (category: "); ((BepInExLogInterpolatedStringHandler)val).AppendFormatted<string>(category); ((BepInExLogInterpolatedStringHandler)val).AppendLiteral(")."); } Logger.LogDebug(val); } public static void UnregisterPanel(string name) { _mods.RemoveAll((ASKAUIModInfo m) => string.Equals(m.Name, name, StringComparison.OrdinalIgnoreCase)); } public static void RegisterConfig(string modName, ConfigEntryBase entry) { //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Expected O, but got Unknown if (!_configs.ContainsKey(modName)) { _configs[modName] = new List<ConfigEntryBase>(); } _configs[modName].Add(entry); bool flag = default(bool); BepInExInfoLogInterpolatedStringHandler val = new BepInExInfoLogInterpolatedStringHandler(33, 2, ref flag); if (flag) { ((BepInExLogInterpolatedStringHandler)val).AppendLiteral("[ASKAUI] Config registered for "); ((BepInExLogInterpolatedStringHandler)val).AppendFormatted<string>(modName); ((BepInExLogInterpolatedStringHandler)val).AppendLiteral(": "); ((BepInExLogInterpolatedStringHandler)val).AppendFormatted<string>(entry.Definition.Key); } Logger.LogInfo(val); } } public class ASKAUIOverlay : MonoBehaviour { private const float SidebarW = 300f; private const float HeaderH = 80f; private const float FooterH = 36f; private const float TabH = 52f; private const float CatLabelH = 30f; private const float SearchH = 40f; private static readonly Color C_Bg = new Color(0.06f, 0.07f, 0.07f, 0.97f); private static readonly Color C_Sidebar = new Color(0.04f, 0.045f, 0.045f, 1f); private static readonly Color C_Header = new Color(0.05f, 0.06f, 0.06f, 1f); private static readonly Color C_Content = new Color(0.07f, 0.08f, 0.08f, 1f); private static readonly Color C_Divider = new Color(0.18f, 0.19f, 0.19f, 1f); private static readonly Color C_Accent = new Color(0.92f, 0.38f, 0.08f, 1f); private static readonly Color C_AccentDim = new Color(0.22f, 0.23f, 0.23f, 1f); private static readonly Color C_TabHover = new Color(0.14f, 0.15f, 0.15f, 1f); private static readonly Color C_TabActive = new Color(0.92f, 0.38f, 0.08f, 1f); private static readonly Color C_CatLabel = new Color(0.3f, 0.31f, 0.31f, 1f); private static readonly Color C_Text = new Color(1f, 0.6f, 0.26f, 1f); private static readonly Color C_TextMuted = new Color(0.7f, 0.65f, 0.58f, 1f); private static readonly Color C_TextDim = new Color(0.5f, 0.48f, 0.44f, 1f); private static readonly Color C_Green = new Color(0.33f, 0.82f, 0.46f, 1f); private static readonly Color C_SearchBg = new Color(0.11f, 0.12f, 0.12f, 1f); private static readonly Color C_ScrollThumb = new Color(0.25f, 0.26f, 0.26f, 1f); private bool _visible; private int _activeTab; private Vector2 _contentScroll; private Vector2 _sidebarScroll; private string _searchText = ""; private bool _searchFocused; private List<int> _filteredIndices = new List<int>(); private List<int> _allIndices = new List<int>(); private int _lastModCount; private int _probeIndex; private bool _savedCursor; private CursorLockMode _savedLock; private GameObject _blockerRoot; private readonly List<InputActionMap> _suppressed = new List<InputActionMap>(); private Texture2D _tBg; private Texture2D _tSidebar; private Texture2D _tHeader; private Texture2D _tContent; private Texture2D _tAccent; private Texture2D _tAccentDim; private Texture2D _tTabHover; private Texture2D _tTabActive; private Texture2D _tCatLabel; private Texture2D _tDivider; private Texture2D _tSearchBg; private Texture2D _tScrollThumb; private GUIStyle _stTitle; private GUIStyle _stSubtitle; private GUIStyle _stWatermark; private GUIStyle _stTabNormal; private GUIStyle _stTabActive; private GUIStyle _stCatLabel; private GUIStyle _stLabel; private GUIStyle _stMuted; private GUIStyle _stDim; private GUIStyle _stContentTitle; private GUIStyle _stSearch; private GUIStyle _stSearchPlaceholder; private GUIStyle _stNoMods; private GUIStyle _stModCount; private GUIStyle _stCloseBtn; private GUIStyle _stFooter; private bool _stylesBuilt; private bool _pendingFirstRunJump; private float _firstRunPromptTimer; private const float FirstRunPromptDelaySeconds = 5f; private const int HubWindowId = 1095977813; private const float TitleBarH = 56f; private static ManualLogSource Log => ASKAUIModRegistry.Logger; public ASKAUIOverlay(IntPtr ptr) : base(ptr) { } private void Awake() { CreateBlocker(); LoadPrefs(); BuildFilteredList(); Log.LogInfo((object)"[ASKAUI] Overlay ready. Press HOME to open."); } private void Start() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Expected O, but got Unknown ASKAUIPlugin.RunAutoDiscovery(); BuildFilteredList(); ManualLogSource log = Log; bool flag = default(bool); BepInExInfoLogInterpolatedStringHandler val = new BepInExInfoLogInterpolatedStringHandler(50, 1, ref flag); if (flag) { ((BepInExLogInterpolatedStringHandler)val).AppendLiteral("[ASKAUI] Auto-discovery complete. "); ((BepInExLogInterpolatedStringHandler)val).AppendFormatted<int>(ASKAUIModRegistry.Mods.Count); ((BepInExLogInterpolatedStringHandler)val).AppendLiteral(" panel(s) found."); } log.LogInfo(val); MaybeShowFirstRunKeybindPrompt(); } private void MaybeShowFirstRunKeybindPrompt() { //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Expected O, but got Unknown try { if (ToggleKeybind.CfgHasSeenPrompt != null && !ToggleKeybind.CfgHasSeenPrompt.Value) { ToggleKeybind.CfgHasSeenPrompt.Value = true; _pendingFirstRunJump = true; } } catch (Exception ex) { ManualLogSource log = Log; bool flag = default(bool); BepInExWarningLogInterpolatedStringHandler val = new BepInExWarningLogInterpolatedStringHandler(47, 1, ref flag); if (flag) { ((BepInExLogInterpolatedStringHandler)val).AppendLiteral("[ASKAUI] First-run keybind prompt flag failed: "); ((BepInExLogInterpolatedStringHandler)val).AppendFormatted<string>(ex.Message); } log.LogWarning(val); } } private void OnDestroy() { if ((Object)(object)_blockerRoot != (Object)null) { Object.Destroy((Object)(object)_blockerRoot); } SavePrefs(); } private void Update() { //IL_01a9: Unknown result type (might be due to invalid IL or missing references) //IL_01ae: Unknown result type (might be due to invalid IL or missing references) //IL_01e8: Unknown result type (might be due to invalid IL or missing references) //IL_01ed: Unknown result type (might be due to invalid IL or missing references) PerformanceMonitor.Update(); if (ToggleKeybind.IsCapturing) { ToggleKeybind.PumpCapture(); return; } if (ToggleKeybind.WasTriggeredThisFrame()) { SetVisible(!_visible); } if (_pendingFirstRunJump && !_visible) { _firstRunPromptTimer += Time.unscaledDeltaTime; if (_firstRunPromptTimer >= 5f) { SetVisible(show: true); } } if (!_visible) { return; } if (Input.GetKeyDown((KeyCode)27)) { SetVisible(show: false); return; } IReadOnlyList<ASKAUIModInfo> mods = ASKAUIModRegistry.Mods; if (mods.Count <= 0 || Keyboard.current == null) { return; } if (mods.Count != _lastModCount) { _lastModCount = mods.Count; _allIndices.Clear(); for (int i = 0; i < mods.Count; i++) { _allIndices.Add(i); } } List<int> list = ((_filteredIndices.Count > 0) ? _filteredIndices : _allIndices); if (list.Count > 0) { int num = list.IndexOf(_activeTab); if (((ButtonControl)Keyboard.current.leftArrowKey).wasPressedThisFrame) { num = (num - 1 + list.Count) % list.Count; _activeTab = list[num]; _contentScroll = Vector2.zero; } if (((ButtonControl)Keyboard.current.rightArrowKey).wasPressedThisFrame) { num = (num + 1) % list.Count; _activeTab = list[num]; _contentScroll = Vector2.zero; } } } private void LateUpdate() { if (_visible) { Cursor.visible = true; Cursor.lockState = (CursorLockMode)0; SuppressInput(); } } private void OnGUI() { //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) if (_visible) { EnsureStyles(); GUI.depth = -1000; GUI.ModalWindow(1095977813, new Rect(0f, 0f, (float)Screen.width, (float)Screen.height), WindowFunction.op_Implicit((Action<int>)DrawHub), GUIContent.none, GUIStyle.none); } } private void DrawHub(int id) { //IL_001c: 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_0062: 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_006f: 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_007f: 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) float num = Screen.width; float num2 = Screen.height; DrawRect(new Rect(0f, 0f, num, num2), new Color(0f, 0f, 0f, 0.55f)); float num3 = 24f; Rect val = default(Rect); ((Rect)(ref val))..ctor(num3, num3, num - num3 * 2f, num2 - num3 * 2f); DrawRect(val, C_Bg); DrawHeader(val); DrawSidebar(val); DrawContentPane(val); DrawFooter(val); ProbeMods(); } private void ProbeMods() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Invalid comparison between Unknown and I4 //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Invalid comparison between Unknown and I4 //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Invalid comparison between Unknown and I4 //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Invalid comparison between Unknown and I4 EventType type = Event.current.type; if ((int)type != 8 && (int)type != 7) { return; } IReadOnlyList<ASKAUIModInfo> mods = ASKAUIModRegistry.Mods; if (mods == null || mods.Count == 0) { return; } if (_probeIndex >= mods.Count) { _probeIndex = 0; } if (_probeIndex == _activeTab) { if ((int)type == 7) { _probeIndex = (_probeIndex + 1) % mods.Count; } return; } ASKAUIModInfo aSKAUIModInfo = mods[_probeIndex]; GUILayout.BeginArea(new Rect(-100000f, -100000f, 99990f, 99990f)); Stopwatch stopwatch = Stopwatch.StartNew(); try { aSKAUIModInfo.Draw?.Invoke(); } catch { } finally { stopwatch.Stop(); PerformanceMonitor.RecordModDraw(aSKAUIModInfo.Name, stopwatch.Elapsed.TotalMilliseconds); } GUILayout.EndArea(); if ((int)type == 7) { _probeIndex = (_probeIndex + 1) % mods.Count; } } private void DrawHeader(Rect hub) { //IL_0023: 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_0056: 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_0094: 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_0107: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: 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_0131: Unknown result type (might be due to invalid IL or missing references) //IL_0182: Unknown result type (might be due to invalid IL or missing references) //IL_020a: Unknown result type (might be due to invalid IL or missing references) //IL_0214: Expected O, but got Unknown //IL_020f: 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_022f: Unknown result type (might be due to invalid IL or missing references) //IL_023b: 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_0254: Unknown result type (might be due to invalid IL or missing references) //IL_0260: Unknown result type (might be due to invalid IL or missing references) //IL_027a: Unknown result type (might be due to invalid IL or missing references) //IL_028c: Unknown result type (might be due to invalid IL or missing references) //IL_02a0: Unknown result type (might be due to invalid IL or missing references) Rect r = default(Rect); ((Rect)(ref r))..ctor(((Rect)(ref hub)).x, ((Rect)(ref hub)).y, ((Rect)(ref hub)).width, 80f); DrawRect(r, C_Header); DrawRect(new Rect(((Rect)(ref hub)).x, ((Rect)(ref hub)).y + 80f - 2f, ((Rect)(ref hub)).width, 2f), C_Accent); float x = ((Rect)(ref hub)).x; float xMax = ((Rect)(ref hub)).xMax; GUI.Label(new Rect(x + 20f, ((Rect)(ref hub)).y + 8f, 500f, 38f), "ASKA MOD HUB", _stTitle); Rect val = default(Rect); ((Rect)(ref val))..ctor(xMax - 16f - 28f, ((Rect)(ref hub)).y + 8f, 28f, 28f); GUI.color = (Color)(((Rect)(ref val)).Contains(Event.current.mousePosition) ? new Color(0.9f, 0.3f, 0.2f, 1f) : C_TextMuted); if (GUI.Button(val, "✕", _stCloseBtn)) { SetVisible(show: false); } GUI.color = Color.white; float num = xMax - 20f - 28f - 12f - 220f; if (num > x + 540f) { GUI.Label(new Rect(num, ((Rect)(ref hub)).y + 12f, 220f, 22f), "DEATH // DEATHPHANTOMG49", _stWatermark); } int count = ASKAUIModRegistry.Mods.Count; string text = $" {count} mod{((count != 1) ? "s" : "")} loaded "; Vector2 val2 = _stModCount.CalcSize(new GUIContent(text)); float num2 = ((Rect)(ref hub)).y + 54f; DrawRect(new Rect(x + 22f, num2, val2.x, 18f), C_Accent); GUI.Label(new Rect(x + 22f, num2, val2.x, 18f), text, _stModCount); GUI.Label(new Rect(x + 26f + val2.x, num2, xMax - (x + 26f + val2.x) - 16f, 18f), ToggleKeybind.CurrentComboDisplay + " / ESC to close · ← → navigate tabs", _stSubtitle); } private void DrawSidebar(Rect hub) { //IL_0039: 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_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) //IL_0090: 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_00bd: 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_00ca: 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_0198: Unknown result type (might be due to invalid IL or missing references) //IL_019e: Invalid comparison between Unknown and I4 //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_01e3: Unknown result type (might be due to invalid IL or missing references) //IL_01e9: Invalid comparison between Unknown and I4 //IL_0211: Unknown result type (might be due to invalid IL or missing references) //IL_0217: Invalid comparison between Unknown and I4 //IL_025b: Unknown result type (might be due to invalid IL or missing references) //IL_0262: Invalid comparison between Unknown and I4 //IL_02af: Unknown result type (might be due to invalid IL or missing references) //IL_02b6: Invalid comparison between Unknown and I4 //IL_0495: Unknown result type (might be due to invalid IL or missing references) //IL_0498: 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_04bc: Unknown result type (might be due to invalid IL or missing references) //IL_04c1: Unknown result type (might be due to invalid IL or missing references) //IL_04f8: Unknown result type (might be due to invalid IL or missing references) //IL_04fd: Unknown result type (might be due to invalid IL or missing references) //IL_051f: Unknown result type (might be due to invalid IL or missing references) //IL_0709: Unknown result type (might be due to invalid IL or missing references) //IL_05dc: Unknown result type (might be due to invalid IL or missing references) //IL_05a0: Unknown result type (might be due to invalid IL or missing references) //IL_05a5: Unknown result type (might be due to invalid IL or missing references) //IL_05c2: Unknown result type (might be due to invalid IL or missing references) //IL_05c7: 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_05ee: Unknown result type (might be due to invalid IL or missing references) //IL_05f0: Unknown result type (might be due to invalid IL or missing references) //IL_0647: 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) //IL_067e: Unknown result type (might be due to invalid IL or missing references) //IL_0683: Unknown result type (might be due to invalid IL or missing references) float num = ((Rect)(ref hub)).y + 80f; float num2 = ((Rect)(ref hub)).height - 80f - 36f; Rect r = default(Rect); ((Rect)(ref r))..ctor(((Rect)(ref hub)).x, num, 300f, num2); DrawRect(r, C_Sidebar); DrawRect(new Rect(((Rect)(ref r)).xMax - 1f, num, 1f, num2), C_Divider); Rect r2 = default(Rect); ((Rect)(ref r2))..ctor(((Rect)(ref r)).x + 10f, num + 10f, 280f, 40f); DrawRect(r2, C_SearchBg); DrawRect(new Rect(((Rect)(ref r2)).x, ((Rect)(ref r2)).yMax - 1f, ((Rect)(ref r2)).width, 1f), _searchFocused ? C_Accent : C_Divider); string searchText = _searchText; bool flag = string.IsNullOrEmpty(_searchText); string text = ((!flag) ? (_searchText + ((_searchFocused && Mathf.FloorToInt(Time.time * 2f) % 2 == 0) ? "|" : "")) : (_searchFocused ? "|" : " \ud83d\udd0d Search mods…")); GUI.Label(new Rect(((Rect)(ref r2)).x + 8f, ((Rect)(ref r2)).y + 5f, ((Rect)(ref r2)).width - 16f, 22f), text, (flag && !_searchFocused) ? _stSearchPlaceholder : _stSearch); if ((int)Event.current.type == 0) { _searchFocused = ((Rect)(ref r2)).Contains(Event.current.mousePosition); if (_searchFocused) { Event.current.Use(); } } if (_searchFocused && (int)Event.current.type == 4) { char character = Event.current.character; bool flag2 = false; if ((character == '\b' || (int)Event.current.keyCode == 8) && _searchText.Length > 0) { string searchText2 = _searchText; _searchText = searchText2.Substring(0, searchText2.Length - 1); flag2 = true; } else if ((int)Event.current.keyCode == 127) { _searchText = ""; flag2 = true; } else if (character >= ' ') { _searchText += character; flag2 = true; } else if ((int)Event.current.keyCode == 27)