using System; using System.Collections.Generic; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; 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 HarmonyLib; using Il2CppScheduleOne.DevUtilities; using Il2CppScheduleOne.Economy; using Il2CppScheduleOne.Money; using Il2CppScheduleOne.PlayerScripts; using Il2CppScheduleOne.Quests; using MelonLoader; using MelonLoader.Utils; using Microsoft.CodeAnalysis; using Newtonsoft.Json; using ScheduleITeleportMenu; using UnityEngine; using UnityEngine.InputSystem; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: MelonInfo(typeof(Main), "Teleport Menu", "3.0.0", "MrTibbz", null)] [assembly: MelonGame("TVGS", "Schedule I")] [assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")] [assembly: AssemblyCompany("TeleportMenu")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("TeleportMenu")] [assembly: AssemblyTitle("TeleportMenu")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class NullableContextAttribute : Attribute { public readonly byte Flag; public NullableContextAttribute(byte P_0) { Flag = P_0; } } } namespace ScheduleITeleportMenu { public class Main : MelonMod { private enum MenuState { Main, SubMenu, Favorites, Settings, Statistics, SettingsKeybinds, SettingsAppearance, SettingsCost, SettingsToggles, SettingsCategories, SettingsPresets, SettingsData } [Serializable] public class TeleportLocation { public string Name = ""; public SerializableVector3 Position = new SerializableVector3(Vector3.zero); public bool IsFavorite = false; public string Category = ""; } [Serializable] public class SerializableVector3 { public float x; public float y; public float z; public SerializableVector3(Vector3 v) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) x = v.x; y = v.y; z = v.z; } public Vector3 ToVector3() { //IL_0013: 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_001b: Unknown result type (might be due to invalid IL or missing references) return new Vector3(x, y, z); } } [Serializable] private class CombinedData { public List SavedLocations = new List(); public List FavoriteLocations = new List(); public SerializableVector3 SafetyTeleportPosition = new SerializableVector3(Vector3.zero); public ModSettings Settings = new ModSettings(); public TeleportStats Stats = new TeleportStats(); } [Serializable] public class TeleportStats { public int TotalTeleports = 0; public int TotalMoneySpent = 0; public Dictionary UsageCounts = new Dictionary(); } [HarmonyPatch(typeof(Customer), "ContractAccepted")] private class Patch_ContractAccepted { private static void Postfix(Customer __instance, Contract __result, EDealWindow window, bool trackContract, Dealer dealer) { //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) if ((trackContract || IsDealerThePlayer(dealer)) && !((Object)(object)__result == (Object)null) && !((Object)(object)__result.DeliveryLocation == (Object)null)) { Vector3 position = ((Component)__result.DeliveryLocation).transform.position; position.y += 1f; object obj = ((Quest)__result).Title; if (obj == null) { DeliveryLocation deliveryLocation = __result.DeliveryLocation; obj = ((deliveryLocation != null) ? ((Object)deliveryLocation).name : null) ?? "Deal"; } string dealName = (string)obj; if (!Instance.allLocations.Any((TeleportLocation l) => l.Name == dealName && l.Category == "Active Deals")) { Instance.AddActiveDealTeleport(new TeleportLocation { Name = dealName, Position = new SerializableVector3(position), Category = "Active Deals" }); } } } } [HarmonyPatch(typeof(Customer), "ProcessHandover")] private class Patch_ProcessHandover { private static void Postfix(Contract contract) { if (!((Object)(object)contract == (Object)null)) { string dealName = ((Quest)contract).Title; if (Instance.allLocations.Any((TeleportLocation l) => l.Name == (dealName ?? "") && l.Category == "Active Deals")) { Instance.RemoveActiveDealTeleport(dealName ?? ""); } } } } [HarmonyPatch(typeof(Input), "GetKey", new Type[] { typeof(KeyCode) })] private class Patch_GetKey { private static bool Prefix(ref bool __result) { if (Instance == null || !Instance.isMenuOpen || suppressInputBlock) { return true; } __result = false; return false; } } [HarmonyPatch(typeof(Input), "GetKeyDown", new Type[] { typeof(KeyCode) })] private class Patch_GetKeyDown { private static bool Prefix(ref bool __result) { if (Instance == null || !Instance.isMenuOpen || suppressInputBlock) { return true; } __result = false; return false; } } [HarmonyPatch(typeof(Input), "GetKeyUp", new Type[] { typeof(KeyCode) })] private class Patch_GetKeyUp { private static bool Prefix(ref bool __result) { if (Instance == null || !Instance.isMenuOpen || suppressInputBlock) { return true; } __result = false; return false; } } [HarmonyPatch(typeof(Input), "GetKey", new Type[] { typeof(string) })] private class Patch_GetKeyString { private static bool Prefix(ref bool __result) { if (Instance == null || !Instance.isMenuOpen || suppressInputBlock) { return true; } __result = false; return false; } } [HarmonyPatch(typeof(Input), "GetKeyDown", new Type[] { typeof(string) })] private class Patch_GetKeyDownString { private static bool Prefix(ref bool __result) { if (Instance == null || !Instance.isMenuOpen || suppressInputBlock) { return true; } __result = false; return false; } } [HarmonyPatch(typeof(Input), "GetKeyUp", new Type[] { typeof(string) })] private class Patch_GetKeyUpString { private static bool Prefix(ref bool __result) { if (Instance == null || !Instance.isMenuOpen || suppressInputBlock) { return true; } __result = false; return false; } } [HarmonyPatch(typeof(Input), "GetMouseButton")] private class Patch_GetMouseButton { private static bool Prefix(ref bool __result) { if (Instance == null || !Instance.isMenuOpen || suppressInputBlock) { return true; } __result = false; return false; } } [HarmonyPatch(typeof(Input), "GetMouseButtonDown")] private class Patch_GetMouseButtonDown { private static bool Prefix(ref bool __result) { if (Instance == null || !Instance.isMenuOpen || suppressInputBlock) { return true; } __result = false; return false; } } [HarmonyPatch(typeof(Input), "GetMouseButtonUp")] private class Patch_GetMouseButtonUp { private static bool Prefix(ref bool __result) { if (Instance == null || !Instance.isMenuOpen || suppressInputBlock) { return true; } __result = false; return false; } } public class ModSettings { public KeyCode menuKey = (KeyCode)283; public KeyCode safetyTeleportKey = (KeyCode)284; public KeyCode undoTeleportKey = (KeyCode)285; public int titleFontSize = 19; public int titleTextColorR = 255; public int titleTextColorG = 255; public int titleTextColorB = 255; public int titleBarColorR = 99; public int titleBarColorG = 102; public int titleBarColorB = 241; public int titleBarColorA = 255; public int textColorR = 226; public int textColorG = 228; public int textColorB = 235; public int fontSize = 14; public bool bold = false; public int buttonHoverR = 129; public int buttonHoverG = 140; public int buttonHoverB = 248; public int accentBarR = 99; public int accentBarG = 102; public int accentBarB = 241; public int accentBarA = 255; public int backgroundR = 24; public int backgroundG = 26; public int backgroundB = 32; public int backgroundA = 248; public bool chargeForTeleport = false; public int teleportCost = 30; public bool enableDistanceCost = false; public int distanceCostPercent = 3; public bool enableTeleportCooldown = false; public float teleportCooldownSeconds = 3f; public bool enableTeleportFade = false; public float teleportFadeDuration = 0.4f; public int cornerRadius = 0; public int rowSpacing = 45; public int scrollbarWidth = 8; public bool enableResizeGrip = true; public bool enableCloseButton = true; public bool showBreadcrumb = true; public bool showFavoriteStar = true; public bool enableSafetyTeleportKey = true; public bool enableUndoTeleportKey = true; public bool sortByDistance = false; public List hiddenCategories = new List(); public List categoryOrder = new List(); public Dictionary categoryDisplayNames = new Dictionary(); public List customCategories = new List(); public List themePresets = new List(); } [Serializable] public class ThemePreset { public string Name = ""; public int titleFontSize; public int titleTextColorR; public int titleTextColorG; public int titleTextColorB; public int titleBarColorR; public int titleBarColorG; public int titleBarColorB; public int titleBarColorA; public int textColorR; public int textColorG; public int textColorB; public int fontSize; public bool bold; public int buttonHoverR; public int buttonHoverG; public int buttonHoverB; public int accentBarR; public int accentBarG; public int accentBarB; public int accentBarA; public int backgroundR; public int backgroundG; public int backgroundB; public int backgroundA; public int cornerRadius; public int rowSpacing; public int scrollbarWidth; } private string? waitingForKey = null; private bool isMenuOpen = false; private Rect windowRect = new Rect(200f, 100f, 400f, 500f); private Vector2 scrollPosition; private bool isResizing = false; private Vector2 resizeStartMousePosition; private Vector2 resizeStartWindowSize; private bool isDragging = false; private Vector2 dragOffset; private bool cursorWasVisible; private CursorLockMode cursorWasLockState; private static bool suppressInputBlock = false; private Keyboard? blockedKeyboard; private Mouse? blockedMouse; private readonly float x = 15f; private MenuState currentMenu = MenuState.Main; private string currentCategory = ""; private string newLocationName = ""; private string? renamingCategory = null; private string categoryRenameBuffer = ""; private string presetNameBuffer = ""; private string searchQuery = ""; private string? pendingConfirmId = null; private readonly List teleportHistory = new List(); private const int MaxTeleportHistory = 10; private float lastTeleportTime = -999f; private Action? pendingFadeAction = null; private float fadeElapsed = 0f; private float fadeAlpha = 0f; private bool fadeActionExecuted = false; private string combinedSavePath = null; public static Main Instance = null; private SerializableVector3 safetyTeleportPosition = new SerializableVector3(Vector3.zero); private List savedLocations = new List(); private List favoriteLocations = new List(); private List allLocations = new List(); private ModSettings settings = new ModSettings(); private TeleportStats stats = new TeleportStats(); private static readonly List BuiltInThemePresets = new List { new ThemePreset { Name = "Indigo (Default)", titleFontSize = 19, titleTextColorR = 255, titleTextColorG = 255, titleTextColorB = 255, titleBarColorR = 99, titleBarColorG = 102, titleBarColorB = 241, titleBarColorA = 255, textColorR = 226, textColorG = 228, textColorB = 235, fontSize = 14, bold = false, buttonHoverR = 129, buttonHoverG = 140, buttonHoverB = 248, accentBarR = 99, accentBarG = 102, accentBarB = 241, accentBarA = 255, backgroundR = 24, backgroundG = 26, backgroundB = 32, backgroundA = 248, cornerRadius = 0, rowSpacing = 45, scrollbarWidth = 8 }, new ThemePreset { Name = "Midnight Ocean", titleFontSize = 19, titleTextColorR = 235, titleTextColorG = 245, titleTextColorB = 248, titleBarColorR = 16, titleBarColorG = 96, titleBarColorB = 122, titleBarColorA = 255, textColorR = 210, textColorG = 230, textColorB = 235, fontSize = 14, bold = false, buttonHoverR = 34, buttonHoverG = 150, buttonHoverB = 178, accentBarR = 22, accentBarG = 168, accentBarB = 198, accentBarA = 255, backgroundR = 10, backgroundG = 20, backgroundB = 26, backgroundA = 248, cornerRadius = 0, rowSpacing = 45, scrollbarWidth = 8 }, new ThemePreset { Name = "Crimson", titleFontSize = 19, titleTextColorR = 255, titleTextColorG = 240, titleTextColorB = 240, titleBarColorR = 165, titleBarColorG = 40, titleBarColorB = 50, titleBarColorA = 255, textColorR = 235, textColorG = 222, textColorB = 222, fontSize = 14, bold = false, buttonHoverR = 205, buttonHoverG = 72, buttonHoverB = 82, accentBarR = 195, accentBarG = 52, accentBarB = 62, accentBarA = 255, backgroundR = 28, backgroundG = 18, backgroundB = 20, backgroundA = 248, cornerRadius = 0, rowSpacing = 45, scrollbarWidth = 8 }, new ThemePreset { Name = "Forest", titleFontSize = 19, titleTextColorR = 240, titleTextColorG = 250, titleTextColorB = 240, titleBarColorR = 42, titleBarColorG = 114, titleBarColorB = 64, titleBarColorA = 255, textColorR = 220, textColorG = 235, textColorB = 220, fontSize = 14, bold = false, buttonHoverR = 74, buttonHoverG = 156, buttonHoverB = 94, accentBarR = 62, accentBarG = 145, accentBarB = 84, accentBarA = 255, backgroundR = 16, backgroundG = 26, backgroundB = 18, backgroundA = 248, cornerRadius = 0, rowSpacing = 45, scrollbarWidth = 8 }, new ThemePreset { Name = "Sunset", titleFontSize = 19, titleTextColorR = 255, titleTextColorG = 245, titleTextColorB = 232, titleBarColorR = 214, titleBarColorG = 124, titleBarColorB = 42, titleBarColorA = 255, textColorR = 245, textColorG = 230, textColorB = 215, fontSize = 14, bold = false, buttonHoverR = 235, buttonHoverG = 154, buttonHoverB = 74, accentBarR = 224, accentBarG = 134, accentBarB = 52, accentBarA = 255, backgroundR = 30, backgroundG = 22, backgroundB = 16, backgroundA = 248, cornerRadius = 0, rowSpacing = 45, scrollbarWidth = 8 }, new ThemePreset { Name = "Monochrome", titleFontSize = 19, titleTextColorR = 240, titleTextColorG = 240, titleTextColorB = 240, titleBarColorR = 70, titleBarColorG = 70, titleBarColorB = 70, titleBarColorA = 255, textColorR = 225, textColorG = 225, textColorB = 225, fontSize = 14, bold = false, buttonHoverR = 120, buttonHoverG = 120, buttonHoverB = 120, accentBarR = 165, accentBarG = 165, accentBarB = 165, accentBarA = 255, backgroundR = 20, backgroundG = 20, backgroundB = 20, backgroundA = 248, cornerRadius = 0, rowSpacing = 45, scrollbarWidth = 8 } }; private const float CloseButtonSize = 20f; private const float ResizeGripSize = 16f; private static readonly Color AccentGold = new Color(0.85f, 0.68f, 0.15f); private static readonly Color DangerRed = new Color(0.7f, 0.24f, 0.24f); private static readonly Dictionary solidTextureCache = new Dictionary(); private static readonly Dictionary roundedTextureCache = new Dictionary(); private static readonly GUIStyle blitStyle = new GUIStyle { padding = new RectOffset(0, 0, 0, 0), border = new RectOffset(0, 0, 0, 0), margin = new RectOffset(0, 0, 0, 0) }; private int cachedStyleSignature = int.MinValue; private GUIStyle? cachedLabelStyle; private GUIStyle? cachedButtonStyle; private GUIStyle? cachedDeleteButtonStyle; private GUIStyle? cachedConfirmDeleteButtonStyle; private GUIStyle? cachedFavoriteButtonStyleOn; private GUIStyle? cachedFavoriteButtonStyleOff; private GUIStyle? cachedWindowStyle; private GUIStyle? cachedCenteredLabelStyle; private GUIStyle? cachedToggleLabelStyle; private GUIStyle? cachedScrollbarTrackStyle; private GUIStyle? cachedScrollbarThumbStyle; private GUIStyle? cachedToggleStyle; private GUIStyle? cachedSliderTrackStyle; private GUIStyle? cachedSliderThumbStyle; private GUIStyle? cachedSingleLineLabelStyle; private GUIStyle? cachedSingleLineLabelStyleBase; private const float SettingsKeybindsHeight = 222f; private const float SettingsAppearanceHeight = 1130f; private const float SettingsCostHeight = 495f; private const float SettingsTogglesHeight = 285f; private const float SettingsCategoriesBaseHeight = 167f; private const float SettingsPresetsBaseHeight = 260f; private const float SettingsDataHeight = 405f; private const float SettingsSubPageRowHeight = 28f; private int CornerRadius => settings.cornerRadius; private float RowSpacing => settings.rowSpacing; private float RowButtonHeight => Mathf.Max(24f, (float)settings.rowSpacing - 5f); public void AddActiveDealTeleport(TeleportLocation loc) { allLocations.RemoveAll((TeleportLocation l) => l.Name == loc.Name && l.Category == "Active Deals"); allLocations.Add(loc); MelonLogger.Msg("[Teleport Menu] Added Active Deal teleport: " + loc.Name); } public void RemoveActiveDealTeleport(string dealName) { allLocations.RemoveAll((TeleportLocation l) => l.Name == dealName && l.Category == "Active Deals"); MelonLogger.Msg("[Teleport Menu] Removed Active Deal teleport: " + dealName); } private static bool IsDealerThePlayer(object? dealer) { if (dealer == null) { return true; } Type type = dealer.GetType(); string[] array = new string[4] { "IsLocalPlayer", "isLocalPlayer", "IsPlayer", "isPlayer" }; string[] array2 = array; foreach (string name in array2) { PropertyInfo property = type.GetProperty(name, BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (property != null && property.PropertyType == typeof(bool)) { return (bool)property.GetValue(dealer); } FieldInfo field = type.GetField(name, BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (field != null && field.FieldType == typeof(bool)) { return (bool)field.GetValue(dealer); } } PropertyInfo propertyInfo = type.GetProperty("Owner") ?? type.GetProperty("Player") ?? type.GetProperty("owner"); if (propertyInfo != null) { object value = propertyInfo.GetValue(dealer); if (value != null && (Object)(object)Player.Local != (Object)null) { return value == Player.Local; } } return false; } private List ApplyCategoryOrder(List categories) { if (settings.categoryOrder.Count == 0) { return categories; } return categories.OrderBy(delegate(string c) { int num = settings.categoryOrder.IndexOf(c); return (num < 0) ? int.MaxValue : num; }).ToList(); } private List GetOrderedVisibleCategories() { List categories = (from c in allLocations.Select((TeleportLocation l) => l.Category).Distinct() where !settings.hiddenCategories.Contains(c) select c).ToList(); return ApplyCategoryOrder(categories); } private List GetAllManagedCategories() { List categories = allLocations.Select((TeleportLocation l) => l.Category).Distinct().Union(settings.customCategories) .Distinct() .ToList(); return ApplyCategoryOrder(categories); } private string GetCategoryDisplayName(string category) { if (settings.categoryDisplayNames.TryGetValue(category, out string value) && !string.IsNullOrWhiteSpace(value)) { return value; } return category; } private bool IsUserManagedCategory(string category) { return category == "Custom Teleports" || settings.customCategories.Contains(category); } private void ToggleCategoryHidden(string category) { if (settings.hiddenCategories.Contains(category)) { settings.hiddenCategories.Remove(category); } else { settings.hiddenCategories.Add(category); } SaveAllData(); } private void MoveCategory(string category, int direction) { List allManagedCategories = GetAllManagedCategories(); int num = allManagedCategories.IndexOf(category); int num2 = num + direction; if (num >= 0 && num2 >= 0 && num2 < allManagedCategories.Count) { List list = allManagedCategories; int index = num; int index2 = num2; string value = allManagedCategories[num2]; string value2 = allManagedCategories[num]; list[index] = value; allManagedCategories[index2] = value2; settings.categoryOrder = allManagedCategories; SaveAllData(); } } private void StartRenameCategory(string category) { renamingCategory = category; categoryRenameBuffer = GetCategoryDisplayName(category); } private void CommitCategoryRename() { string value = categoryRenameBuffer.Trim(); if (!string.IsNullOrEmpty(value) && renamingCategory != null) { settings.categoryDisplayNames[renamingCategory] = value; SaveAllData(); } renamingCategory = null; categoryRenameBuffer = ""; } private void ResetCategoryDisplayNames() { settings.categoryDisplayNames.Clear(); MelonLogger.Msg("[Teleport Menu] Category names reset to default."); } private void DeleteCustomCategory(string category) { //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) if (settings.customCategories.Contains(category)) { settings.customCategories.Remove(category); settings.hiddenCategories.Remove(category); settings.categoryOrder.Remove(category); settings.categoryDisplayNames.Remove(category); allLocations.RemoveAll((TeleportLocation l) => l.Category == category); savedLocations.RemoveAll((TeleportLocation l) => l.Category == category); favoriteLocations.RemoveAll((TeleportLocation l) => l.Category == category); if (currentMenu == MenuState.SubMenu && currentCategory == category) { currentMenu = MenuState.Main; currentCategory = ""; scrollPosition = Vector2.zero; } SaveAllData(); } } private void SaveThemePreset() { string name = presetNameBuffer.Trim(); if (!string.IsNullOrEmpty(name)) { settings.themePresets.RemoveAll((ThemePreset p) => p.Name == name); settings.themePresets.Add(new ThemePreset { Name = name, titleFontSize = settings.titleFontSize, titleTextColorR = settings.titleTextColorR, titleTextColorG = settings.titleTextColorG, titleTextColorB = settings.titleTextColorB, titleBarColorR = settings.titleBarColorR, titleBarColorG = settings.titleBarColorG, titleBarColorB = settings.titleBarColorB, titleBarColorA = settings.titleBarColorA, textColorR = settings.textColorR, textColorG = settings.textColorG, textColorB = settings.textColorB, fontSize = settings.fontSize, bold = settings.bold, buttonHoverR = settings.buttonHoverR, buttonHoverG = settings.buttonHoverG, buttonHoverB = settings.buttonHoverB, accentBarR = settings.accentBarR, accentBarG = settings.accentBarG, accentBarB = settings.accentBarB, accentBarA = settings.accentBarA, backgroundR = settings.backgroundR, backgroundG = settings.backgroundG, backgroundB = settings.backgroundB, backgroundA = settings.backgroundA, cornerRadius = settings.cornerRadius, rowSpacing = settings.rowSpacing, scrollbarWidth = settings.scrollbarWidth }); presetNameBuffer = ""; SaveAllData(); MelonLogger.Msg("[Teleport Menu] Saved theme preset: " + name); } } private void ApplyThemePreset(ThemePreset preset) { settings.titleFontSize = preset.titleFontSize; settings.titleTextColorR = preset.titleTextColorR; settings.titleTextColorG = preset.titleTextColorG; settings.titleTextColorB = preset.titleTextColorB; settings.titleBarColorR = preset.titleBarColorR; settings.titleBarColorG = preset.titleBarColorG; settings.titleBarColorB = preset.titleBarColorB; settings.titleBarColorA = preset.titleBarColorA; settings.textColorR = preset.textColorR; settings.textColorG = preset.textColorG; settings.textColorB = preset.textColorB; settings.fontSize = preset.fontSize; settings.bold = preset.bold; settings.buttonHoverR = preset.buttonHoverR; settings.buttonHoverG = preset.buttonHoverG; settings.buttonHoverB = preset.buttonHoverB; settings.accentBarR = preset.accentBarR; settings.accentBarG = preset.accentBarG; settings.accentBarB = preset.accentBarB; settings.accentBarA = preset.accentBarA; settings.backgroundR = preset.backgroundR; settings.backgroundG = preset.backgroundG; settings.backgroundB = preset.backgroundB; settings.backgroundA = preset.backgroundA; settings.cornerRadius = preset.cornerRadius; settings.rowSpacing = preset.rowSpacing; settings.scrollbarWidth = preset.scrollbarWidth; SaveAllData(); MelonLogger.Msg("[Teleport Menu] Applied theme preset: " + preset.Name); } private void TeleportToLocation(TeleportLocation location) { if (IsTeleportOnCooldown(out var remaining)) { MelonLogger.Msg($"[Teleport Menu] Teleport on cooldown ({remaining:F1}s remaining)."); } else { RequestTeleport(delegate { PerformTeleport(location); }); } } private void PerformTeleport(TeleportLocation location) { //IL_0023: 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_015f: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) Vector3? val = (((Object)(object)Player.Local != (Object)null) ? new Vector3?(((Component)Player.Local).transform.position) : ((Vector3?)null)); if ((Object)(object)Player.Local != (Object)null) { PushTeleportHistory(); ((Component)Player.Local).transform.position = location.Position.ToVector3(); MelonLogger.Msg($"Teleported to {location.Name} ({location.Position.x}, {location.Position.y}, {location.Position.z})"); lastTeleportTime = Time.time; RecordTeleportStat(location); } if (!settings.chargeForTeleport) { return; } MoneyManager instance = NetworkSingleton.Instance; int num = settings.teleportCost; if (settings.enableDistanceCost && val.HasValue) { float num2 = Vector3.Distance(val.Value, location.Position.ToVector3()); float num3 = 1f + num2 / 100f * ((float)settings.distanceCostPercent / 100f); num = Mathf.RoundToInt((float)settings.teleportCost * num3); } if ((Object)(object)instance != (Object)null) { if (instance.cashBalance >= (float)num) { instance.ChangeCashBalance((float)(-num), true, false); stats.TotalMoneySpent += num; MelonLogger.Msg($"[Teleport Menu] Charged ${num} for teleport. Remaining: ${instance.cashBalance}"); } else { MelonLogger.Msg($"[Teleport Menu] Not enough money! Requires ${num}."); } } } private void RecordTeleportStat(TeleportLocation location) { stats.TotalTeleports++; string key = location.Category + ":" + location.Name; stats.UsageCounts.TryGetValue(key, out var value); stats.UsageCounts[key] = value + 1; } private void PushTeleportHistory() { //IL_0022: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)Player.Local == (Object)null)) { teleportHistory.Add(new SerializableVector3(((Component)Player.Local).transform.position)); if (teleportHistory.Count > 10) { teleportHistory.RemoveAt(0); } } } private void UndoLastTeleport() { if (teleportHistory.Count == 0 || (Object)(object)Player.Local == (Object)null) { return; } if (IsTeleportOnCooldown(out var remaining)) { MelonLogger.Msg($"[Teleport Menu] Teleport on cooldown ({remaining:F1}s remaining)."); } else { SerializableVector3 last = teleportHistory[teleportHistory.Count - 1]; teleportHistory.RemoveAt(teleportHistory.Count - 1); RequestTeleport(delegate { PerformUndo(last); }); } } private void PerformUndo(SerializableVector3 last) { //IL_0020: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)Player.Local == (Object)null)) { ((Component)Player.Local).transform.position = last.ToVector3(); lastTeleportTime = Time.time; MelonLogger.Msg($"[Teleport Menu] Undid last teleport, returned to ({last.x}, {last.y}, {last.z})"); } } private bool IsTeleportOnCooldown(out float remaining) { remaining = 0f; if (!settings.enableTeleportCooldown) { return false; } remaining = settings.teleportCooldownSeconds - (Time.time - lastTeleportTime); return remaining > 0f; } private void RequestTeleport(Action performAction) { if (!settings.enableTeleportFade) { performAction(); return; } if (pendingFadeAction != null) { MelonLogger.Msg("[Teleport Menu] A teleport fade is already in progress."); return; } pendingFadeAction = performAction; fadeElapsed = 0f; fadeActionExecuted = false; } private void UpdateTeleportFade() { if (pendingFadeAction == null) { fadeAlpha = 0f; return; } fadeElapsed += Time.deltaTime; float num = Mathf.Max(0.05f, settings.teleportFadeDuration / 2f); if (fadeElapsed <= num) { fadeAlpha = fadeElapsed / num; return; } if (!fadeActionExecuted) { fadeActionExecuted = true; pendingFadeAction(); } float num2 = fadeElapsed - num; fadeAlpha = 1f - Mathf.Clamp01(num2 / num); if (fadeElapsed >= num * 2f) { pendingFadeAction = null; fadeAlpha = 0f; } } public override void OnInitializeMelon() { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Expected O, but got Unknown //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) combinedSavePath = Path.Combine(MelonEnvironment.UserDataDirectory, "TeleportMenu/AllData.json"); LoadAllData(); InitializeAllLocations(); Instance = this; Harmony val = new Harmony("TeleportMenuPatches"); val.PatchAll(); foreach (TeleportLocation saved in savedLocations) { if (!allLocations.Any((TeleportLocation l) => l.Name == saved.Name && l.Category == saved.Category)) { allLocations.Add(saved); } } if (!allLocations.Any((TeleportLocation l) => l.Category == "Custom Teleports")) { allLocations.Add(new TeleportLocation { Name = "", Position = new SerializableVector3(Vector3.zero), Category = "Custom Teleports" }); } foreach (string customCategory in settings.customCategories) { if (!allLocations.Any((TeleportLocation l) => l.Category == customCategory)) { allLocations.Add(new TeleportLocation { Name = "", Position = new SerializableVector3(Vector3.zero), Category = customCategory }); } } foreach (TeleportLocation fav in favoriteLocations) { TeleportLocation teleportLocation = allLocations.FirstOrDefault((TeleportLocation l) => l.Name == fav.Name && l.Category == fav.Category); if (teleportLocation != null) { teleportLocation.IsFavorite = true; } } MelonLogger.Msg("[Teleport Menu] Initialization complete."); } public override void OnUpdate() { suppressInputBlock = true; try { OnUpdateInternal(); } finally { suppressInputBlock = false; } } private void OnUpdateInternal() { //IL_000e: 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_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_010d: 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_0117: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_01a1: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_01ac: Unknown result type (might be due to invalid IL or missing references) //IL_01b1: 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_0244: Unknown result type (might be due to invalid IL or missing references) UpdateTeleportFade(); if (Input.GetKeyDown(settings.menuKey)) { if (isMenuOpen) { CloseMenu(); } else { isMenuOpen = true; cursorWasVisible = Cursor.visible; cursorWasLockState = Cursor.lockState; Cursor.visible = true; Cursor.lockState = (CursorLockMode)0; if ((Object)(object)PlayerSingleton.Instance != (Object)null) { ((Behaviour)PlayerSingleton.Instance).enabled = false; } if ((Object)(object)PlayerSingleton.Instance != (Object)null) { ((Behaviour)PlayerSingleton.Instance).enabled = false; } blockedKeyboard = Keyboard.current; blockedMouse = Mouse.current; if (blockedKeyboard != null) { InputSystem.DisableDevice((InputDevice)(object)blockedKeyboard, false); } if (blockedMouse != null) { InputSystem.DisableDevice((InputDevice)(object)blockedMouse, false); } } } if (isResizing && Input.GetMouseButton(0)) { Vector2 val = Vector2.op_Implicit(Input.mousePosition) - resizeStartMousePosition; ((Rect)(ref windowRect)).width = Mathf.Max(200f, resizeStartWindowSize.x + val.x); ((Rect)(ref windowRect)).height = Mathf.Max(200f, resizeStartWindowSize.y - val.y); } else if (Input.GetMouseButtonUp(0)) { isResizing = false; } if (isDragging && Input.GetMouseButton(0)) { ((Rect)(ref windowRect)).position = Vector2.op_Implicit(Input.mousePosition) - dragOffset; } else if (Input.GetMouseButtonUp(0)) { isDragging = false; } HandleTyping(); if (settings.enableSafetyTeleportKey && Input.GetKeyDown(settings.safetyTeleportKey)) { TeleportToLocation(new TeleportLocation { Name = "Safety Teleport", Position = safetyTeleportPosition, Category = "Custom Teleports" }); } if (settings.enableUndoTeleportKey && Input.GetKeyDown(settings.undoTeleportKey)) { UndoLastTeleport(); } } private static MenuState GetParentMenu(MenuState state) { if ((uint)(state - 1) <= 2u) { return MenuState.Main; } return MenuState.Settings; } private void SaveCurrentLocation() { //IL_003f: Unknown result type (might be due to invalid IL or missing references) if (string.IsNullOrWhiteSpace(newLocationName)) { newLocationName = GenerateLocationName(); } TeleportLocation newLoc = new TeleportLocation { Name = newLocationName, Position = new SerializableVector3(((Component)Player.Local).transform.position), Category = currentCategory }; savedLocations.Add(newLoc); SaveAllData(); if (!allLocations.Any((TeleportLocation l) => l.Name == newLoc.Name && l.Category == newLoc.Category)) { allLocations.Add(newLoc); } MelonLogger.Msg("Saved location: " + newLocationName); newLocationName = ""; } private string GenerateLocationName() { int num = 1; string text = "Location_"; string name = text + num; while (savedLocations.Any((TeleportLocation l) => l.Name == name)) { num++; name = text + num; } return name; } private List GetMenuCategoryOrder() { List list = allLocations.Select((TeleportLocation l) => l.Category).Distinct().ToList(); if (!list.Contains("Custom Teleports")) { list.Add("Custom Teleports"); } return ApplyCategoryOrder(list); } private void DrawFavoritesMenu(GUIStyle buttonStyle) { //IL_005d: 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_0119: Unknown result type (might be due to invalid IL or missing references) //IL_0196: Unknown result type (might be due to invalid IL or missing references) //IL_024e: Unknown result type (might be due to invalid IL or missing references) //IL_03bc: Unknown result type (might be due to invalid IL or missing references) //IL_02fa: Unknown result type (might be due to invalid IL or missing references) //IL_02af: Unknown result type (might be due to invalid IL or missing references) //IL_02c0: Unknown result type (might be due to invalid IL or missing references) //IL_03db: Unknown result type (might be due to invalid IL or missing references) //IL_03e0: Unknown result type (might be due to invalid IL or missing references) //IL_0331: Unknown result type (might be due to invalid IL or missing references) float num = 20f; float num2 = ((Rect)(ref windowRect)).width - 87f; GUIStyle deleteButtonStyle = GetDeleteButtonStyle(); List categoryOrder = GetMenuCategoryOrder(); Vector3? playerPos = (((Object)(object)Player.Local != (Object)null) ? new Vector3?(((Component)Player.Local).transform.position) : ((Vector3?)null)); List list = (from f in favoriteLocations where string.IsNullOrEmpty(searchQuery) || f.Name.Contains(searchQuery, StringComparison.OrdinalIgnoreCase) orderby categoryOrder.IndexOf(f.Category), (settings.sortByDistance && playerPos.HasValue) ? Vector3.Distance(playerPos.Value, f.Position.ToVector3()) : 0f select f).ToList(); GUI.Label(new Rect(x, num, ((Rect)(ref windowRect)).width - 70f, 25f), "Search: " + searchQuery, GetSingleLineLabelStyle(GetLabelStyle())); if (!string.IsNullOrEmpty(searchQuery) && GUI.Button(new Rect(((Rect)(ref windowRect)).width - 45f, num, 25f, 25f), "X", GetDeleteButtonStyle())) { searchQuery = ""; } num += 30f; if (playerPos.HasValue) { string text = (settings.sortByDistance ? "Sort: Nearest First" : "Sort: Default Order"); if (GUI.Button(new Rect(x, num, ((Rect)(ref windowRect)).width - 40f, 25f), text, buttonStyle)) { settings.sortByDistance = !settings.sortByDistance; SaveAllData(); } num += 30f; } string text2 = ""; float rowButtonHeight = RowButtonHeight; foreach (TeleportLocation loc in list) { if (loc.Category != text2) { text2 = loc.Category; GUI.Label(new Rect(x, num, ((Rect)(ref windowRect)).width - 40f, 25f), GetCategoryDisplayName(text2), GetCenteredLabelStyle()); num += 30f; } string text3 = loc.Name; if (playerPos.HasValue) { text3 += $" ({Mathf.RoundToInt(Vector3.Distance(playerPos.Value, loc.Position.ToVector3()))}m)"; } if (GUI.Button(new Rect(x, num, num2, rowButtonHeight), text3, buttonStyle)) { TeleportToLocation(loc); } if (GUI.Button(new Rect(x + num2 + 5f, num, 40f, rowButtonHeight), "X", deleteButtonStyle)) { loc.IsFavorite = false; favoriteLocations.RemoveAll((TeleportLocation f) => f.Name == loc.Name && f.Category == loc.Category); SaveAllData(); break; } num += RowSpacing; } if (GUI.Button(new Rect(x, num, ((Rect)(ref windowRect)).width - 40f, 40f), "Back", buttonStyle)) { currentMenu = MenuState.Main; scrollPosition = Vector2.zero; searchQuery = ""; pendingConfirmId = null; } } private void ExportTeleports(string exportPath) { try { string directoryName = Path.GetDirectoryName(exportPath); if (!string.IsNullOrEmpty(directoryName) && !Directory.Exists(directoryName)) { Directory.CreateDirectory(directoryName); } string contents = JsonConvert.SerializeObject((object)savedLocations, (Formatting)1); File.WriteAllText(exportPath, contents); MelonLogger.Msg($"[Teleport Menu] Exported {savedLocations.Count} custom teleports to {exportPath}"); } catch (Exception value) { MelonLogger.Error($"[Teleport Menu] Failed to export teleports: {value}"); } } private void ImportTeleports(string importPath) { try { if (!File.Exists(importPath)) { MelonLogger.Error("[Teleport Menu] Import file not found: " + importPath); return; } string text = File.ReadAllText(importPath); List list = JsonConvert.DeserializeObject>(text) ?? new List(); foreach (TeleportLocation loc in list) { if (string.IsNullOrEmpty(loc.Category)) { loc.Category = "Custom Teleports"; } if (loc.Category != "Custom Teleports" && !settings.customCategories.Contains(loc.Category)) { settings.customCategories.Add(loc.Category); } if (!savedLocations.Any((TeleportLocation l) => l.Name == loc.Name && l.Category == loc.Category)) { savedLocations.Add(loc); } if (!allLocations.Any((TeleportLocation l) => l.Name == loc.Name && l.Category == loc.Category)) { allLocations.Add(loc); } if (loc.IsFavorite && !favoriteLocations.Any((TeleportLocation f) => f.Name == loc.Name && f.Category == loc.Category)) { favoriteLocations.Add(loc); } } SaveAllData(); MelonLogger.Msg($"[Teleport Menu] Imported {list.Count} custom teleports from {importPath}"); } catch (Exception value) { MelonLogger.Error($"[Teleport Menu] Failed to import teleports: {value}"); } } private void ExportFullConfig(string exportPath) { SaveAllData(exportPath); } private void ImportFullConfig(string importPath) { //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) try { if (!File.Exists(importPath)) { MelonLogger.Error("[Teleport Menu] Full config import file not found: " + importPath); return; } string text = File.ReadAllText(importPath); CombinedData combinedData = JsonConvert.DeserializeObject(text); if (combinedData == null) { MelonLogger.Error("[Teleport Menu] Full config import file was empty or invalid."); return; } savedLocations = combinedData.SavedLocations ?? new List(); favoriteLocations = combinedData.FavoriteLocations ?? new List(); safetyTeleportPosition = combinedData.SafetyTeleportPosition ?? new SerializableVector3(Vector3.zero); settings = combinedData.Settings ?? new ModSettings(); stats = combinedData.Stats ?? new TeleportStats(); InitializeAllLocations(); foreach (TeleportLocation fav in favoriteLocations) { TeleportLocation teleportLocation = allLocations.FirstOrDefault((TeleportLocation l) => l.Name == fav.Name && l.Category == fav.Category); if (teleportLocation != null) { teleportLocation.IsFavorite = true; } } currentMenu = MenuState.Main; currentCategory = ""; scrollPosition = Vector2.zero; searchQuery = ""; pendingConfirmId = null; SaveAllData(); MelonLogger.Msg("[Teleport Menu] Imported full config from " + importPath); } catch (Exception value) { MelonLogger.Error($"[Teleport Menu] Failed to import full config: {value}"); } } private void SaveAllData(string? path = null) { if (path == null) { path = combinedSavePath; } try { string directoryName = Path.GetDirectoryName(path); if (!string.IsNullOrEmpty(directoryName) && !Directory.Exists(directoryName)) { Directory.CreateDirectory(directoryName); } CombinedData combinedData = new CombinedData { SavedLocations = savedLocations, FavoriteLocations = favoriteLocations, SafetyTeleportPosition = safetyTeleportPosition, Settings = settings, Stats = stats }; string contents = JsonConvert.SerializeObject((object)combinedData, (Formatting)1); File.WriteAllText(path, contents); MelonLogger.Msg((path == combinedSavePath) ? "All data saved." : ("[Teleport Menu] Exported full config to " + path)); } catch (Exception value) { MelonLogger.Error($"[Teleport Menu] Failed to save data: {value}"); } } private void LoadAllData() { //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) try { if (File.Exists(combinedSavePath)) { string text = File.ReadAllText(combinedSavePath); CombinedData combinedData = JsonConvert.DeserializeObject(text); if (combinedData != null) { savedLocations = combinedData.SavedLocations ?? new List(); favoriteLocations = combinedData.FavoriteLocations ?? new List(); safetyTeleportPosition = combinedData.SafetyTeleportPosition ?? new SerializableVector3(Vector3.zero); settings = combinedData.Settings ?? new ModSettings(); stats = combinedData.Stats ?? new TeleportStats(); } MelonLogger.Msg("All data loaded."); } else { savedLocations = new List(); favoriteLocations = new List(); safetyTeleportPosition = new SerializableVector3(Vector3.zero); settings = new ModSettings(); stats = new TeleportStats(); MelonLogger.Msg(" No data found, starting fresh."); } } catch (Exception value) { savedLocations = new List(); favoriteLocations = new List(); safetyTeleportPosition = new SerializableVector3(Vector3.zero); settings = new ModSettings(); stats = new TeleportStats(); MelonLogger.Error($"[Teleport Menu] Failed to load data: {value}"); } } private void DrawMainMenu(GUIStyle buttonStyle) { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_010a: 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_0188: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Unknown result type (might be due to invalid IL or missing references) //IL_01e2: Unknown result type (might be due to invalid IL or missing references) //IL_0201: 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) float num = 20f; float rowButtonHeight = RowButtonHeight; GUI.Label(new Rect(x, num, ((Rect)(ref windowRect)).width - 70f, 25f), "Search: " + searchQuery, GetSingleLineLabelStyle(GetLabelStyle())); if (!string.IsNullOrEmpty(searchQuery) && GUI.Button(new Rect(((Rect)(ref windowRect)).width - 45f, num, 25f, 25f), "X", GetDeleteButtonStyle())) { searchQuery = ""; } num += 30f; if (!string.IsNullOrEmpty(searchQuery)) { DrawGlobalSearchResults(buttonStyle, num); return; } if (GUI.Button(new Rect(x, num, ((Rect)(ref windowRect)).width - 40f, rowButtonHeight), "Favorites", buttonStyle)) { currentMenu = MenuState.Favorites; scrollPosition = Vector2.zero; searchQuery = ""; pendingConfirmId = null; } num += RowSpacing; foreach (string orderedVisibleCategory in GetOrderedVisibleCategories()) { if (GUI.Button(new Rect(x, num, ((Rect)(ref windowRect)).width - 40f, rowButtonHeight), GetCategoryDisplayName(orderedVisibleCategory), buttonStyle)) { currentCategory = orderedVisibleCategory; currentMenu = MenuState.SubMenu; scrollPosition = Vector2.zero; searchQuery = ""; pendingConfirmId = null; } num += RowSpacing; } if (GUI.Button(new Rect(x, num, ((Rect)(ref windowRect)).width - 40f, rowButtonHeight), "Settings", buttonStyle)) { currentMenu = MenuState.Settings; scrollPosition = Vector2.zero; searchQuery = ""; } } private void DrawGlobalSearchResults(GUIStyle buttonStyle, float y) { //IL_003e: 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_01ac: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_02e8: Unknown result type (might be due to invalid IL or missing references) //IL_0228: Unknown result type (might be due to invalid IL or missing references) List globalSearchResults = GetGlobalSearchResults(); float num = 40f; float num2 = 40f; float rowButtonHeight = RowButtonHeight; Vector3? val = (((Object)(object)Player.Local != (Object)null) ? new Vector3?(((Component)Player.Local).transform.position) : ((Vector3?)null)); if (globalSearchResults.Count == 0) { GUI.Label(new Rect(x, y, ((Rect)(ref windowRect)).width - 40f, 25f), "No matching locations.", GetCenteredLabelStyle()); return; } foreach (TeleportLocation loc in globalSearchResults) { float num3 = ((Rect)(ref windowRect)).width - 40f; if (settings.showFavoriteStar) { num3 -= num + 5f; } bool flag = IsUserManagedCategory(loc.Category); if (flag) { num3 -= num2 + 5f; } string text = GetCategoryDisplayName(loc.Category) + " · " + loc.Name; if (val.HasValue) { text += $" ({Mathf.RoundToInt(Vector3.Distance(val.Value, loc.Position.ToVector3()))}m)"; } if (GUI.Button(new Rect(x, y, num3, rowButtonHeight), text, buttonStyle)) { TeleportToLocation(loc); } float num4 = x + num3 + 5f; if (settings.showFavoriteStar) { string text2 = (loc.IsFavorite ? "★" : "☆"); GUIStyle favoriteButtonStyle = GetFavoriteButtonStyle(loc.IsFavorite); if (GUI.Button(new Rect(num4, y, num, rowButtonHeight), text2, favoriteButtonStyle)) { loc.IsFavorite = !loc.IsFavorite; if (loc.IsFavorite) { if (!favoriteLocations.Any((TeleportLocation f) => f.Name == loc.Name && f.Category == loc.Category)) { favoriteLocations.Add(loc); } } else { favoriteLocations.RemoveAll((TeleportLocation f) => f.Name == loc.Name && f.Category == loc.Category); } SaveAllData(); } num4 += num + 5f; } if (flag && ConfirmableDeleteButton(new Rect(num4, y, num2, rowButtonHeight), "loc:" + loc.Category + ":" + loc.Name)) { savedLocations.RemoveAll((TeleportLocation l) => l.Name == loc.Name && l.Category == loc.Category); allLocations.RemoveAll((TeleportLocation l) => l.Name == loc.Name && l.Category == loc.Category); favoriteLocations.RemoveAll((TeleportLocation f) => f.Name == loc.Name && f.Category == loc.Category); SaveAllData(); break; } y += RowSpacing; } } private List GetGlobalSearchResults() { //IL_0069: Unknown result type (might be due to invalid IL or missing references) if (string.IsNullOrEmpty(searchQuery)) { return new List(); } List source = allLocations.Where((TeleportLocation l) => !string.IsNullOrEmpty(l.Name) && l.Name.Contains(searchQuery, StringComparison.OrdinalIgnoreCase)).ToList(); Vector3? playerPos = (((Object)(object)Player.Local != (Object)null) ? new Vector3?(((Component)Player.Local).transform.position) : ((Vector3?)null)); if (settings.sortByDistance && playerPos.HasValue) { return source.OrderBy((TeleportLocation l) => Vector3.Distance(playerPos.Value, l.Position.ToVector3())).ToList(); } List categoryOrder = GetMenuCategoryOrder(); return (from l in source orderby categoryOrder.IndexOf(l.Category), l.Name select l).ToList(); } private void DrawSettingsMenu(GUIStyle buttonStyle, GUIStyle labelStyle) { //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) float num = 20f; float rowButtonHeight = RowButtonHeight; (string, MenuState)[] array = new(string, MenuState)[8] { ("Keybinds", MenuState.SettingsKeybinds), ("Appearance", MenuState.SettingsAppearance), ("Teleport Cost & Cooldown", MenuState.SettingsCost), ("Feature Toggles", MenuState.SettingsToggles), ("Category Management", MenuState.SettingsCategories), ("Theme Presets", MenuState.SettingsPresets), ("Statistics", MenuState.Statistics), ("Data & Backup", MenuState.SettingsData) }; (string, MenuState)[] array2 = array; for (int i = 0; i < array2.Length; i++) { (string, MenuState) tuple = array2[i]; if (GUI.Button(new Rect(x, num, ((Rect)(ref windowRect)).width - 40f, rowButtonHeight), tuple.Item1, buttonStyle)) { currentMenu = tuple.Item2; scrollPosition = Vector2.zero; pendingConfirmId = null; } num += RowSpacing; } if (GUI.Button(new Rect(x, num, ((Rect)(ref windowRect)).width - 40f, rowButtonHeight), "Back", buttonStyle)) { currentMenu = MenuState.Main; scrollPosition = Vector2.zero; searchQuery = ""; pendingConfirmId = null; } } private void DrawSettingsBackButton(GUIStyle buttonStyle, float y) { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) if (GUI.Button(new Rect(x, y, ((Rect)(ref windowRect)).width - 40f, 40f), "Back", buttonStyle)) { currentMenu = MenuState.Settings; scrollPosition = Vector2.zero; pendingConfirmId = null; } } private void DrawSettingsKeybinds(GUIStyle buttonStyle, GUIStyle labelStyle) { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: Unknown result type (might be due to invalid IL or missing references) //IL_0205: Unknown result type (might be due to invalid IL or missing references) //IL_0227: Unknown result type (might be due to invalid IL or missing references) //IL_0237: Unknown result type (might be due to invalid IL or missing references) //IL_0247: Unknown result type (might be due to invalid IL or missing references) float num = 20f; GUI.Label(new Rect(20f, num, 400f, 25f), $"Menu Toggle Key: {settings.menuKey}", labelStyle); if (GUI.Button(new Rect(275f, num, 100f, 25f), (waitingForKey == "menuKey") ? "Press Key..." : "Change", buttonStyle)) { waitingForKey = "menuKey"; } num += 35f; GUI.Label(new Rect(20f, num, 400f, 25f), $"Safety Teleport Key: {settings.safetyTeleportKey}", labelStyle); if (GUI.Button(new Rect(275f, num, 100f, 25f), (waitingForKey == "safetyTeleportKey") ? "Press Key..." : "Change", buttonStyle)) { waitingForKey = "safetyTeleportKey"; } num += 35f; GUI.Label(new Rect(20f, num, 400f, 25f), $"Undo Teleport Key: {settings.undoTeleportKey}", labelStyle); if (GUI.Button(new Rect(275f, num, 100f, 25f), (waitingForKey == "undoTeleportKey") ? "Press Key..." : "Change", buttonStyle)) { waitingForKey = "undoTeleportKey"; } num += 35f; if (GUI.Button(new Rect(x, num, ((Rect)(ref windowRect)).width - 40f, 35f), "Reset Keys", buttonStyle)) { settings.menuKey = (KeyCode)283; settings.safetyTeleportKey = (KeyCode)284; settings.undoTeleportKey = (KeyCode)285; SaveAllData(); MelonLogger.Msg("Keys reset."); } num += 45f; DrawSettingsBackButton(buttonStyle, num); } private void DrawSettingsAppearance(GUIStyle buttonStyle, GUIStyle labelStyle) { //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_01f6: Unknown result type (might be due to invalid IL or missing references) //IL_0253: Unknown result type (might be due to invalid IL or missing references) //IL_0292: Unknown result type (might be due to invalid IL or missing references) //IL_0311: Unknown result type (might be due to invalid IL or missing references) //IL_0354: Unknown result type (might be due to invalid IL or missing references) //IL_03b9: Unknown result type (might be due to invalid IL or missing references) //IL_03fc: Unknown result type (might be due to invalid IL or missing references) //IL_0461: Unknown result type (might be due to invalid IL or missing references) //IL_04a4: Unknown result type (might be due to invalid IL or missing references) //IL_0509: Unknown result type (might be due to invalid IL or missing references) //IL_054c: 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_060d: Unknown result type (might be due to invalid IL or missing references) //IL_0672: Unknown result type (might be due to invalid IL or missing references) //IL_06b5: Unknown result type (might be due to invalid IL or missing references) //IL_071a: 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_07ba: Unknown result type (might be due to invalid IL or missing references) //IL_07f9: 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_088b: Unknown result type (might be due to invalid IL or missing references) //IL_08de: Unknown result type (might be due to invalid IL or missing references) //IL_0921: Unknown result type (might be due to invalid IL or missing references) //IL_0986: Unknown result type (might be due to invalid IL or missing references) //IL_09c9: Unknown result type (might be due to invalid IL or missing references) //IL_0a2e: Unknown result type (might be due to invalid IL or missing references) //IL_0a71: Unknown result type (might be due to invalid IL or missing references) //IL_0aef: Unknown result type (might be due to invalid IL or missing references) //IL_0b32: Unknown result type (might be due to invalid IL or missing references) //IL_0b97: Unknown result type (might be due to invalid IL or missing references) //IL_0bda: Unknown result type (might be due to invalid IL or missing references) //IL_0c3f: Unknown result type (might be due to invalid IL or missing references) //IL_0c82: Unknown result type (might be due to invalid IL or missing references) //IL_0ce7: Unknown result type (might be due to invalid IL or missing references) //IL_0d2a: Unknown result type (might be due to invalid IL or missing references) //IL_0da8: Unknown result type (might be due to invalid IL or missing references) //IL_0deb: Unknown result type (might be due to invalid IL or missing references) //IL_0e50: Unknown result type (might be due to invalid IL or missing references) //IL_0e93: Unknown result type (might be due to invalid IL or missing references) //IL_0ef8: Unknown result type (might be due to invalid IL or missing references) //IL_0f3b: Unknown result type (might be due to invalid IL or missing references) //IL_0fa0: Unknown result type (might be due to invalid IL or missing references) //IL_0fe3: Unknown result type (might be due to invalid IL or missing references) //IL_1059: Unknown result type (might be due to invalid IL or missing references) //IL_1098: Unknown result type (might be due to invalid IL or missing references) //IL_10f6: Unknown result type (might be due to invalid IL or missing references) //IL_1135: Unknown result type (might be due to invalid IL or missing references) //IL_1193: Unknown result type (might be due to invalid IL or missing references) //IL_11d2: Unknown result type (might be due to invalid IL or missing references) //IL_1238: Unknown result type (might be due to invalid IL or missing references) GUIStyle sliderTrackStyle = GetSliderTrackStyle(); GUIStyle sliderThumbStyle = GetSliderThumbStyle(); GUIStyle toggleStyle = GetToggleStyle(); GUIStyle toggleLabelStyle = GetToggleLabelStyle(); float num = -1f; float num2 = 20f; DrawSectionHeader(num2, "Title Settings", labelStyle); num2 += 35f; float num3 = settings.titleTextColorR; num3 = GUI.HorizontalSlider(new Rect(20f, num2, 200f, 20f), num3, 0f, 255f, sliderTrackStyle, sliderThumbStyle); settings.titleTextColorR = Mathf.RoundToInt(num3); GUI.Label(new Rect(230f, num2 - 4f, 200f, 25f), $"Red: {settings.titleTextColorR}", labelStyle); num2 += 25f; num3 = settings.titleTextColorG; num3 = GUI.HorizontalSlider(new Rect(20f, num2, 200f, 20f), num3, 0f, 255f, sliderTrackStyle, sliderThumbStyle); settings.titleTextColorG = Mathf.RoundToInt(num3); GUI.Label(new Rect(230f, num2 - 4f, 200f, 25f), $"Green: {settings.titleTextColorG}", labelStyle); num2 += 25f; num3 = settings.titleTextColorB; num3 = GUI.HorizontalSlider(new Rect(20f, num2, 200f, 20f), num3, 0f, 255f, sliderTrackStyle, sliderThumbStyle); settings.titleTextColorB = Mathf.RoundToInt(num3); GUI.Label(new Rect(230f, num2 - 4f, 200f, 25f), $"Blue: {settings.titleTextColorB}", labelStyle); num2 += 25f; settings.titleFontSize = (int)GUI.HorizontalSlider(new Rect(20f, num2, 200f, 20f), (float)settings.titleFontSize, 10f, 30f, sliderTrackStyle, sliderThumbStyle); GUI.Label(new Rect(230f, num2 - 4f, 200f, 25f), $"Font Size: {settings.titleFontSize}", labelStyle); num2 += 35f; DrawSectionHeader(num2, "Title Bar Color", labelStyle); num2 += 35f; num3 = settings.titleBarColorR; num3 = GUI.HorizontalSlider(new Rect(20f, num2, 200f, 20f), num3, 0f, 255f, sliderTrackStyle, sliderThumbStyle); settings.titleBarColorR = Mathf.RoundToInt(num3); GUI.Label(new Rect(230f, num2 - 4f, 200f, 25f), $"Red: {settings.titleBarColorR}", labelStyle); num2 += 25f; num3 = settings.titleBarColorG; num3 = GUI.HorizontalSlider(new Rect(20f, num2, 200f, 20f), num3, 0f, 255f, sliderTrackStyle, sliderThumbStyle); settings.titleBarColorG = Mathf.RoundToInt(num3); GUI.Label(new Rect(230f, num2 - 4f, 200f, 25f), $"Green: {settings.titleBarColorG}", labelStyle); num2 += 25f; num3 = settings.titleBarColorB; num3 = GUI.HorizontalSlider(new Rect(20f, num2, 200f, 20f), num3, 0f, 255f, sliderTrackStyle, sliderThumbStyle); settings.titleBarColorB = Mathf.RoundToInt(num3); GUI.Label(new Rect(230f, num2 - 4f, 200f, 25f), $"Blue: {settings.titleBarColorB}", labelStyle); num2 += 25f; num3 = settings.titleBarColorA; num3 = GUI.HorizontalSlider(new Rect(20f, num2, 200f, 20f), num3, 0f, 255f, sliderTrackStyle, sliderThumbStyle); settings.titleBarColorA = Mathf.RoundToInt(num3); GUI.Label(new Rect(230f, num2 - 4f, 200f, 25f), $"Alpha: {settings.titleBarColorA}", labelStyle); num2 += 35f; DrawSectionHeader(num2, "Text Settings", labelStyle); num2 += 35f; num3 = settings.textColorR; num3 = GUI.HorizontalSlider(new Rect(20f, num2, 200f, 20f), num3, 0f, 255f, sliderTrackStyle, sliderThumbStyle); settings.textColorR = Mathf.RoundToInt(num3); GUI.Label(new Rect(230f, num2 - 4f, 200f, 25f), $"Red: {settings.textColorR}", labelStyle); num2 += 25f; num3 = settings.textColorG; num3 = GUI.HorizontalSlider(new Rect(20f, num2, 200f, 20f), num3, 0f, 255f, sliderTrackStyle, sliderThumbStyle); settings.textColorG = Mathf.RoundToInt(num3); GUI.Label(new Rect(230f, num2 - 4f, 200f, 25f), $"Green: {settings.textColorG}", labelStyle); num2 += 25f; num3 = settings.textColorB; num3 = GUI.HorizontalSlider(new Rect(20f, num2, 200f, 20f), num3, 0f, 255f, sliderTrackStyle, sliderThumbStyle); settings.textColorB = Mathf.RoundToInt(num3); GUI.Label(new Rect(230f, num2 - 4f, 200f, 25f), $"Blue: {settings.textColorB}", labelStyle); num2 += 25f; settings.fontSize = (int)GUI.HorizontalSlider(new Rect(20f, num2, 200f, 20f), (float)settings.fontSize, 10f, 30f, sliderTrackStyle, sliderThumbStyle); GUI.Label(new Rect(230f, num2 - 4f, 200f, 25f), $"Font Size: {settings.fontSize}", labelStyle); num2 += 25f; settings.bold = GUI.Toggle(new Rect(20f, num2 + num, 16f, 16f), settings.bold, "", toggleStyle); GUI.Label(new Rect(40f, num2, 200f, 20f), "Bold", toggleLabelStyle); num2 += 35f; DrawSectionHeader(num2, "Hover Color", labelStyle); num2 += 35f; num3 = settings.buttonHoverR; num3 = GUI.HorizontalSlider(new Rect(20f, num2, 200f, 20f), num3, 0f, 255f, sliderTrackStyle, sliderThumbStyle); settings.buttonHoverR = Mathf.RoundToInt(num3); GUI.Label(new Rect(230f, num2 - 4f, 200f, 25f), $"Red: {settings.buttonHoverR}", labelStyle); num2 += 25f; num3 = settings.buttonHoverG; num3 = GUI.HorizontalSlider(new Rect(20f, num2, 200f, 20f), num3, 0f, 255f, sliderTrackStyle, sliderThumbStyle); settings.buttonHoverG = Mathf.RoundToInt(num3); GUI.Label(new Rect(230f, num2 - 4f, 200f, 25f), $"Green: {settings.buttonHoverG}", labelStyle); num2 += 25f; num3 = settings.buttonHoverB; num3 = GUI.HorizontalSlider(new Rect(20f, num2, 200f, 20f), num3, 0f, 255f, sliderTrackStyle, sliderThumbStyle); settings.buttonHoverB = Mathf.RoundToInt(num3); GUI.Label(new Rect(230f, num2 - 4f, 200f, 25f), $"Blue: {settings.buttonHoverB}", labelStyle); num2 += 35f; DrawSectionHeader(num2, "Accent Color & Alpha", labelStyle); num2 += 35f; num3 = settings.accentBarR; num3 = GUI.HorizontalSlider(new Rect(20f, num2, 200f, 20f), num3, 0f, 255f, sliderTrackStyle, sliderThumbStyle); settings.accentBarR = Mathf.RoundToInt(num3); GUI.Label(new Rect(230f, num2 - 4f, 200f, 25f), $"Red: {settings.accentBarR}", labelStyle); num2 += 25f; num3 = settings.accentBarG; num3 = GUI.HorizontalSlider(new Rect(20f, num2, 200f, 20f), num3, 0f, 255f, sliderTrackStyle, sliderThumbStyle); settings.accentBarG = Mathf.RoundToInt(num3); GUI.Label(new Rect(230f, num2 - 4f, 200f, 25f), $"Green: {settings.accentBarG}", labelStyle); num2 += 25f; num3 = settings.accentBarB; num3 = GUI.HorizontalSlider(new Rect(20f, num2, 200f, 20f), num3, 0f, 255f, sliderTrackStyle, sliderThumbStyle); settings.accentBarB = Mathf.RoundToInt(num3); GUI.Label(new Rect(230f, num2 - 4f, 200f, 25f), $"Blue: {settings.accentBarB}", labelStyle); num2 += 25f; num3 = settings.accentBarA; num3 = GUI.HorizontalSlider(new Rect(20f, num2, 200f, 20f), num3, 0f, 255f, sliderTrackStyle, sliderThumbStyle); settings.accentBarA = Mathf.RoundToInt(num3); GUI.Label(new Rect(230f, num2 - 4f, 200f, 25f), $"Alpha: {settings.accentBarA}", labelStyle); num2 += 35f; DrawSectionHeader(num2, "Background Settings", labelStyle); num2 += 35f; num3 = settings.backgroundR; num3 = GUI.HorizontalSlider(new Rect(20f, num2, 200f, 20f), num3, 0f, 255f, sliderTrackStyle, sliderThumbStyle); settings.backgroundR = Mathf.RoundToInt(num3); GUI.Label(new Rect(230f, num2 - 4f, 200f, 25f), $"Red: {settings.backgroundR}", labelStyle); num2 += 25f; num3 = settings.backgroundG; num3 = GUI.HorizontalSlider(new Rect(20f, num2, 200f, 20f), num3, 0f, 255f, sliderTrackStyle, sliderThumbStyle); settings.backgroundG = Mathf.RoundToInt(num3); GUI.Label(new Rect(230f, num2 - 4f, 200f, 25f), $"Green: {settings.backgroundG}", labelStyle); num2 += 25f; num3 = settings.backgroundB; num3 = GUI.HorizontalSlider(new Rect(20f, num2, 200f, 20f), num3, 0f, 255f, sliderTrackStyle, sliderThumbStyle); settings.backgroundB = Mathf.RoundToInt(num3); GUI.Label(new Rect(230f, num2 - 4f, 200f, 25f), $"Blue: {settings.backgroundB}", labelStyle); num2 += 25f; num3 = settings.backgroundA; num3 = GUI.HorizontalSlider(new Rect(20f, num2, 200f, 20f), num3, 0f, 255f, sliderTrackStyle, sliderThumbStyle); settings.backgroundA = Mathf.RoundToInt(num3); GUI.Label(new Rect(230f, num2 - 4f, 200f, 25f), $"Alpha: {settings.backgroundA}", labelStyle); num2 += 35f; DrawSectionHeader(num2, "Layout Settings", labelStyle); num2 += 35f; settings.cornerRadius = (int)GUI.HorizontalSlider(new Rect(20f, num2, 200f, 20f), (float)settings.cornerRadius, 0f, 12f, sliderTrackStyle, sliderThumbStyle); GUI.Label(new Rect(230f, num2 - 4f, 200f, 25f), $"Corner Radius: {settings.cornerRadius}", labelStyle); num2 += 25f; settings.rowSpacing = (int)GUI.HorizontalSlider(new Rect(20f, num2, 200f, 20f), (float)settings.rowSpacing, 35f, 70f, sliderTrackStyle, sliderThumbStyle); GUI.Label(new Rect(230f, num2 - 4f, 200f, 25f), $"Row Spacing: {settings.rowSpacing}", labelStyle); num2 += 25f; settings.scrollbarWidth = (int)GUI.HorizontalSlider(new Rect(20f, num2, 200f, 20f), (float)settings.scrollbarWidth, 4f, 16f, sliderTrackStyle, sliderThumbStyle); GUI.Label(new Rect(230f, num2 - 4f, 200f, 25f), $"Scrollbar Width: {settings.scrollbarWidth}", labelStyle); num2 += 35f; if (ConfirmableActionButton(new Rect(x, num2, ((Rect)(ref windowRect)).width - 40f, 40f), "reset:appearance", "Reset Appearance", "Click Again to Confirm", buttonStyle)) { ResetAppearanceSettings(); } num2 += 45f; DrawSettingsBackButton(buttonStyle, num2); } private void DrawSettingsCost(GUIStyle buttonStyle, GUIStyle labelStyle) { //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_0191: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: Unknown result type (might be due to invalid IL or missing references) //IL_0224: Unknown result type (might be due to invalid IL or missing references) //IL_0289: Unknown result type (might be due to invalid IL or missing references) //IL_02ba: Unknown result type (might be due to invalid IL or missing references) //IL_02ec: Unknown result type (might be due to invalid IL or missing references) //IL_0352: Unknown result type (might be due to invalid IL or missing references) //IL_03b5: Unknown result type (might be due to invalid IL or missing references) //IL_03e6: Unknown result type (might be due to invalid IL or missing references) //IL_0418: 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) GUIStyle sliderTrackStyle = GetSliderTrackStyle(); GUIStyle sliderThumbStyle = GetSliderThumbStyle(); GUIStyle toggleStyle = GetToggleStyle(); GUIStyle toggleLabelStyle = GetToggleLabelStyle(); float num = -1f; float num2 = 20f; DrawSectionHeader(num2, "Teleport Cost Settings", labelStyle); num2 += 35f; settings.chargeForTeleport = GUI.Toggle(new Rect(20f, num2 + num, 16f, 16f), settings.chargeForTeleport, "", toggleStyle); GUI.Label(new Rect(40f, num2, 200f, 20f), "Enable Teleport Cost", toggleLabelStyle); num2 += 30f; GUI.Label(new Rect(230f, num2 - 4f, 200f, 25f), $"Cost: ${settings.teleportCost}", labelStyle); settings.teleportCost = (int)GUI.HorizontalSlider(new Rect(20f, num2, 200f, 25f), (float)settings.teleportCost, 0f, 500f, sliderTrackStyle, sliderThumbStyle); num2 += 45f; settings.enableDistanceCost = GUI.Toggle(new Rect(20f, num2 + num, 16f, 16f), settings.enableDistanceCost, "", toggleStyle); GUI.Label(new Rect(40f, num2, 300f, 20f), "Add Cost Per Distance Traveled", toggleLabelStyle); num2 += 30f; GUI.Label(new Rect(230f, num2 - 4f, 220f, 25f), $"+{settings.distanceCostPercent}% of base per 100m", labelStyle); settings.distanceCostPercent = (int)GUI.HorizontalSlider(new Rect(20f, num2, 200f, 25f), (float)settings.distanceCostPercent, 0f, 20f, sliderTrackStyle, sliderThumbStyle); num2 += 45f; DrawSectionHeader(num2, "Teleport Cooldown", labelStyle); num2 += 35f; settings.enableTeleportCooldown = GUI.Toggle(new Rect(20f, num2 + num, 16f, 16f), settings.enableTeleportCooldown, "", toggleStyle); GUI.Label(new Rect(40f, num2, 250f, 20f), "Enable Cooldown", toggleLabelStyle); num2 += 30f; GUI.Label(new Rect(230f, num2 - 4f, 200f, 25f), $"Cooldown: {settings.teleportCooldownSeconds:F1}s", labelStyle); settings.teleportCooldownSeconds = GUI.HorizontalSlider(new Rect(20f, num2, 200f, 25f), settings.teleportCooldownSeconds, 0.5f, 30f, sliderTrackStyle, sliderThumbStyle); num2 += 45f; DrawSectionHeader(num2, "Teleport Fade", labelStyle); num2 += 35f; settings.enableTeleportFade = GUI.Toggle(new Rect(20f, num2 + num, 16f, 16f), settings.enableTeleportFade, "", toggleStyle); GUI.Label(new Rect(40f, num2, 250f, 20f), "Enable Screen Fade", toggleLabelStyle); num2 += 30f; GUI.Label(new Rect(230f, num2 - 4f, 200f, 25f), $"Duration: {settings.teleportFadeDuration:F1}s", labelStyle); settings.teleportFadeDuration = GUI.HorizontalSlider(new Rect(20f, num2, 200f, 25f), settings.teleportFadeDuration, 0.2f, 2f, sliderTrackStyle, sliderThumbStyle); num2 += 45f; DrawSettingsBackButton(buttonStyle, num2); } private void DrawSettingsToggles(GUIStyle buttonStyle, GUIStyle labelStyle) { //IL_0049: 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_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_013b: 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_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01cd: Unknown result type (might be due to invalid IL or missing references) //IL_01fd: Unknown result type (might be due to invalid IL or missing references) //IL_022e: Unknown result type (might be due to invalid IL or missing references) //IL_025e: Unknown result type (might be due to invalid IL or missing references) GUIStyle toggleStyle = GetToggleStyle(); GUIStyle toggleLabelStyle = GetToggleLabelStyle(); float num = -1f; float num2 = 20f; DrawSectionHeader(num2, "Feature Toggles", labelStyle); num2 += 35f; settings.enableResizeGrip = GUI.Toggle(new Rect(20f, num2 + num, 16f, 16f), settings.enableResizeGrip, "", toggleStyle); GUI.Label(new Rect(40f, num2, 250f, 20f), "Resize Grip", toggleLabelStyle); num2 += 25f; settings.enableCloseButton = GUI.Toggle(new Rect(20f, num2 + num, 16f, 16f), settings.enableCloseButton, "", toggleStyle); GUI.Label(new Rect(40f, num2, 250f, 20f), "Close Button", toggleLabelStyle); num2 += 25f; settings.showBreadcrumb = GUI.Toggle(new Rect(20f, num2 + num, 16f, 16f), settings.showBreadcrumb, "", toggleStyle); GUI.Label(new Rect(40f, num2, 250f, 20f), "Breadcrumb Title", toggleLabelStyle); num2 += 25f; settings.showFavoriteStar = GUI.Toggle(new Rect(20f, num2 + num, 16f, 16f), settings.showFavoriteStar, "", toggleStyle); GUI.Label(new Rect(40f, num2, 250f, 20f), "Favorite Star", toggleLabelStyle); num2 += 25f; settings.enableSafetyTeleportKey = GUI.Toggle(new Rect(20f, num2 + num, 16f, 16f), settings.enableSafetyTeleportKey, "", toggleStyle); GUI.Label(new Rect(40f, num2, 250f, 20f), "Safety Teleport Hotkey", toggleLabelStyle); num2 += 25f; settings.enableUndoTeleportKey = GUI.Toggle(new Rect(20f, num2 + num, 16f, 16f), settings.enableUndoTeleportKey, "", toggleStyle); GUI.Label(new Rect(40f, num2, 250f, 20f), "Undo Teleport Hotkey", toggleLabelStyle); num2 += 35f; DrawSettingsBackButton(buttonStyle, num2); } private void DrawSettingsCategories(GUIStyle buttonStyle, GUIStyle labelStyle) { //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_02f4: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_01a3: Unknown result type (might be due to invalid IL or missing references) //IL_01d9: Unknown result type (might be due to invalid IL or missing references) //IL_020f: Unknown result type (might be due to invalid IL or missing references) //IL_024e: Unknown result type (might be due to invalid IL or missing references) //IL_0288: Unknown result type (might be due to invalid IL or missing references) float num = 20f; DrawSectionHeader(num, "Category Management", labelStyle); num += 35f; foreach (string allManagedCategory in GetAllManagedCategories()) { bool flag = settings.hiddenCategories.Contains(allManagedCategory); bool flag2 = settings.customCategories.Contains(allManagedCategory); if (renamingCategory == allManagedCategory) { float num2 = 122f; float num3 = Mathf.Max(60f, ((Rect)(ref windowRect)).width - 40f - num2); GUI.Label(new Rect(x, num, num3, 25f), "New name: " + categoryRenameBuffer, GetSingleLineLabelStyle(labelStyle)); if (GUI.Button(new Rect(x + num3 + 5f, num, 55f, 25f), "Save", buttonStyle)) { CommitCategoryRename(); } if (GUI.Button(new Rect(x + num3 + 63f, num, 55f, 25f), "Cancel", buttonStyle)) { renamingCategory = null; categoryRenameBuffer = ""; } } else { string text = GetCategoryDisplayName(allManagedCategory) + (flag ? " (hidden)" : ""); GUI.Label(new Rect(x, num, 100f, 25f), text, labelStyle); float num4 = x + 100f; if (GUI.Button(new Rect(num4, num, 22f, 25f), "^", buttonStyle)) { MoveCategory(allManagedCategory, -1); } num4 += 24f; if (GUI.Button(new Rect(num4, num, 22f, 25f), "v", buttonStyle)) { MoveCategory(allManagedCategory, 1); } num4 += 24f; if (GUI.Button(new Rect(num4, num, 45f, 25f), flag ? "Show" : "Hide", buttonStyle)) { ToggleCategoryHidden(allManagedCategory); } num4 += 47f; if (GUI.Button(new Rect(num4, num, 65f, 25f), "Rename", buttonStyle)) { StartRenameCategory(allManagedCategory); } num4 += 67f; if (flag2 && ConfirmableDeleteButton(new Rect(num4, num, 22f, 25f), "category:" + allManagedCategory)) { DeleteCustomCategory(allManagedCategory); } } num += 28f; } if (GUI.Button(new Rect(x, num, ((Rect)(ref windowRect)).width - 40f, 35f), "Reset Category Names", buttonStyle)) { ResetCategoryDisplayNames(); } num += 45f; DrawSettingsBackButton(buttonStyle, num); } private void DrawSettingsPresets(GUIStyle buttonStyle, GUIStyle labelStyle) { //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_01b9: Unknown result type (might be due to invalid IL or missing references) //IL_0217: Unknown result type (might be due to invalid IL or missing references) //IL_0246: 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) float num = 20f; DrawSectionHeader(num, "Theme Presets", labelStyle); num += 35f; GUI.Label(new Rect(x, num, ((Rect)(ref windowRect)).width - 40f, 25f), "Preset Name: " + presetNameBuffer, GetSingleLineLabelStyle(labelStyle)); num += 30f; if (GUI.Button(new Rect(x, num, ((Rect)(ref windowRect)).width - 40f, 35f), "Save Current As Preset", buttonStyle)) { SaveThemePreset(); } num += 45f; DrawSectionHeader(num, "Built-in Themes", labelStyle); num += 35f; foreach (ThemePreset builtInThemePreset in BuiltInThemePresets) { GUI.Label(new Rect(x, num, ((Rect)(ref windowRect)).width - 85f, 25f), builtInThemePreset.Name, labelStyle); if (GUI.Button(new Rect(((Rect)(ref windowRect)).width - 60f, num, 45f, 25f), "Load", buttonStyle)) { ApplyThemePreset(builtInThemePreset); } num += 28f; } num += 10f; DrawSectionHeader(num, "Your Presets", labelStyle); num += 35f; if (settings.themePresets.Count == 0) { GUI.Label(new Rect(x, num, ((Rect)(ref windowRect)).width - 40f, 25f), "No saved presets yet.", GetCenteredLabelStyle()); num += 28f; } foreach (ThemePreset themePreset in settings.themePresets) { GUI.Label(new Rect(x, num, ((Rect)(ref windowRect)).width - 130f, 25f), themePreset.Name, labelStyle); if (GUI.Button(new Rect(((Rect)(ref windowRect)).width - 105f, num, 45f, 25f), "Load", buttonStyle)) { ApplyThemePreset(themePreset); } if (ConfirmableDeleteButton(new Rect(((Rect)(ref windowRect)).width - 55f, num, 40f, 25f), "preset:" + themePreset.Name)) { settings.themePresets.Remove(themePreset); SaveAllData(); break; } num += 28f; } DrawSettingsBackButton(buttonStyle, num); } private void DrawSettingsData(GUIStyle buttonStyle, GUIStyle labelStyle) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: 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_014d: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: Unknown result type (might be due to invalid IL or missing references) //IL_01fc: Unknown result type (might be due to invalid IL or missing references) float num = 20f; if (GUI.Button(new Rect(x, num, ((Rect)(ref windowRect)).width - 40f, 40f), "Save Settings", buttonStyle)) { SaveAllData(); } num += 45f; if (GUI.Button(new Rect(x, num, ((Rect)(ref windowRect)).width - 40f, 40f), "Load Settings", buttonStyle)) { LoadAllData(); } num += 45f; if (ConfirmableActionButton(new Rect(x, num, ((Rect)(ref windowRect)).width - 40f, 40f), "reset:everything", "Reset Everything", "Click Again to Confirm", buttonStyle)) { ResetSettings(); } num += 45f; if (GUI.Button(new Rect(x, num, ((Rect)(ref windowRect)).width - 40f, 40f), "Export Teleports", buttonStyle)) { string exportPath = Path.Combine(MelonEnvironment.UserDataDirectory, "TeleportMenu/ExportedTeleports.json"); ExportTeleports(exportPath); } num += 45f; if (GUI.Button(new Rect(x, num, ((Rect)(ref windowRect)).width - 40f, 40f), "Import Teleports", buttonStyle)) { string importPath = Path.Combine(MelonEnvironment.UserDataDirectory, "TeleportMenu/ExportedTeleports.json"); ImportTeleports(importPath); } num += 45f; if (GUI.Button(new Rect(x, num, ((Rect)(ref windowRect)).width - 40f, 40f), "Export Full Config", buttonStyle)) { string exportPath2 = Path.Combine(MelonEnvironment.UserDataDirectory, "TeleportMenu/ExportedFullConfig.json"); ExportFullConfig(exportPath2); } num += 45f; if (ConfirmableActionButton(new Rect(x, num, ((Rect)(ref windowRect)).width - 40f, 40f), "import:fullconfig", "Import Full Config", "Click Again to Confirm", buttonStyle)) { string importPath2 = Path.Combine(MelonEnvironment.UserDataDirectory, "TeleportMenu/ExportedFullConfig.json"); ImportFullConfig(importPath2); } num += 45f; DrawSettingsBackButton(buttonStyle, num); } private void ResetSettings() { List themePresets = settings.themePresets; settings = new ModSettings(); settings.themePresets = themePresets; MelonLogger.Msg("[Teleport Menu] All settings reset to default (theme presets kept)."); } private void ResetAppearanceSettings() { ModSettings modSettings = new ModSettings(); settings.titleFontSize = modSettings.titleFontSize; settings.titleTextColorR = modSettings.titleTextColorR; settings.titleTextColorG = modSettings.titleTextColorG; settings.titleTextColorB = modSettings.titleTextColorB; settings.titleBarColorR = modSettings.titleBarColorR; settings.titleBarColorG = modSettings.titleBarColorG; settings.titleBarColorB = modSettings.titleBarColorB; settings.titleBarColorA = modSettings.titleBarColorA; settings.textColorR = modSettings.textColorR; settings.textColorG = modSettings.textColorG; settings.textColorB = modSettings.textColorB; settings.fontSize = modSettings.fontSize; settings.bold = modSettings.bold; settings.buttonHoverR = modSettings.buttonHoverR; settings.buttonHoverG = modSettings.buttonHoverG; settings.buttonHoverB = modSettings.buttonHoverB; settings.accentBarR = modSettings.accentBarR; settings.accentBarG = modSettings.accentBarG; settings.accentBarB = modSettings.accentBarB; settings.accentBarA = modSettings.accentBarA; settings.backgroundR = modSettings.backgroundR; settings.backgroundG = modSettings.backgroundG; settings.backgroundB = modSettings.backgroundB; settings.backgroundA = modSettings.backgroundA; settings.cornerRadius = modSettings.cornerRadius; settings.rowSpacing = modSettings.rowSpacing; settings.scrollbarWidth = modSettings.scrollbarWidth; MelonLogger.Msg("[Teleport Menu] Appearance settings reset to default."); } private void DrawStatisticsMenu(GUIStyle buttonStyle, GUIStyle labelStyle) { //IL_0024: 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_026e: Unknown result type (might be due to invalid IL or missing references) //IL_02b3: Unknown result type (might be due to invalid IL or missing references) //IL_030d: Unknown result type (might be due to invalid IL or missing references) //IL_032c: Unknown result type (might be due to invalid IL or missing references) //IL_0331: 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) float num = 20f; GUI.Label(new Rect(x, num, ((Rect)(ref windowRect)).width - 40f, 25f), $"Total Teleports: {stats.TotalTeleports}", labelStyle); num += 30f; GUI.Label(new Rect(x, num, ((Rect)(ref windowRect)).width - 40f, 25f), $"Total Money Spent: ${stats.TotalMoneySpent}", labelStyle); num += 30f; List> list = stats.UsageCounts.OrderByDescending, int>((KeyValuePair kv) => kv.Value).Take(5).ToList(); if (list.Count > 0) { DrawSectionHeader(num, "Most Used Locations", labelStyle); num += 35f; foreach (KeyValuePair item in list) { int num2 = item.Key.IndexOf(':'); string category = ((num2 >= 0) ? item.Key.Substring(0, num2) : item.Key); string value = ((num2 >= 0) ? item.Key.Substring(num2 + 1) : ""); string text = $"{GetCategoryDisplayName(category)} · {value} — {item.Value}x"; GUI.Label(new Rect(x, num, ((Rect)(ref windowRect)).width - 40f, 25f), text, GetSingleLineLabelStyle(labelStyle)); num += 28f; } } else { GUI.Label(new Rect(x, num, ((Rect)(ref windowRect)).width - 40f, 25f), "No teleports recorded yet.", GetCenteredLabelStyle()); num += 30f; } num += 15f; if (ConfirmableActionButton(new Rect(x, num, ((Rect)(ref windowRect)).width - 40f, 40f), "reset:stats", "Reset Statistics", "Click Again to Confirm", buttonStyle)) { stats = new TeleportStats(); SaveAllData(); } num += 45f; if (GUI.Button(new Rect(x, num, ((Rect)(ref windowRect)).width - 40f, 40f), "Back", buttonStyle)) { currentMenu = MenuState.Settings; scrollPosition = Vector2.zero; pendingConfirmId = null; } } private void DrawLocationSubMenu(GUIStyle buttonStyle) { //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Unknown result type (might be due to invalid IL or missing references) //IL_023c: Unknown result type (might be due to invalid IL or missing references) //IL_0285: Unknown result type (might be due to invalid IL or missing references) //IL_01d6: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_02c7: 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_02fc: Unknown result type (might be due to invalid IL or missing references) //IL_0700: Unknown result type (might be due to invalid IL or missing references) //IL_0705: Unknown result type (might be due to invalid IL or missing references) //IL_04c7: Unknown result type (might be due to invalid IL or missing references) //IL_047b: Unknown result type (might be due to invalid IL or missing references) //IL_048c: Unknown result type (might be due to invalid IL or missing references) //IL_060f: Unknown result type (might be due to invalid IL or missing references) //IL_0544: Unknown result type (might be due to invalid IL or missing references) float num = 20f; float num2 = 40f; float num3 = 40f; List list = (from l in allLocations where l.Category == currentCategory && (!string.IsNullOrEmpty(l.Name) || !IsUserManagedCategory(currentCategory)) where IsUserManagedCategory(currentCategory) || string.IsNullOrEmpty(searchQuery) || l.Name.Contains(searchQuery, StringComparison.OrdinalIgnoreCase) select l).ToList(); Vector3? playerPos = (((Object)(object)Player.Local != (Object)null) ? new Vector3?(((Component)Player.Local).transform.position) : ((Vector3?)null)); if (settings.sortByDistance && playerPos.HasValue) { list = list.OrderBy((TeleportLocation l) => Vector3.Distance(playerPos.Value, l.Position.ToVector3())).ToList(); } float rowButtonHeight = RowButtonHeight; if (playerPos.HasValue) { string text = (settings.sortByDistance ? "Sort: Nearest First" : "Sort: Default Order"); if (GUI.Button(new Rect(x, num, ((Rect)(ref windowRect)).width - 40f, 25f), text, buttonStyle)) { settings.sortByDistance = !settings.sortByDistance; SaveAllData(); } num += 30f; } if (!IsUserManagedCategory(currentCategory)) { GUI.Label(new Rect(x, num, ((Rect)(ref windowRect)).width - 70f, 25f), "Search: " + searchQuery, GetSingleLineLabelStyle(GetLabelStyle())); if (!string.IsNullOrEmpty(searchQuery) && GUI.Button(new Rect(((Rect)(ref windowRect)).width - 45f, num, 25f, 25f), "X", GetDeleteButtonStyle())) { searchQuery = ""; } num += 30f; } if (IsUserManagedCategory(currentCategory)) { GUI.Label(new Rect(20f, num, ((Rect)(ref windowRect)).width - 40f, 30f), "Enter Name: " + newLocationName, GetSingleLineLabelStyle(GetLabelStyle())); num += 35f; if (GUI.Button(new Rect(x, num, ((Rect)(ref windowRect)).width - 40f, rowButtonHeight), "Save Current Location", buttonStyle)) { SaveCurrentLocation(); } num += RowSpacing; if (GUI.Button(new Rect(x, num, ((Rect)(ref windowRect)).width - 40f, rowButtonHeight), "Set Safety Teleport", buttonStyle) && (Object)(object)Player.Local != (Object)null) { safetyTeleportPosition = new SerializableVector3(((Component)Player.Local).transform.position); SaveAllData(); MelonLogger.Msg($"Safety Teleport location saved at ({safetyTeleportPosition.x}, {safetyTeleportPosition.y}, {safetyTeleportPosition.z})"); } num += RowSpacing; } foreach (TeleportLocation loc in list) { float num4 = ((Rect)(ref windowRect)).width - 40f; if (settings.showFavoriteStar) { num4 -= num2 + 5f; } if (IsUserManagedCategory(currentCategory)) { num4 -= num3 + 5f; } string text2 = loc.Name ?? ""; if (string.IsNullOrEmpty(loc.Name)) { text2 = "Unnamed Location"; } if (playerPos.HasValue) { text2 += $" ({Mathf.RoundToInt(Vector3.Distance(playerPos.Value, loc.Position.ToVector3()))}m)"; } if (GUI.Button(new Rect(x, num, num4, rowButtonHeight), text2, buttonStyle)) { TeleportToLocation(loc); } float num5 = x + num4 + 5f; if (settings.showFavoriteStar) { string text3 = (loc.IsFavorite ? "★" : "☆"); GUIStyle favoriteButtonStyle = GetFavoriteButtonStyle(loc.IsFavorite); if (GUI.Button(new Rect(num5, num, num2, rowButtonHeight), text3, favoriteButtonStyle)) { loc.IsFavorite = !loc.IsFavorite; if (loc.IsFavorite) { if (!favoriteLocations.Any((TeleportLocation f) => f.Name == loc.Name && f.Category == loc.Category)) { favoriteLocations.Add(loc); } } else { favoriteLocations.RemoveAll((TeleportLocation f) => f.Name == loc.Name && f.Category == loc.Category); } SaveAllData(); } num5 += num2 + 5f; } if (IsUserManagedCategory(currentCategory) && ConfirmableDeleteButton(new Rect(num5, num, num3, rowButtonHeight), "loc:" + loc.Category + ":" + loc.Name)) { savedLocations.RemoveAll((TeleportLocation l) => l.Name == loc.Name && l.Category == loc.Category); allLocations.RemoveAll((TeleportLocation l) => l.Name == loc.Name && l.Category == loc.Category); favoriteLocations.RemoveAll((TeleportLocation f) => f.Name == loc.Name && f.Category == loc.Category); SaveAllData(); break; } num += RowSpacing; } if (GUI.Button(new Rect(x, num, ((Rect)(ref windowRect)).width - 40f, 40f), "Back", buttonStyle)) { currentMenu = MenuState.Main; scrollPosition = Vector2.zero; searchQuery = ""; pendingConfirmId = null; } } private void InitializeAllLocations() { //IL_0032: 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_00be: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_014a: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Unknown result type (might be due to invalid IL or missing references) //IL_01d6: Unknown result type (might be due to invalid IL or missing references) //IL_021c: 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_02a8: Unknown result type (might be due to invalid IL or missing references) //IL_02ee: Unknown result type (might be due to invalid IL or missing references) //IL_0334: Unknown result type (might be due to invalid IL or missing references) //IL_037a: 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_0406: 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_0492: Unknown result type (might be due to invalid IL or missing references) //IL_04d8: Unknown result type (might be due to invalid IL or missing references) //IL_051e: Unknown result type (might be due to invalid IL or missing references) //IL_0564: Unknown result type (might be due to invalid IL or missing references) //IL_05aa: 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_0636: Unknown result type (might be due to invalid IL or missing references) //IL_067c: Unknown result type (might be due to invalid IL or missing references) //IL_06c2: Unknown result type (might be due to invalid IL or missing references) //IL_0708: Unknown result type (might be due to invalid IL or missing references) //IL_074e: Unknown result type (might be due to invalid IL or missing references) //IL_0794: Unknown result type (might be due to invalid IL or missing references) //IL_07da: Unknown result type (might be due to invalid IL or missing references) //IL_0820: Unknown result type (might be due to invalid IL or missing references) //IL_0866: Unknown result type (might be due to invalid IL or missing references) //IL_08ac: Unknown result type (might be due to invalid IL or missing references) //IL_08f2: Unknown result type (might be due to invalid IL or missing references) //IL_0938: Unknown result type (might be due to invalid IL or missing references) //IL_097e: Unknown result type (might be due to invalid IL or missing references) //IL_09c4: Unknown result type (might be due to invalid IL or missing references) //IL_0a0a: Unknown result type (might be due to invalid IL or missing references) //IL_0a50: Unknown result type (might be due to invalid IL or missing references) //IL_0a96: Unknown result type (might be due to invalid IL or missing references) //IL_0adc: Unknown result type (might be due to invalid IL or missing references) //IL_0b22: Unknown result type (might be due to invalid IL or missing references) //IL_0b68: Unknown result type (might be due to invalid IL or missing references) //IL_0bae: Unknown result type (might be due to invalid IL or missing references) //IL_0bf4: Unknown result type (might be due to invalid IL or missing references) //IL_0c3a: Unknown result type (might be due to invalid IL or missing references) //IL_0c80: Unknown result type (might be due to invalid IL or missing references) //IL_0cc6: Unknown result type (might be due to invalid IL or missing references) //IL_0d0c: Unknown result type (might be due to invalid IL or missing references) //IL_0d52: Unknown result type (might be due to invalid IL or missing references) //IL_0d98: Unknown result type (might be due to invalid IL or missing references) //IL_0dde: Unknown result type (might be due to invalid IL or missing references) //IL_0e24: Unknown result type (might be due to invalid IL or missing references) //IL_0e6a: Unknown result type (might be due to invalid IL or missing references) //IL_0eb0: Unknown result type (might be due to invalid IL or missing references) //IL_0ef6: Unknown result type (might be due to invalid IL or missing references) //IL_0f3c: Unknown result type (might be due to invalid IL or missing references) //IL_0f82: Unknown result type (might be due to invalid IL or missing references) //IL_0fc8: Unknown result type (might be due to invalid IL or missing references) //IL_100e: Unknown result type (might be due to invalid IL or missing references) //IL_1054: Unknown result type (might be due to invalid IL or missing references) //IL_109a: Unknown result type (might be due to invalid IL or missing references) //IL_10e0: Unknown result type (might be due to invalid IL or missing references) //IL_1126: Unknown result type (might be due to invalid IL or missing references) //IL_116c: Unknown result type (might be due to invalid IL or missing references) allLocations = new List(); allLocations.Add(new TeleportLocation { Name = "RV", Position = new SerializableVector3(new Vector3(14f, 0.9f, -77f)), Category = "Properties" }); allLocations.Add(new TeleportLocation { Name = "Motel", Position = new SerializableVector3(new Vector3(-66f, 1.6f, 83f)), Category = "Properties" }); allLocations.Add(new TeleportLocation { Name = "Sweatshop", Position = new SerializableVector3(new Vector3(-64f, 0.4f, 142f)), Category = "Properties" }); allLocations.Add(new TeleportLocation { Name = "Storage Unit", Position = new SerializableVector3(new Vector3(-5.1f, 1f, 103f)), Category = "Properties" }); allLocations.Add(new TeleportLocation { Name = "Bungalow", Position = new SerializableVector3(new Vector3(-168f, -2.7f, 114f)), Category = "Properties" }); allLocations.Add(new TeleportLocation { Name = "Barn", Position = new SerializableVector3(new Vector3(181f, 1f, -14f)), Category = "Properties" }); allLocations.Add(new TeleportLocation { Name = "Docks Warehouse", Position = new SerializableVector3(new Vector3(-81f, -1.5f, -59f)), Category = "Properties" }); allLocations.Add(new TeleportLocation { Name = "Manor (Inside Gate)", Position = new SerializableVector3(new Vector3(163f, 11f, -71f)), Category = "Properties" }); allLocations.Add(new TeleportLocation { Name = "Manor (Outside Gate)", Position = new SerializableVector3(new Vector3(166f, 11f, -79f)), Category = "Properties" }); allLocations.Add(new TeleportLocation { Name = "Laundromat", Position = new SerializableVector3(new Vector3(-22.5f, 1f, 25f)), Category = "Businesses" }); allLocations.Add(new TeleportLocation { Name = "Post Office", Position = new SerializableVector3(new Vector3(47f, 1f, 5f)), Category = "Businesses" }); allLocations.Add(new TeleportLocation { Name = "Car Wash", Position = new SerializableVector3(new Vector3(-8.5f, 1f, -19f)), Category = "Businesses" }); allLocations.Add(new TeleportLocation { Name = "Taco Ticklers", Position = new SerializableVector3(new Vector3(-30f, 1f, 62f)), Category = "Businesses" }); allLocations.Add(new TeleportLocation { Name = "Dan's Hardware", Position = new SerializableVector3(new Vector3(-21f, -3f, 137f)), Category = "Stores" }); allLocations.Add(new TeleportLocation { Name = "Handy Hank's", Position = new SerializableVector3(new Vector3(104f, 1f, 25f)), Category = "Stores" }); allLocations.Add(new TeleportLocation { Name = "Gas-Mart", Position = new SerializableVector3(new Vector3(-113f, -2.9f, 68f)), Category = "Stores" }); allLocations.Add(new TeleportLocation { Name = "Gas-Mart/Auto Shop", Position = new SerializableVector3(new Vector3(16f, 1f, -16.5f)), Category = "Stores" }); allLocations.Add(new TeleportLocation { Name = "Pawnshop", Position = new SerializableVector3(new Vector3(-61.3f, 1f, 53f)), Category = "Stores" }); allLocations.Add(new TeleportLocation { Name = "Shred Shack", Position = new SerializableVector3(new Vector3(-39f, -2.9f, 121f)), Category = "Stores" }); allLocations.Add(new TeleportLocation { Name = "Ray's Real Estate", Position = new SerializableVector3(new Vector3(81.5f, 1f, -7f)), Category = "Stores" }); allLocations.Add(new TeleportLocation { Name = "Blueball's Boutique", Position = new SerializableVector3(new Vector3(71f, 1f, -8f)), Category = "Stores" }); allLocations.Add(new TeleportLocation { Name = "Thrifty Threads", Position = new SerializableVector3(new Vector3(-22.5f, 1f, 12f)), Category = "Stores" }); allLocations.Add(new TeleportLocation { Name = "Top Tattoo", Position = new SerializableVector3(new Vector3(-130f, -2.9f, 67.4f)), Category = "Stores" }); allLocations.Add(new TeleportLocation { Name = "Benji Coleman", Position = new SerializableVector3(new Vector3(-67f, 1.6f, 88f)), Category = "Dealers" }); allLocations.Add(new TeleportLocation { Name = "Molly Presley", Position = new SerializableVector3(new Vector3(-166f, -2.8f, 93f)), Category = "Dealers" }); allLocations.Add(new TeleportLocation { Name = "Brad Crosby", Position = new SerializableVector3(new Vector3(2.6f, 1f, 83f)), Category = "Dealers" }); allLocations.Add(new TeleportLocation { Name = "Jane Lucero", Position = new SerializableVector3(new Vector3(-27.4f, 0.9f, -82f)), Category = "Dealers" }); allLocations.Add(new TeleportLocation { Name = "Wei Long", Position = new SerializableVector3(new Vector3(65f, 5f, -67f)), Category = "Dealers" }); allLocations.Add(new TeleportLocation { Name = "Leo Rivers", Position = new SerializableVector3(new Vector3(149f, 1.7f, 65f)), Category = "Dealers" }); allLocations.Add(new TeleportLocation { Name = "Warehouse (Inside)", Position = new SerializableVector3(new Vector3(-42f, -1f, 38f)), Category = "World" }); allLocations.Add(new TeleportLocation { Name = "Warehouse (Outside)", Position = new SerializableVector3(new Vector3(-42f, -1.5f, 43f)), Category = "World" }); allLocations.Add(new TeleportLocation { Name = "Casino", Position = new SerializableVector3(new Vector3(22.8f, 2f, 89f)), Category = "World" }); allLocations.Add(new TeleportLocation { Name = "Construction site", Position = new SerializableVector3(new Vector3(-130f, -3f, 97f)), Category = "World" }); allLocations.Add(new TeleportLocation { Name = "Water Front", Position = new SerializableVector3(new Vector3(51.5f, 1f, 95f)), Category = "World" }); allLocations.Add(new TeleportLocation { Name = "Westville", Position = new SerializableVector3(new Vector3(-137.2f, -3f, 44f)), Category = "World" }); allLocations.Add(new TeleportLocation { Name = "Outside Sewer Office", Position = new SerializableVector3(new Vector3(48f, -8f, 66f)), Category = "World" }); allLocations.Add(new TeleportLocation { Name = "North Arcade Wall", Position = new SerializableVector3(new Vector3(-48f, -3f, 148f)), Category = "Dead Drops" }); allLocations.Add(new TeleportLocation { Name = "Behind Thompson Construction", Position = new SerializableVector3(new Vector3(-36f, 1f, 113f)), Category = "Dead Drops" }); allLocations.Add(new TeleportLocation { Name = "Taco Ticklers Exterior Wall", Position = new SerializableVector3(new Vector3(-24f, 1f, 82f)), Category = "Dead Drops" }); allLocations.Add(new TeleportLocation { Name = "Skate Park", Position = new SerializableVector3(new Vector3(-41f, 1f, 87f)), Category = "Dead Drops" }); allLocations.Add(new TeleportLocation { Name = "Behind Motel Office", Position = new SerializableVector3(new Vector3(-66f, 1f, 77f)), Category = "Dead Drops" }); allLocations.Add(new TeleportLocation { Name = "Under West Bridge", Position = new SerializableVector3(new Vector3(-89f, -3f, 67f)), Category = "Dead Drops" }); allLocations.Add(new TeleportLocation { Name = "Behind Gas-Mart", Position = new SerializableVector3(new Vector3(-113f, -3f, 55f)), Category = "Dead Drops" }); allLocations.Add(new TeleportLocation { Name = "Alleyway Behind Top Tattoo", Position = new SerializableVector3(new Vector3(-139f, -3f, 73f)), Category = "Dead Drops" }); allLocations.Add(new TeleportLocation { Name = "Brown Apartment Block", Position = new SerializableVector3(new Vector3(-171f, -3f, 93f)), Category = "Dead Drops" }); allLocations.Add(new TeleportLocation { Name = "Pawn Shop West Wall", Position = new SerializableVector3(new Vector3(-67f, 1f, 52f)), Category = "Dead Drops" }); allLocations.Add(new TeleportLocation { Name = "Alleyway Behind The Laundromat", Position = new SerializableVector3(new Vector3(-34f, -2f, 25f)), Category = "Dead Drops" }); allLocations.Add(new TeleportLocation { Name = "Alleyway Behind Slop Shop", Position = new SerializableVector3(new Vector3(-3f, 1f, 32f)), Category = "Dead Drops" }); allLocations.Add(new TeleportLocation { Name = "Alleyway Behind Grocery Store", Position = new SerializableVector3(new Vector3(6f, 1f, 72f)), Category = "Dead Drops" }); allLocations.Add(new TeleportLocation { Name = "Behind The Supermarket", Position = new SerializableVector3(new Vector3(25f, 1f, 69f)), Category = "Dead Drops" }); allLocations.Add(new TeleportLocation { Name = "Behind Crimson Canary", Position = new SerializableVector3(new Vector3(46f, 1f, 66f)), Category = "Dead Drops" }); allLocations.Add(new TeleportLocation { Name = "Behind Medical Practice", Position = new SerializableVector3(new Vector3(98f, 1f, 72f)), Category = "Dead Drops" }); allLocations.Add(new TeleportLocation { Name = "Behind Fire Station", Position = new SerializableVector3(new Vector3(114f, 1f, 38f)), Category = "Dead Drops" }); allLocations.Add(new TeleportLocation { Name = "Behind Bank", Position = new SerializableVector3(new Vector3(76f, 1f, 36f)), Category = "Dead Drops" }); allLocations.Add(new TeleportLocation { Name = "Fountain", Position = new SerializableVector3(new Vector3(48f, 1f, 32f)), Category = "Dead Drops" }); allLocations.Add(new TeleportLocation { Name = "Central Canal", Position = new SerializableVector3(new Vector3(26f, -1f, 13f)), Category = "Dead Drops" }); allLocations.Add(new TeleportLocation { Name = "Behind Auto Shops", Position = new SerializableVector3(new Vector3(2f, 1f, -4f)), Category = "Dead Drops" }); allLocations.Add(new TeleportLocation { Name = "Grey Docks Building", Position = new SerializableVector3(new Vector3(-47f, -1.5f, -72f)), Category = "Dead Drops" }); allLocations.Add(new TeleportLocation { Name = "Behind Randys Bait Tackle", Position = new SerializableVector3(new Vector3(-98f, -2f, -37f)), Category = "Dead Drops" }); allLocations.Add(new TeleportLocation { Name = "Gazebo", Position = new SerializableVector3(new Vector3(93f, 5f, -129f)), Category = "Dead Drops" }); allLocations.Add(new TeleportLocation { Name = "Albert Hoover's Stash", Position = new SerializableVector3(new Vector3(-18f, -3f, 147f)), Category = "Supplier Stashes" }); allLocations.Add(new TeleportLocation { Name = "Shirley Watt's Stash", Position = new SerializableVector3(new Vector3(-66f, -1.5f, 32f)), Category = "Supplier Stashes" }); allLocations.Add(new TeleportLocation { Name = "Fungul Phil's Stash", Position = new SerializableVector3(new Vector3(13.1f, 1f, 0.4f)), Category = "Supplier Stashes" }); allLocations.Add(new TeleportLocation { Name = "Salvador Moreno's Stash", Position = new SerializableVector3(new Vector3(148f, 1f, 35f)), Category = "Supplier Stashes" }); foreach (TeleportLocation savedLocation in savedLocations) { allLocations.Add(savedLocation); } } private static void DrawTextureRect(Rect rect, Texture2D texture) { //IL_0012: Unknown result type (might be due to invalid IL or missing references) blitStyle.normal.background = texture; GUI.Label(rect, GUIContent.none, blitStyle); } private static Color SettingsColor(int r, int g, int b, int a = 255) { //IL_0020: Unknown result type (might be due to invalid IL or missing references) return new Color((float)r / 255f, (float)g / 255f, (float)b / 255f, (float)a / 255f); } private static Color Lighten(Color c, float amount) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) return Color.Lerp(c, Color.white, amount); } private static Color Darken(Color c, float amount) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) return Color.Lerp(c, Color.black, amount); } private static string ColorKey(Color color) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_004f: 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) return $"{(int)(color.r * 255f)}_{(int)(color.g * 255f)}_{(int)(color.b * 255f)}_{(int)(color.a * 255f)}"; } private static Texture2D GetSolidTexture(Color color) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) string key = ColorKey(color); if (solidTextureCache.TryGetValue(key, out Texture2D value) && (Object)(object)value != (Object)null) { return value; } Texture2D val = new Texture2D(1, 1); val.SetPixel(0, 0, color); val.Apply(); solidTextureCache[key] = val; return val; } private static Texture2D GetRoundedTexture(Color color, int radius, int size = 16) { //IL_000c: 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_007d: Expected O, but got Unknown //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) string key = $"{ColorKey(color)}_{radius}_{size}"; if (roundedTextureCache.TryGetValue(key, out Texture2D value) && (Object)(object)value != (Object)null) { return value; } Texture2D val = new Texture2D(size, size, (TextureFormat)5, false); for (int i = 0; i < size; i++) { for (int j = 0; j < size; j++) { float num = 1f; int num2 = ((j < radius) ? radius : ((j >= size - radius) ? (size - radius - 1) : (-1))); int num3 = ((i < radius) ? radius : ((i >= size - radius) ? (size - radius - 1) : (-1))); if (num2 >= 0 && num3 >= 0) { float num4 = Vector2.Distance(new Vector2((float)j + 0.5f, (float)i + 0.5f), new Vector2((float)num2, (float)num3)); num = Mathf.Clamp01((float)radius - num4 + 0.5f); } val.SetPixel(j, i, new Color(color.r, color.g, color.b, color.a * num)); } } val.Apply(); ((Texture)val).wrapMode = (TextureWrapMode)1; roundedTextureCache[key] = val; return val; } private string GetBreadcrumb() { if (!settings.showBreadcrumb) { return "Teleport Menu"; } MenuState menuState = currentMenu; if (1 == 0) { } string result = menuState switch { MenuState.Main => "Teleport Menu", MenuState.Favorites => "Teleport Menu · Favorites", MenuState.Settings => "Teleport Menu · Settings", MenuState.SubMenu => "Teleport Menu · " + GetCategoryDisplayName(currentCategory), MenuState.Statistics => "Teleport Menu · Settings · Statistics", MenuState.SettingsKeybinds => "Teleport Menu · Settings · Keybinds", MenuState.SettingsAppearance => "Teleport Menu · Settings · Appearance", MenuState.SettingsCost => "Teleport Menu · Settings · Cost & Cooldown", MenuState.SettingsToggles => "Teleport Menu · Settings · Feature Toggles", MenuState.SettingsCategories => "Teleport Menu · Settings · Categories", MenuState.SettingsPresets => "Teleport Menu · Settings · Presets", MenuState.SettingsData => "Teleport Menu · Settings · Data & Backup", _ => "Teleport Menu", }; if (1 == 0) { } return result; } private void DrawSectionHeader(float y, string title, GUIStyle labelStyle) { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) GUI.Label(new Rect(x, y, ((Rect)(ref windowRect)).width - 40f, 25f), title, GetCenteredLabelStyle()); Color color = GUI.color; GUI.color = Color.white; Color color2 = SettingsColor(settings.accentBarR, settings.accentBarG, settings.accentBarB); DrawTextureRect(new Rect(((Rect)(ref windowRect)).width / 2f - 40f, y + 24f, 80f, 1f), GetSolidTexture(color2)); GUI.color = color; } private void DrawResizeGrip() { //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0070: 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_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) Rect val = default(Rect); ((Rect)(ref val))..ctor(((Rect)(ref windowRect)).width - 16f, ((Rect)(ref windowRect)).height - 16f, 16f, 16f); Color color = GUI.color; GUI.color = Color.white; Color c = SettingsColor(settings.backgroundR, settings.backgroundG, settings.backgroundB); Texture2D solidTexture = GetSolidTexture(Lighten(c, 0.4f)); for (int i = 0; i < 3; i++) { for (int j = 0; j <= i; j++) { float num = ((Rect)(ref val)).xMax - 12f + (float)i * 5f; float num2 = ((Rect)(ref val)).yMax - 4f - (float)j * 5f; DrawTextureRect(new Rect(num - 2.5f, num2 - 2.5f, 2.5f, 2.5f), solidTexture); } } GUI.color = color; } private void CloseMenu() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) isMenuOpen = false; Cursor.visible = cursorWasVisible; Cursor.lockState = cursorWasLockState; if ((Object)(object)PlayerSingleton.Instance != (Object)null) { ((Behaviour)PlayerSingleton.Instance).enabled = true; } if ((Object)(object)PlayerSingleton.Instance != (Object)null) { ((Behaviour)PlayerSingleton.Instance).enabled = true; } if (blockedKeyboard != null) { InputSystem.EnableDevice((InputDevice)(object)blockedKeyboard); blockedKeyboard = null; } if (blockedMouse != null) { InputSystem.EnableDevice((InputDevice)(object)blockedMouse); blockedMouse = null; } } public override void OnGUI() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Invalid comparison between Unknown and I4 //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Invalid comparison between Unknown and I4 //IL_01e2: Unknown result type (might be due to invalid IL or missing references) //IL_01e7: Unknown result type (might be due to invalid IL or missing references) //IL_01e9: Unknown result type (might be due to invalid IL or missing references) //IL_021a: Unknown result type (might be due to invalid IL or missing references) //IL_0224: Unknown result type (might be due to invalid IL or missing references) //IL_0229: Unknown result type (might be due to invalid IL or missing references) //IL_026f: Unknown result type (might be due to invalid IL or missing references) //IL_0274: Unknown result type (might be due to invalid IL or missing references) //IL_028b: Unknown result type (might be due to invalid IL or missing references) //IL_0296: Unknown result type (might be due to invalid IL or missing references) //IL_02b7: Unknown result type (might be due to invalid IL or missing references) //IL_02bc: Unknown result type (might be due to invalid IL or missing references) //IL_030b: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0338: Unknown result type (might be due to invalid IL or missing references) //IL_033d: Unknown result type (might be due to invalid IL or missing references) //IL_0346: 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_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_04ce: Unknown result type (might be due to invalid IL or missing references) //IL_04d3: Unknown result type (might be due to invalid IL or missing references) //IL_04ea: Unknown result type (might be due to invalid IL or missing references) //IL_050b: Unknown result type (might be due to invalid IL or missing references) //IL_0510: Unknown result type (might be due to invalid IL or missing references) //IL_0520: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0388: Unknown result type (might be due to invalid IL or missing references) //IL_038d: Unknown result type (might be due to invalid IL or missing references) //IL_0398: Unknown result type (might be due to invalid IL or missing references) //IL_039d: Unknown result type (might be due to invalid IL or missing references) //IL_03a2: Unknown result type (might be due to invalid IL or missing references) //IL_0366: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Unknown result type (might be due to invalid IL or missing references) //IL_0182: Unknown result type (might be due to invalid IL or missing references) //IL_01a0: Unknown result type (might be due to invalid IL or missing references) //IL_0418: Unknown result type (might be due to invalid IL or missing references) //IL_0426: Unknown result type (might be due to invalid IL or missing references) //IL_0442: Unknown result type (might be due to invalid IL or missing references) //IL_0447: 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_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) if (isMenuOpen && (int)Event.current.type == 0 && Event.current.button == 1 && currentMenu != MenuState.Main) { currentMenu = GetParentMenu(currentMenu); scrollPosition = Vector2.zero; searchQuery = ""; pendingConfirmId = null; Event.current.Use(); } if (waitingForKey != null && (int)Event.current.type == 4) { KeyCode keyCode = Event.current.keyCode; if ((int)keyCode > 0) { if (waitingForKey == "menuKey") { settings.menuKey = keyCode; MelonLogger.Msg($"[Teleport Menu] Menu key set to {keyCode}"); } else if (waitingForKey == "safetyTeleportKey") { settings.safetyTeleportKey = keyCode; MelonLogger.Msg($"[Teleport Menu] Safety teleport key set to {keyCode}"); } else if (waitingForKey == "undoTeleportKey") { settings.undoTeleportKey = keyCode; MelonLogger.Msg($"[Teleport Menu] Undo teleport key set to {keyCode}"); } waitingForKey = null; SaveAllData(); Event.current.Use(); } } if (isMenuOpen) { Color color = GUI.color; GUI.color = Color.white; Color color2 = Lighten(SettingsColor(settings.backgroundR, settings.backgroundG, settings.backgroundB), 0.2f); DrawTextureRect(new Rect(((Rect)(ref windowRect)).x - 1f, ((Rect)(ref windowRect)).y - 1f, ((Rect)(ref windowRect)).width + 2f, ((Rect)(ref windowRect)).height + 2f), GetRoundedTexture(color2, CornerRadius + 1)); GUI.color = color; windowRect = GUI.Window(0, windowRect, WindowFunction.op_Implicit((Action)DrawWindow), "", GetWindowStyle()); Rect val = default(Rect); ((Rect)(ref val))..ctor(((Rect)(ref windowRect)).x + ((Rect)(ref windowRect)).width - 20f - 4f, ((Rect)(ref windowRect)).y + 3f, 20f, 20f); if ((int)Event.current.type == 0) { Rect val2 = new Rect(((Rect)(ref windowRect)).x, ((Rect)(ref windowRect)).y, ((Rect)(ref windowRect)).width, 26f); if (((Rect)(ref val2)).Contains(Event.current.mousePosition) && (!settings.enableCloseButton || !((Rect)(ref val)).Contains(Event.current.mousePosition))) { isDragging = true; dragOffset = Vector2.op_Implicit(Input.mousePosition) - ((Rect)(ref windowRect)).position; Event.current.Use(); } } if (settings.enableResizeGrip) { Rect val3 = default(Rect); ((Rect)(ref val3))..ctor(((Rect)(ref windowRect)).x + ((Rect)(ref windowRect)).width - 16f, ((Rect)(ref windowRect)).y + ((Rect)(ref windowRect)).height - 16f, 16f, 16f); if ((int)Event.current.type == 0 && ((Rect)(ref val3)).Contains(Event.current.mousePosition)) { isResizing = true; resizeStartMousePosition = Vector2.op_Implicit(Input.mousePosition); resizeStartWindowSize = new Vector2(((Rect)(ref windowRect)).width, ((Rect)(ref windowRect)).height); Event.current.Use(); } } } if (isMenuOpen && (Event.current.isKey || Event.current.isMouse)) { Event.current.Use(); } if (fadeAlpha > 0f) { Color color3 = GUI.color; GUI.color = new Color(0f, 0f, 0f, fadeAlpha); DrawTextureRect(new Rect(0f, 0f, (float)Screen.width, (float)Screen.height), GetSolidTexture(Color.white)); GUI.color = color3; } } private bool TryGetActiveTextBuffer([NotNullWhen(true)] out Action? setter, [NotNullWhen(true)] out Func? getter) { if (renamingCategory != null) { setter = delegate(string v) { categoryRenameBuffer = v; }; getter = () => categoryRenameBuffer; return true; } if (currentMenu == MenuState.SubMenu && IsUserManagedCategory(currentCategory)) { setter = delegate(string v) { newLocationName = v; }; getter = () => newLocationName; return true; } if (currentMenu == MenuState.Main || currentMenu == MenuState.SubMenu || currentMenu == MenuState.Favorites) { setter = delegate(string v) { searchQuery = v; }; getter = () => searchQuery; return true; } if (currentMenu == MenuState.Settings) { setter = delegate(string v) { presetNameBuffer = v; }; getter = () => presetNameBuffer; return true; } setter = null; getter = null; return false; } private void HandleTyping() { //IL_0055: 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_005d: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Invalid comparison between Unknown and I4 //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Invalid comparison between Unknown and I4 //IL_00b7: Unknown result type (might be due to invalid IL or missing references) if (!isMenuOpen || !TryGetActiveTextBuffer(out Action setter, out Func getter)) { return; } string text = getter(); foreach (KeyCode value in Enum.GetValues(typeof(KeyCode))) { if (!Input.GetKeyDown(value)) { continue; } if ((int)value == 8) { if (text.Length > 0) { text = text.Substring(0, text.Length - 1); } } else if ((int)value != 13 && (int)value != 271) { string text2 = KeyCodeToString(value); if (!string.IsNullOrEmpty(text2)) { text += text2; } } } setter(text); } private unsafe string? KeyCodeToString(KeyCode key) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0004: Invalid comparison between Unknown and I4 //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Invalid comparison between Unknown and I4 //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Invalid comparison between Unknown and I4 //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Invalid comparison between Unknown and I4 //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Invalid comparison between Unknown and I4 //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Expected I4, but got Unknown //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Invalid comparison between Unknown and I4 //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Invalid comparison between Unknown and I4 if ((int)key >= 97 && (int)key <= 122) { string text = ((object)(*(KeyCode*)(&key))/*cast due to .constrained prefix*/).ToString(); if (Input.GetKey((KeyCode)304) || Input.GetKey((KeyCode)303)) { return text.ToUpper(); } return text.ToLower(); } if ((int)key >= 48 && (int)key <= 57) { return (key - 48).ToString(); } if ((int)key == 32) { return " "; } if ((int)key == 45) { return "-"; } if ((int)key == 46) { return "."; } return null; } private int ComputeStyleSignature() { HashCode hashCode = default(HashCode); hashCode.Add(settings.fontSize); hashCode.Add(settings.bold); hashCode.Add(settings.textColorR); hashCode.Add(settings.textColorG); hashCode.Add(settings.textColorB); hashCode.Add(settings.backgroundR); hashCode.Add(settings.backgroundG); hashCode.Add(settings.backgroundB); hashCode.Add(settings.backgroundA); hashCode.Add(settings.buttonHoverR); hashCode.Add(settings.buttonHoverG); hashCode.Add(settings.buttonHoverB); hashCode.Add(settings.accentBarR); hashCode.Add(settings.accentBarG); hashCode.Add(settings.accentBarB); hashCode.Add(settings.accentBarA); hashCode.Add(settings.cornerRadius); hashCode.Add(settings.scrollbarWidth); return hashCode.ToHashCode(); } private void EnsureStyleCacheCurrent() { int num = ComputeStyleSignature(); if (num != cachedStyleSignature) { cachedStyleSignature = num; cachedLabelStyle = null; cachedButtonStyle = null; cachedDeleteButtonStyle = null; cachedConfirmDeleteButtonStyle = null; cachedFavoriteButtonStyleOn = null; cachedFavoriteButtonStyleOff = null; cachedWindowStyle = null; cachedCenteredLabelStyle = null; cachedToggleLabelStyle = null; cachedScrollbarTrackStyle = null; cachedScrollbarThumbStyle = null; cachedToggleStyle = null; cachedSliderTrackStyle = null; cachedSliderThumbStyle = null; } } private GUIStyle GetLabelStyle() { EnsureStyleCacheCurrent(); return cachedLabelStyle ?? (cachedLabelStyle = BuildLabelStyle()); } private GUIStyle BuildLabelStyle() { //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_0022: 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_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Expected O, but got Unknown GUIStyle val = new GUIStyle(GUI.skin.label) { fontSize = settings.fontSize, fontStyle = (FontStyle)(settings.bold ? 1 : 0) }; val.normal.textColor = new Color((float)settings.textColorR / 255f, (float)settings.textColorG / 255f, (float)settings.textColorB / 255f); return val; } private Color TextColor() { //IL_0026: Unknown result type (might be due to invalid IL or missing references) return SettingsColor(settings.textColorR, settings.textColorG, settings.textColorB); } private GUIStyle GetButtonStyle() { EnsureStyleCacheCurrent(); return cachedButtonStyle ?? (cachedButtonStyle = BuildButtonStyle()); } private GUIStyle BuildButtonStyle() { //IL_0027: 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_0053: 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_0059: 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_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0092: 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_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Expected O, but got Unknown //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Expected O, but got Unknown //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Expected O, but got Unknown //IL_00f8: Expected O, but got Unknown //IL_0100: 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_012d: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_018e: Unknown result type (might be due to invalid IL or missing references) Color c = SettingsColor(settings.backgroundR, settings.backgroundG, settings.backgroundB); Color val = SettingsColor(settings.buttonHoverR, settings.buttonHoverG, settings.buttonHoverB); Color color = Lighten(c, 0.14f); Color color2 = Darken(val, 0.15f); GUIStyle val2 = new GUIStyle(GUI.skin.button) { fontSize = settings.fontSize, fontStyle = (FontStyle)(settings.bold ? 1 : 0), alignment = (TextAnchor)4, border = new RectOffset(CornerRadius, CornerRadius, CornerRadius, CornerRadius), margin = new RectOffset(0, 0, 0, 0), padding = new RectOffset(2, 2, 2, 2) }; val2.normal.textColor = TextColor(); val2.normal.background = GetRoundedTexture(color, CornerRadius); val2.hover.textColor = Color.white; val2.hover.background = GetRoundedTexture(val, CornerRadius); val2.active.textColor = Color.white; val2.active.background = GetRoundedTexture(color2, CornerRadius); val2.focused.textColor = val2.normal.textColor; val2.focused.background = val2.normal.background; return val2; } private float GetContentHeight() { switch (currentMenu) { case MenuState.Main: { if (!string.IsNullOrEmpty(searchQuery)) { int count2 = GetGlobalSearchResults().Count; float num7 = ((count2 == 0) ? 30f : (RowSpacing * (float)count2)); return 50f + num7 + 12f; } int count3 = GetOrderedVisibleCategories().Count; int num8 = 1 + count3 + 1; return 50f + RowSpacing * (float)(num8 - 1) + RowButtonHeight + 12f; } case MenuState.Favorites: { List list = favoriteLocations.Where((TeleportLocation f) => string.IsNullOrEmpty(searchQuery) || f.Name.Contains(searchQuery, StringComparison.OrdinalIgnoreCase)).ToList(); int num5 = list.Select((TeleportLocation f) => f.Category).Distinct().Count(); int count = list.Count; float num6 = (((Object)(object)Player.Local != (Object)null) ? 30f : 0f); return 50f + num6 + 30f * (float)num5 + RowSpacing * (float)count + 40f + 12f; } case MenuState.SubMenu: { bool managed = IsUserManagedCategory(currentCategory); int num9 = allLocations.Count((TeleportLocation l) => l.Category == currentCategory && (!string.IsNullOrEmpty(l.Name) || !managed) && (managed || string.IsNullOrEmpty(searchQuery) || l.Name.Contains(searchQuery, StringComparison.OrdinalIgnoreCase))); float num10 = (managed ? (35f + RowSpacing * 2f) : 30f); float num11 = (((Object)(object)Player.Local != (Object)null) ? 30f : 0f); return 20f + num11 + num10 + RowSpacing * (float)num9 + 40f + 12f; } case MenuState.Statistics: { int num3 = Mathf.Min(5, stats.UsageCounts.Count); float num4 = ((num3 > 0) ? (35f + (float)num3 * 28f) : 30f); return 80f + num4 + 15f + 45f + 40f + 12f; } case MenuState.Settings: { int num2 = 9; return 20f + RowSpacing * (float)(num2 - 1) + RowButtonHeight + 12f; } case MenuState.SettingsKeybinds: return 222f; case MenuState.SettingsAppearance: return 1130f; case MenuState.SettingsCost: return 495f; case MenuState.SettingsToggles: return 285f; case MenuState.SettingsCategories: return 167f + 28f * (float)GetAllManagedCategories().Count; case MenuState.SettingsPresets: { int num = Mathf.Max(1, settings.themePresets.Count); return 260f + 28f * (float)(BuiltInThemePresets.Count + num); } default: return 405f; } } private GUIStyle GetFavoriteButtonStyle(bool isFavorite) { EnsureStyleCacheCurrent(); if (isFavorite) { return cachedFavoriteButtonStyleOn ?? (cachedFavoriteButtonStyleOn = BuildFavoriteButtonStyle(isFavorite: true)); } return cachedFavoriteButtonStyleOff ?? (cachedFavoriteButtonStyleOff = BuildFavoriteButtonStyle(isFavorite: false)); } private GUIStyle BuildFavoriteButtonStyle(bool isFavorite) { //IL_0027: 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_0053: 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_0059: 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_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Expected O, but got Unknown //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Expected O, but got Unknown //IL_00d2: Expected O, but got Unknown //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: 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_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Unknown result type (might be due to invalid IL or missing references) Color c = SettingsColor(settings.backgroundR, settings.backgroundG, settings.backgroundB); Color val = SettingsColor(settings.buttonHoverR, settings.buttonHoverG, settings.buttonHoverB); Color color = Lighten(c, 0.14f); Color color2 = Darken(val, 0.15f); GUIStyle val2 = new GUIStyle(GUI.skin.button) { fontSize = settings.fontSize + 2, alignment = (TextAnchor)4, border = new RectOffset(CornerRadius, CornerRadius, CornerRadius, CornerRadius), margin = new RectOffset(0, 0, 0, 0) }; val2.normal.textColor = (isFavorite ? AccentGold : TextColor()); val2.normal.background = GetRoundedTexture(color, CornerRadius); val2.hover.textColor = (isFavorite ? Lighten(AccentGold, 0.2f) : Color.white); val2.hover.background = GetRoundedTexture(val, CornerRadius); val2.active.textColor = val2.hover.textColor; val2.active.background = GetRoundedTexture(color2, CornerRadius); return val2; } private GUIStyle GetDeleteButtonStyle() { EnsureStyleCacheCurrent(); return cachedDeleteButtonStyle ?? (cachedDeleteButtonStyle = BuildDeleteButtonStyle()); } private GUIStyle BuildDeleteButtonStyle() { //IL_0027: 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_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_004e: 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_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Expected O, but got Unknown //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Expected O, but got Unknown //IL_008b: Expected O, but got Unknown //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: 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) Color c = SettingsColor(settings.backgroundR, settings.backgroundG, settings.backgroundB); GUIStyle val = new GUIStyle(GUI.skin.button) { fontSize = settings.fontSize, alignment = (TextAnchor)4, border = new RectOffset(CornerRadius, CornerRadius, CornerRadius, CornerRadius), margin = new RectOffset(0, 0, 0, 0) }; val.normal.textColor = TextColor(); val.normal.background = GetRoundedTexture(Lighten(c, 0.14f), CornerRadius); val.hover.textColor = Color.white; val.hover.background = GetRoundedTexture(DangerRed, CornerRadius); val.active.textColor = Color.white; val.active.background = val.hover.background; return val; } private GUIStyle GetConfirmDeleteButtonStyle() { EnsureStyleCacheCurrent(); return cachedConfirmDeleteButtonStyle ?? (cachedConfirmDeleteButtonStyle = BuildConfirmDeleteButtonStyle()); } private GUIStyle BuildConfirmDeleteButtonStyle() { //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_0022: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_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_0053: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Expected O, but got Unknown //IL_005e: 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_006d: Expected O, but got Unknown //IL_006f: Expected O, but got Unknown //IL_0075: 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_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) GUIStyle val = new GUIStyle(GUI.skin.button) { fontSize = settings.fontSize, alignment = (TextAnchor)4, border = new RectOffset(CornerRadius, CornerRadius, CornerRadius, CornerRadius), margin = new RectOffset(0, 0, 0, 0), padding = new RectOffset(1, 1, 1, 1) }; val.normal.textColor = Color.white; val.normal.background = GetRoundedTexture(DangerRed, CornerRadius); val.hover.textColor = Color.white; val.hover.background = GetRoundedTexture(Lighten(DangerRed, 0.15f), CornerRadius); val.active.textColor = Color.white; val.active.background = val.hover.background; return val; } private bool ConfirmableActionButton(Rect rect, string id, string normalLabel, string confirmLabel, GUIStyle normalStyle) { //IL_0025: Unknown result type (might be due to invalid IL or missing references) bool flag = pendingConfirmId == id; GUIStyle val = (flag ? GetConfirmDeleteButtonStyle() : normalStyle); string text = (flag ? confirmLabel : normalLabel); if (GUI.Button(rect, text, val)) { if (flag) { pendingConfirmId = null; return true; } pendingConfirmId = id; } return false; } private bool ConfirmableDeleteButton(Rect rect, string id) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) return ConfirmableActionButton(rect, id, "X", "✓", GetDeleteButtonStyle()); } private GUIStyle GetWindowStyle() { EnsureStyleCacheCurrent(); return cachedWindowStyle ?? (cachedWindowStyle = BuildWindowStyle()); } private GUIStyle BuildWindowStyle() { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Expected O, but got Unknown //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Expected O, but got Unknown //IL_0077: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) Color color = SettingsColor(settings.backgroundR, settings.backgroundG, settings.backgroundB, settings.backgroundA); GUIStyle val = new GUIStyle(GUI.skin.window) { border = new RectOffset(CornerRadius, CornerRadius, CornerRadius, CornerRadius), padding = new RectOffset(0, 0, 0, 0) }; val.normal.background = GetRoundedTexture(color, CornerRadius); val.onNormal.background = val.normal.background; val.normal.textColor = Color.clear; return val; } private GUIStyle GetCenteredLabelStyle() { EnsureStyleCacheCurrent(); return cachedCenteredLabelStyle ?? (cachedCenteredLabelStyle = BuildCenteredLabelStyle()); } private GUIStyle BuildCenteredLabelStyle() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Expected O, but got Unknown GUIStyle val = new GUIStyle(GetLabelStyle()); val.alignment = (TextAnchor)4; return val; } private GUIStyle GetToggleLabelStyle() { EnsureStyleCacheCurrent(); return cachedToggleLabelStyle ?? (cachedToggleLabelStyle = BuildToggleLabelStyle()); } private GUIStyle BuildToggleLabelStyle() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Expected O, but got Unknown GUIStyle val = new GUIStyle(GetLabelStyle()); val.alignment = (TextAnchor)3; return val; } private GUIStyle GetSingleLineLabelStyle(GUIStyle baseStyle) { //IL_002b: 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_0045: Expected O, but got Unknown if (cachedSingleLineLabelStyle != null && cachedSingleLineLabelStyleBase == baseStyle) { return cachedSingleLineLabelStyle; } cachedSingleLineLabelStyleBase = baseStyle; cachedSingleLineLabelStyle = new GUIStyle(baseStyle) { wordWrap = false, clipping = (TextClipping)1 }; return cachedSingleLineLabelStyle; } private GUIStyle GetScrollbarTrackStyle() { EnsureStyleCacheCurrent(); return cachedScrollbarTrackStyle ?? (cachedScrollbarTrackStyle = BuildScrollbarTrackStyle()); } private GUIStyle BuildScrollbarTrackStyle() { //IL_0027: 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_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_004f: 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_0072: Expected O, but got Unknown //IL_0074: Expected O, but got Unknown //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) Color c = SettingsColor(settings.backgroundR, settings.backgroundG, settings.backgroundB); GUIStyle val = new GUIStyle(GUI.skin.verticalScrollbar) { fixedWidth = settings.scrollbarWidth, border = new RectOffset(CornerRadius, CornerRadius, CornerRadius, CornerRadius) }; val.normal.background = GetRoundedTexture(Darken(c, 0.15f), CornerRadius); return val; } private GUIStyle GetScrollbarThumbStyle() { EnsureStyleCacheCurrent(); return cachedScrollbarThumbStyle ?? (cachedScrollbarThumbStyle = BuildScrollbarThumbStyle()); } private GUIStyle BuildScrollbarThumbStyle() { //IL_0027: 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_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_004f: 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_0072: Expected O, but got Unknown //IL_0074: Expected O, but got Unknown //IL_007a: 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_009a: Unknown result type (might be due to invalid IL or missing references) Color val = SettingsColor(settings.accentBarR, settings.accentBarG, settings.accentBarB); GUIStyle val2 = new GUIStyle(GUI.skin.verticalScrollbarThumb) { fixedWidth = settings.scrollbarWidth, border = new RectOffset(CornerRadius, CornerRadius, CornerRadius, CornerRadius) }; val2.normal.background = GetRoundedTexture(val, CornerRadius); val2.hover.background = GetRoundedTexture(Lighten(val, 0.15f), CornerRadius); val2.active.background = val2.hover.background; return val2; } private GUIStyle GetToggleStyle() { EnsureStyleCacheCurrent(); return cachedToggleStyle ?? (cachedToggleStyle = BuildToggleStyle()); } private GUIStyle BuildToggleStyle() { //IL_0027: 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_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown //IL_008c: 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_009b: Expected O, but got Unknown //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Expected O, but got Unknown //IL_00ad: Expected O, but got Unknown //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: 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_0115: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) Color val = SettingsColor(settings.accentBarR, settings.accentBarG, settings.accentBarB); Color c = SettingsColor(settings.backgroundR, settings.backgroundG, settings.backgroundB); GUIStyle val2 = new GUIStyle(GUI.skin.toggle) { border = new RectOffset(CornerRadius, CornerRadius, CornerRadius, CornerRadius), padding = new RectOffset(0, 0, 0, 0), margin = new RectOffset(0, 0, 0, 0) }; val2.normal.background = GetRoundedTexture(Lighten(c, 0.14f), CornerRadius); val2.onNormal.background = GetRoundedTexture(val, CornerRadius); val2.hover.background = GetRoundedTexture(Lighten(c, 0.22f), CornerRadius); val2.onHover.background = GetRoundedTexture(Lighten(val, 0.15f), CornerRadius); val2.active.background = val2.normal.background; val2.onActive.background = val2.onNormal.background; return val2; } private GUIStyle GetSliderTrackStyle() { EnsureStyleCacheCurrent(); return cachedSliderTrackStyle ?? (cachedSliderTrackStyle = BuildSliderTrackStyle()); } private GUIStyle BuildSliderTrackStyle() { //IL_0027: 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_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Expected O, but got Unknown //IL_0073: 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) Color c = SettingsColor(settings.backgroundR, settings.backgroundG, settings.backgroundB); GUIStyle val = new GUIStyle(GUI.skin.horizontalSlider) { border = new RectOffset(CornerRadius, CornerRadius, CornerRadius, CornerRadius), fixedHeight = 6f }; val.normal.background = GetRoundedTexture(Darken(c, 0.1f), CornerRadius); return val; } private GUIStyle GetSliderThumbStyle() { EnsureStyleCacheCurrent(); return cachedSliderThumbStyle ?? (cachedSliderThumbStyle = BuildSliderThumbStyle()); } private GUIStyle BuildSliderThumbStyle() { //IL_0027: 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_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Expected O, but got Unknown //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) Color val = SettingsColor(settings.accentBarR, settings.accentBarG, settings.accentBarB); GUIStyle val2 = new GUIStyle(GUI.skin.horizontalSliderThumb) { border = new RectOffset(CornerRadius, CornerRadius, CornerRadius, CornerRadius), fixedWidth = 12f, fixedHeight = 14f }; val2.normal.background = GetRoundedTexture(val, CornerRadius); val2.hover.background = GetRoundedTexture(Lighten(val, 0.15f), CornerRadius); val2.active.background = val2.hover.background; return val2; } private void DrawWindow(int windowID) { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Expected O, but got Unknown //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: Unknown result type (might be due to invalid IL or missing references) //IL_01e2: Unknown result type (might be due to invalid IL or missing references) //IL_01f2: Unknown result type (might be due to invalid IL or missing references) //IL_01f7: Unknown result type (might be due to invalid IL or missing references) //IL_0335: Unknown result type (might be due to invalid IL or missing references) Color color = SettingsColor(settings.titleBarColorR, settings.titleBarColorG, settings.titleBarColorB, settings.titleBarColorA); Rect val = default(Rect); ((Rect)(ref val))..ctor(0f, 0f, ((Rect)(ref windowRect)).width, 26f); Color color2 = GUI.color; GUI.color = Color.white; DrawTextureRect(val, GetSolidTexture(color)); GUIStyle val2 = new GUIStyle { fontSize = settings.titleFontSize, fontStyle = (FontStyle)(settings.bold ? 1 : 0), alignment = (TextAnchor)4 }; val2.normal.textColor = SettingsColor(settings.titleTextColorR, settings.titleTextColorG, settings.titleTextColorB); GUI.Label(val, GetBreadcrumb(), val2); GUI.color = color2; if (settings.enableCloseButton && GUI.Button(new Rect(((Rect)(ref windowRect)).width - 20f - 4f, 3f, 20f, 20f), "×", GetDeleteButtonStyle())) { CloseMenu(); } GUIStyle verticalScrollbarThumb = GUI.skin.verticalScrollbarThumb; GUI.skin.verticalScrollbarThumb = GetScrollbarThumbStyle(); float contentHeight = GetContentHeight(); float num = ((Rect)(ref windowRect)).height - 26f - (settings.enableResizeGrip ? 16f : 0f); scrollPosition = GUI.BeginScrollView(new Rect(0f, 26f, ((Rect)(ref windowRect)).width, num), scrollPosition, new Rect(0f, 0f, ((Rect)(ref windowRect)).width - 20f, contentHeight), GUIStyle.none, GetScrollbarTrackStyle()); GUIStyle buttonStyle = GetButtonStyle(); GUIStyle labelStyle = GetLabelStyle(); switch (currentMenu) { case MenuState.Main: DrawMainMenu(buttonStyle); break; case MenuState.SubMenu: DrawLocationSubMenu(buttonStyle); break; case MenuState.Favorites: DrawFavoritesMenu(buttonStyle); break; case MenuState.Settings: DrawSettingsMenu(buttonStyle, labelStyle); break; case MenuState.Statistics: DrawStatisticsMenu(buttonStyle, labelStyle); break; case MenuState.SettingsKeybinds: DrawSettingsKeybinds(buttonStyle, labelStyle); break; case MenuState.SettingsAppearance: DrawSettingsAppearance(buttonStyle, labelStyle); break; case MenuState.SettingsCost: DrawSettingsCost(buttonStyle, labelStyle); break; case MenuState.SettingsToggles: DrawSettingsToggles(buttonStyle, labelStyle); break; case MenuState.SettingsCategories: DrawSettingsCategories(buttonStyle, labelStyle); break; case MenuState.SettingsPresets: DrawSettingsPresets(buttonStyle, labelStyle); break; case MenuState.SettingsData: DrawSettingsData(buttonStyle, labelStyle); break; } GUI.EndScrollView(); GUI.skin.verticalScrollbarThumb = verticalScrollbarThumb; if (settings.enableResizeGrip) { DrawResizeGrip(); } GUI.DragWindow(new Rect(0f, 0f, ((Rect)(ref windowRect)).width, 26f)); } } }