Decompiled source of LuckyEnhancements v1.4.3
LuckyEnhancements.dll
Decompiled a month ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections.Generic; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using System.Text; using BepInEx; using BepInEx.Configuration; using Microsoft.CodeAnalysis; using OpenShot; using OpenShot.Events; using OpenShot.UI; using Shooterlatro.Core.Localization; using Shooterlatro.Game; using Shooterlatro.Player; using Shooterlatro.Shop; using Shooterlatro.Weapons; using UnityEngine; using UnityEngine.InputSystem; using UnityEngine.InputSystem.Controls; using UnityEngine.InputSystem.Utilities; using UnityEngine.Profiling; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] [assembly: AssemblyCompany("LuckyEnhancements")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyDescription("QoL enhancements for Lucky Shot: FPS, clock, speedrun timer, FOV, filters, graphics. Configure via OpenShot MODS hub.")] [assembly: AssemblyFileVersion("1.4.3.0")] [assembly: AssemblyInformationalVersion("1.4.3+4135dd1490a61fe647f2a0e54287f36471f5cf7f")] [assembly: AssemblyProduct("LuckyEnhancements")] [assembly: AssemblyTitle("LuckyEnhancements")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.4.3.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace LuckyEnhancements { public static class ConfigManager { public static ConfigEntry<bool> ModEnabled { get; private set; } public static ConfigEntry<bool> EnableLegacyImguiMenu { get; private set; } public static ConfigEntry<bool> ForceVSyncOff { get; private set; } public static ConfigEntry<bool> Clock24Hour { get; private set; } public static ConfigEntry<string> ShowFps { get; private set; } public static ConfigEntry<int> FpsLimit { get; private set; } public static ConfigEntry<Key> OpenMenuKey { get; private set; } public static ConfigEntry<float> GameSpeed { get; private set; } public static ConfigEntry<float> Fov { get; private set; } public static ConfigEntry<bool> ShowStats { get; private set; } public static ConfigEntry<float> ShadowDistance { get; private set; } public static ConfigEntry<float> LodBias { get; private set; } public static ConfigEntry<int> AntiAliasing { get; private set; } public static ConfigEntry<int> TextureQuality { get; private set; } public static ConfigEntry<bool> PreserveWindowSize { get; private set; } public static ConfigEntry<float> WindowX { get; private set; } public static ConfigEntry<float> WindowY { get; private set; } public static ConfigEntry<float> WindowWidth { get; private set; } public static ConfigEntry<float> WindowHeight { get; private set; } public static ConfigEntry<string> ShowClock { get; private set; } public static ConfigEntry<int> ClockSize { get; private set; } public static ConfigEntry<string> ClockColorName { get; private set; } public static ConfigEntry<string> ShowSpeedrunTimer { get; private set; } public static ConfigEntry<int> TimerSize { get; private set; } public static ConfigEntry<string> TimerColorName { get; private set; } public static ConfigEntry<float> HudBgOpacity { get; private set; } public static ConfigEntry<string> HudFontStyle { get; private set; } public static ConfigEntry<bool> DontStopOnFocusLoss { get; private set; } public static ConfigEntry<int> HudSize { get; private set; } public static ConfigEntry<string> HudColorName { get; private set; } public static ConfigEntry<string> DisplayFilter { get; private set; } public static ConfigEntry<bool> EnableZoom { get; private set; } public static ConfigEntry<Key> ZoomKey { get; private set; } public static ConfigEntry<float> ZoomFov { get; private set; } public static ConfigEntry<string> ZoomType { get; private set; } public static ConfigEntry<bool> ZoomSensitivityScale { get; private set; } public static ConfigEntry<float> ZoomSensitivityMult { get; private set; } public static ConfigEntry<string> ShowSelectedBullet { get; private set; } public static ConfigEntry<int> SelectedBulletSize { get; private set; } public static ConfigEntry<float> SelectedBulletOffset { get; private set; } public static ConfigEntry<bool> ShowBulletQueue { get; private set; } public static ConfigEntry<Key> QuickRestartKey { get; private set; } public static ConfigEntry<string> SpeedrunHistoryData { get; private set; } public static ConfigEntry<string> SpeedrunPBsData { get; private set; } public static ConfigEntry<string> SpeedrunGoldsData { get; private set; } public static void Initialize(ConfigFile config) { //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Expected O, but got Unknown //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Expected O, but got Unknown //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Expected O, but got Unknown //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_0195: Expected O, but got Unknown //IL_01c3: Unknown result type (might be due to invalid IL or missing references) //IL_01cd: Expected O, but got Unknown //IL_01f3: Unknown result type (might be due to invalid IL or missing references) //IL_01fd: Expected O, but got Unknown //IL_021f: Unknown result type (might be due to invalid IL or missing references) //IL_0229: Expected O, but got Unknown //IL_0304: Unknown result type (might be due to invalid IL or missing references) //IL_030e: Expected O, but got Unknown //IL_0371: Unknown result type (might be due to invalid IL or missing references) //IL_037b: Expected O, but got Unknown //IL_03c8: Unknown result type (might be due to invalid IL or missing references) //IL_03d2: Expected O, but got Unknown //IL_04cb: Unknown result type (might be due to invalid IL or missing references) //IL_04d5: Expected O, but got Unknown //IL_053d: Unknown result type (might be due to invalid IL or missing references) //IL_0547: Expected O, but got Unknown //IL_058b: Unknown result type (might be due to invalid IL or missing references) //IL_0595: Expected O, but got Unknown //IL_05c3: Unknown result type (might be due to invalid IL or missing references) //IL_05cd: Expected O, but got Unknown ModEnabled = config.Bind<bool>("General", "Enabled", true, "Master switch for LuckyEnhancements overlays and tweaks."); EnableLegacyImguiMenu = config.Bind<bool>("General", "EnableLegacyImguiMenu", true, "Allow the old F1 IMGUI settings window (OpenShot MODS hub is preferred)."); ForceVSyncOff = config.Bind<bool>("Graphics", "ForceVSyncOff", true, "Force VSync off whenever an FPS limit is active."); Clock24Hour = config.Bind<bool>("UI", "Clock24Hour", true, "Use 24-hour format for the clock HUD."); ShowFps = config.Bind<string>("Graphics", "ShowFPS", "Off", "Where to show the FPS counter (Off, Left, Right, Middle)"); FpsLimit = config.Bind<int>("Graphics", "FPSLimit", -1, new ConfigDescription("Target frame rate (-1 = unlimited).", (AcceptableValueBase)(object)new AcceptableValueRange<int>(-1, 360), Array.Empty<object>())); OpenMenuKey = config.Bind<Key>("Keybinds", "OpenMenuKey", (Key)94, "The key used to open/close the legacy IMGUI settings menu."); GameSpeed = config.Bind<float>("Gameplay", "GameSpeed", 1f, new ConfigDescription("Game speed multiplier.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0.1f, 5f), Array.Empty<object>())); Fov = config.Bind<float>("Gameplay", "FieldOfView", 60f, new ConfigDescription("Custom camera Field of View.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(50f, 130f), Array.Empty<object>())); ShowStats = config.Bind<bool>("Graphics", "ShowStats", false, "Show the real-time statistics overlay on the left-middle of the screen."); ShadowDistance = config.Bind<float>("Graphics", "ShadowDistance", 150f, new ConfigDescription("Custom shadow rendering distance limit.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(10f, 500f), Array.Empty<object>())); LodBias = config.Bind<float>("Graphics", "LodBias", 1f, new ConfigDescription("Custom Level of Detail (LOD) bias multiplier.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0.1f, 5f), Array.Empty<object>())); AntiAliasing = config.Bind<int>("Graphics", "AntiAliasing", QualitySettings.antiAliasing, new ConfigDescription("Anti-Aliasing level (0, 2, 4, or 8).", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 8), Array.Empty<object>())); TextureQuality = config.Bind<int>("Graphics", "TextureQuality", 0, new ConfigDescription("Global Texture Mipmap Limit (0 Full, 1 Half, 2 Quarter).", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 3), Array.Empty<object>())); PreserveWindowSize = config.Bind<bool>("UI", "PreserveWindowSize", true, "Save the window size and position and restore them on startup."); WindowX = config.Bind<float>("UI", "WindowX", 100f, "Saved window X position."); WindowY = config.Bind<float>("UI", "WindowY", 100f, "Saved window Y position."); WindowWidth = config.Bind<float>("UI", "WindowWidth", 950f, "Saved window width."); WindowHeight = config.Bind<float>("UI", "WindowHeight", 600f, "Saved window height."); ShowClock = config.Bind<string>("UI", "ShowClockMode", "Off", "Where to show the real-world clock HUD."); ClockSize = config.Bind<int>("UI", "ClockSize", 16, new ConfigDescription("Font size of the HUD Clock overlay.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(10, 40), Array.Empty<object>())); ClockColorName = config.Bind<string>("UI", "ClockColor", "Green-Cyan", "Color of the Clock overlay."); ShowSpeedrunTimer = config.Bind<string>("UI", "ShowSpeedrunTimerMode", "Off", "Where to show the speedrun stopwatch HUD."); TimerSize = config.Bind<int>("UI", "TimerSize", 16, new ConfigDescription("Font size of the speedrun timer overlay.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(10, 40), Array.Empty<object>())); TimerColorName = config.Bind<string>("UI", "TimerColor", "Green-Cyan", "Color of the Speedrun Timer overlay."); HudBgOpacity = config.Bind<float>("UI", "HudBgOpacity", 0f, new ConfigDescription("Opacity of the dark background box behind HUD overlays.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1f), Array.Empty<object>())); HudFontStyle = config.Bind<string>("UI", "HudFontStyle", "Bold", "Font style for HUD text (Normal, Bold, Italic, BoldItalic)."); DontStopOnFocusLoss = config.Bind<bool>("UI", "DontStopOnFocusLoss", true, "Keep the game running when it loses focus."); HudSize = config.Bind<int>("UI", "HUDSize", 16, "Font size of the HUD (Legacy)."); HudColorName = config.Bind<string>("UI", "HUDColor", "Green-Cyan", "Color of the HUD (Legacy)."); DisplayFilter = config.Bind<string>("Graphics", "DisplayFilter", "None", "Screen-space display filters."); EnableZoom = config.Bind<bool>("Gameplay", "EnableZoom", true, "Enable the camera zoom hotkey."); ZoomKey = config.Bind<Key>("Keybinds", "ZoomKey", (Key)40, "Key used to zoom in the camera."); ZoomFov = config.Bind<float>("Gameplay", "ZoomFOV", 30f, new ConfigDescription("Target FOV when zoomed in.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(10f, 50f), Array.Empty<object>())); ZoomType = config.Bind<string>("Gameplay", "ZoomType", "Hold", "How the zoom key behaves (Hold / Toggle)."); ZoomSensitivityScale = config.Bind<bool>("Gameplay", "ZoomSensitivityScale", true, "Scale mouse sensitivity down while zoomed in."); ZoomSensitivityMult = config.Bind<float>("Gameplay", "ZoomSensitivityMultiplier", 1f, new ConfigDescription("Manual sensitivity multiplier during zoom.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0.1f, 2f), Array.Empty<object>())); ShowSelectedBullet = config.Bind<string>("UI", "ShowSelectedBullet", "Dot Queue Only", "Display the next bullet under the crosshair."); SelectedBulletSize = config.Bind<int>("UI", "SelectedBulletSize", 13, new ConfigDescription("Font size of the selected bullet text.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(10, 30), Array.Empty<object>())); SelectedBulletOffset = config.Bind<float>("UI", "SelectedBulletOffset", 40f, new ConfigDescription("Vertical pixel distance of bullet name below the crosshair.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 120f), Array.Empty<object>())); ShowBulletQueue = config.Bind<bool>("UI", "ShowBulletQueue", true, "Show the next 3 upcoming bullets as colored indicators."); QuickRestartKey = config.Bind<Key>("Keybinds", "QuickRestartKey", (Key)32, "Key used to instantly restart the current run."); SpeedrunHistoryData = config.Bind<string>("Hidden", "SpeedrunHistoryData", "", "Serialized speedrun history records."); SpeedrunPBsData = config.Bind<string>("Hidden", "SpeedrunPBsData", "", "Serialized Personal Best times per weapon."); SpeedrunGoldsData = config.Bind<string>("Hidden", "SpeedrunGoldsData", "", "Serialized best round segment times (Gold Splits)."); ConfigEntry<bool> val = config.Bind<bool>("UI", "ShowClock", false, ""); if (val.Value && ShowClock.Value == "Off") { ShowClock.Value = "Top-Left"; val.Value = false; config.Save(); } ConfigEntry<bool> val2 = config.Bind<bool>("UI", "ShowSpeedrunTimer", false, ""); if (val2.Value && ShowSpeedrunTimer.Value == "Off") { ShowSpeedrunTimer.Value = "Top-Left"; val2.Value = false; config.Save(); } } } public static class GameControl { private static float zoomTransitionFov = -1f; public static void SetGamePauseState(bool paused) { try { FieldInfo field = typeof(SettingsMenuManager).GetField("<IsPaused>k__BackingField", BindingFlags.Static | BindingFlags.NonPublic); if (field != null) { field.SetValue(null, paused); } } catch (Exception ex) { Debug.LogError((object)("[LuckyEnhancements] Error setting game pause state: " + ex.Message)); } } public static void DisablePlayerLook() { try { PlayerCameraController val = Object.FindFirstObjectByType<PlayerCameraController>(); if ((Object)(object)val != (Object)null) { val.SetManualLookInputEnabled(false); } } catch (Exception ex) { Debug.LogError((object)("[LuckyEnhancements] Error disabling player look: " + ex.Message)); } } public static void EnablePlayerLook() { try { PlayerCameraController val = Object.FindFirstObjectByType<PlayerCameraController>(); if ((Object)(object)val != (Object)null) { val.SetManualLookInputEnabled(true); } } catch (Exception ex) { Debug.LogError((object)("[LuckyEnhancements] Error enabling player look: " + ex.Message)); } } public static void DisableWeaponInput() { try { Weapon instance = Weapon.Instance; if ((Object)(object)instance != (Object)null) { FieldInfo field = typeof(Weapon).GetField("_manualFireInputEnabled", BindingFlags.Instance | BindingFlags.NonPublic); if (field != null) { field.SetValue(instance, false); } FieldInfo field2 = typeof(Weapon).GetField("_manualScopeInputEnabled", BindingFlags.Instance | BindingFlags.NonPublic); if (field2 != null) { field2.SetValue(instance, false); } } } catch (Exception ex) { Debug.LogError((object)("[LuckyEnhancements] Error disabling weapon input: " + ex.Message)); } } public static void EnableWeaponInput() { try { Weapon instance = Weapon.Instance; if ((Object)(object)instance != (Object)null) { FieldInfo field = typeof(Weapon).GetField("_manualFireInputEnabled", BindingFlags.Instance | BindingFlags.NonPublic); if (field != null) { field.SetValue(instance, true); } FieldInfo field2 = typeof(Weapon).GetField("_manualScopeInputEnabled", BindingFlags.Instance | BindingFlags.NonPublic); if (field2 != null) { field2.SetValue(instance, true); } } } catch (Exception ex) { Debug.LogError((object)("[LuckyEnhancements] Error enabling weapon input: " + ex.Message)); } } public static void ApplyFov(bool isZooming = false) { Camera main = Camera.main; if (!((Object)(object)main == (Object)null)) { float value = ConfigManager.Fov.Value; if (isZooming && ConfigManager.EnableZoom.Value) { value = ConfigManager.ZoomFov.Value; } if (zoomTransitionFov < 0f) { zoomTransitionFov = main.fieldOfView; } zoomTransitionFov = Mathf.Lerp(zoomTransitionFov, value, Time.unscaledDeltaTime * 12f); if (Mathf.Abs(zoomTransitionFov - value) < 0.05f) { zoomTransitionFov = value; } main.fieldOfView = zoomTransitionFov; } } public static void ApplyGraphicsSettings() { QualitySettings.shadowDistance = ConfigManager.ShadowDistance.Value; QualitySettings.lodBias = ConfigManager.LodBias.Value; QualitySettings.antiAliasing = ConfigManager.AntiAliasing.Value; QualitySettings.globalTextureMipmapLimit = ConfigManager.TextureQuality.Value; } public static void ApplyFpsLimit(bool isMenuOpen, float menuTransitionProgress) { int num = ((isMenuOpen || menuTransitionProgress > 0f) ? (-1) : ConfigManager.FpsLimit.Value); if (num <= 0) { Application.targetFrameRate = -1; return; } if (ConfigManager.ForceVSyncOff == null || ConfigManager.ForceVSyncOff.Value) { QualitySettings.vSyncCount = 0; } Application.targetFrameRate = num; } } public class HudElementToDraw { public string Text { get; set; } public int Size { get; set; } public Color Color { get; set; } public string Position { get; set; } public float Width { get; set; } public float Height { get; set; } } [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInPlugin("com.liamgaming.luckyenhancements", "LuckyEnhancements", "1.4.3")] public class LuckyEnhancementsPlugin : BaseUnityPlugin { private float fpsCount; private float updateInterval = 0.5f; private float accum; private int frames; private float timeleft; private bool speedrunTimerRunning; private bool hasStartedCurrentRun; private float speedrunTime; private GamePhase lastPhase = (GamePhase)7; private static FieldInfo csSensitivityField; private float? originalSensitivity; private PlayerCameraController lastCamCtrl; private PlayerCameraController cachedCamCtrl; private bool isZoomToggled; private void Awake() { //IL_007c: 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_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) ConfigManager.Initialize(((BaseUnityPlugin)this).Config); OpenShotMenu.Register(); if (ConfigManager.PreserveWindowSize.Value) { float num = Mathf.Max(ConfigManager.WindowWidth.Value, 950f); float num2 = Mathf.Max(ConfigManager.WindowHeight.Value, 600f); MenuUI.windowRect = new Rect(ConfigManager.WindowX.Value, ConfigManager.WindowY.Value, num, num2); } else { MenuUI.windowRect = new Rect(100f, 100f, 950f, 600f); } timeleft = updateInterval; StatsOverlay.Initialize(); GameControl.ApplyFpsLimit(MenuUI.isMenuOpen, MenuUI.menuTransitionProgress); GameControl.ApplyGraphicsSettings(); Application.runInBackground = ConfigManager.DontStopOnFocusLoss.Value; ((BaseUnityPlugin)this).Logger.LogInfo((object)"LuckyEnhancements v1.4.1 loaded (OpenShot 2.0.3). Configure via MODS hub."); } private void Update() { //IL_020e: Unknown result type (might be due to invalid IL or missing references) //IL_0219: Expected O, but got Unknown //IL_01f3: 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_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: 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_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_0514: Unknown result type (might be due to invalid IL or missing references) //IL_0519: Unknown result type (might be due to invalid IL or missing references) //IL_051b: Unknown result type (might be due to invalid IL or missing references) //IL_0564: Unknown result type (might be due to invalid IL or missing references) //IL_0536: Unknown result type (might be due to invalid IL or missing references) //IL_0238: Unknown result type (might be due to invalid IL or missing references) //IL_023d: Unknown result type (might be due to invalid IL or missing references) //IL_023f: 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) //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_0127: 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_0348: Unknown result type (might be due to invalid IL or missing references) //IL_0353: Expected O, but got Unknown //IL_0257: Unknown result type (might be due to invalid IL or missing references) //IL_025c: Unknown result type (might be due to invalid IL or missing references) //IL_025e: Unknown result type (might be due to invalid IL or missing references) //IL_0261: Invalid comparison between Unknown and I4 //IL_036c: Unknown result type (might be due to invalid IL or missing references) //IL_0377: Expected O, but got Unknown //IL_0263: Unknown result type (might be due to invalid IL or missing references) //IL_0266: Invalid comparison between Unknown and I4 //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_037e: Unknown result type (might be due to invalid IL or missing references) //IL_0383: Unknown result type (might be due to invalid IL or missing references) //IL_0385: Unknown result type (might be due to invalid IL or missing references) //IL_0388: Invalid comparison between Unknown and I4 //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_038a: Unknown result type (might be due to invalid IL or missing references) //IL_038d: Invalid comparison between Unknown and I4 //IL_01a2: Unknown result type (might be due to invalid IL or missing references) //IL_038f: Unknown result type (might be due to invalid IL or missing references) //IL_0392: Invalid comparison between Unknown and I4 //IL_03c6: Unknown result type (might be due to invalid IL or missing references) //IL_03d0: Unknown result type (might be due to invalid IL or missing references) //IL_03da: Expected O, but got Unknown //IL_03da: Expected O, but got Unknown //IL_0455: Unknown result type (might be due to invalid IL or missing references) //IL_045f: Unknown result type (might be due to invalid IL or missing references) //IL_0469: Expected O, but got Unknown //IL_0469: Expected O, but got Unknown //IL_042a: Unknown result type (might be due to invalid IL or missing references) //IL_0434: Unknown result type (might be due to invalid IL or missing references) //IL_043e: Expected O, but got Unknown //IL_043e: Expected O, but got Unknown //IL_0472: Unknown result type (might be due to invalid IL or missing references) //IL_047c: Unknown result type (might be due to invalid IL or missing references) //IL_0486: Expected O, but got Unknown //IL_0486: Expected O, but got Unknown if (ConfigManager.ModEnabled == null || !ConfigManager.ModEnabled.Value) { return; } Keyboard current = Keyboard.current; if (current == null || IsLoadingOrSplashActive()) { return; } if (Application.runInBackground != ConfigManager.DontStopOnFocusLoss.Value) { Application.runInBackground = ConfigManager.DontStopOnFocusLoss.Value; } StatsOverlay.UpdateCpuTracker(); UpdateSpeedrunTimer(); float num = 5.5f; if (MenuUI.menuTransitionProgress != MenuUI.menuTargetProgress) { MenuUI.menuTransitionProgress = Mathf.MoveTowards(MenuUI.menuTransitionProgress, MenuUI.menuTargetProgress, Time.unscaledDeltaTime * num); if (MenuUI.menuTransitionProgress == 0f && !MenuUI.isMenuOpen) { Time.timeScale = ConfigManager.GameSpeed.Value; Cursor.visible = MenuUI.lastCursorVisible; Cursor.lockState = MenuUI.lastLockMode; GameControl.ApplyFpsLimit(MenuUI.isMenuOpen, MenuUI.menuTransitionProgress); GameControl.EnablePlayerLook(); GameControl.EnableWeaponInput(); GameControl.SetGamePauseState(paused: false); } } if (MenuUI.waitingForKeybind != "") { if (!((ButtonControl)current.anyKey).wasPressedThisFrame) { return; } Enumerator<KeyControl> enumerator = current.allKeys.GetEnumerator(); try { while (enumerator.MoveNext()) { KeyControl current2 = enumerator.Current; if (!((ButtonControl)current2).wasPressedThisFrame) { continue; } Key keyCode = current2.keyCode; if ((int)keyCode != 0) { if (MenuUI.waitingForKeybind == "Menu") { ConfigManager.OpenMenuKey.Value = keyCode; ((ConfigEntryBase)ConfigManager.OpenMenuKey).ConfigFile.Save(); } else if (MenuUI.waitingForKeybind == "Zoom") { ConfigManager.ZoomKey.Value = keyCode; ((ConfigEntryBase)ConfigManager.ZoomKey).ConfigFile.Save(); } else if (MenuUI.waitingForKeybind == "Restart") { ConfigManager.QuickRestartKey.Value = keyCode; ((ConfigEntryBase)ConfigManager.QuickRestartKey).ConfigFile.Save(); } MenuUI.waitingForKeybind = ""; break; } } return; } finally { ((IDisposable)enumerator/*cast due to .constrained prefix*/).Dispose(); } } if (ConfigManager.EnableLegacyImguiMenu.Value && ((ButtonControl)current[ConfigManager.OpenMenuKey.Value]).wasPressedThisFrame) { MenuUI.ToggleMenu(); } if ((Object)GameManager.Instance != (Object)null && !MenuUI.isMenuOpen && MenuUI.waitingForKeybind == "") { Key value = ConfigManager.QuickRestartKey.Value; if ((int)value != 0 && ((ButtonControl)current[value]).wasPressedThisFrame) { GamePhase phase = GameManager.Instance.Phase; if ((int)phase != 7 && (int)phase != 8) { MethodInfo method = typeof(GameManager).GetMethod("RestartRunNewSeedKeepLoadout", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (method != null) { method.Invoke(GameManager.Instance, null); } } } } timeleft -= Time.unscaledDeltaTime; accum += 1f / Time.unscaledDeltaTime; frames++; if (timeleft <= 0f) { fpsCount = accum / (float)frames; timeleft = updateInterval; accum = 0f; frames = 0; } if (MenuUI.isMenuOpen || MenuUI.menuTransitionProgress > 0f) { Cursor.visible = true; Cursor.lockState = (CursorLockMode)0; Time.timeScale = 0f; GameControl.SetGamePauseState(paused: true); } try { Camera main = Camera.main; if ((Object)main != (Object)null) { string value2 = ConfigManager.DisplayFilter.Value; bool flag = false; if ((Object)GameManager.Instance != (Object)null) { GamePhase phase2 = GameManager.Instance.Phase; if ((int)phase2 == 3 || (int)phase2 == 7 || (int)phase2 == 6 || SettingsMenuManager.IsPaused) { flag = true; } } if (MenuUI.isMenuOpen) { flag = true; } if (value2 == "Pixelated" && !flag) { StatsOverlay.UpdatePixelatedTexture(); if ((Object)main.targetTexture != (Object)StatsOverlay.pixelatedRt) { main.targetTexture = StatsOverlay.pixelatedRt; } } else { switch (value2) { case "Upside Down": case "Drunk Vision": case "Disco Shaker": if (flag) { break; } StatsOverlay.UpdateFullResTexture(); if ((Object)main.targetTexture != (Object)StatsOverlay.fullResRt) { main.targetTexture = StatsOverlay.fullResRt; } goto end_IL_033f; } if ((Object)main.targetTexture == (Object)StatsOverlay.pixelatedRt || (Object)main.targetTexture == (Object)StatsOverlay.fullResRt) { main.targetTexture = null; } } } end_IL_033f:; } catch { } int num2 = ((MenuUI.isMenuOpen || MenuUI.menuTransitionProgress > 0f) ? (-1) : ConfigManager.FpsLimit.Value); if (num2 > 0) { if (QualitySettings.vSyncCount != 0) { QualitySettings.vSyncCount = 0; } if (Application.targetFrameRate != num2) { Application.targetFrameRate = num2; } } else if (num2 == -1 && Application.targetFrameRate != -1) { Application.targetFrameRate = -1; } bool isZooming = false; if (ConfigManager.EnableZoom.Value && !MenuUI.isMenuOpen && MenuUI.waitingForKeybind == "") { Key value3 = ConfigManager.ZoomKey.Value; if ((int)value3 != 0) { if (ConfigManager.ZoomType.Value == "Toggle") { if (((ButtonControl)current[value3]).wasPressedThisFrame) { isZoomToggled = !isZoomToggled; } isZooming = isZoomToggled; } else { isZoomToggled = false; isZooming = ((ButtonControl)current[value3]).isPressed; } } } else { isZoomToggled = false; } GameControl.ApplyFov(isZooming); UpdateZoomSensitivity(isZooming); } private PlayerCameraController ResolveCameraController() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown if ((Object)cachedCamCtrl == (Object)null) { cachedCamCtrl = Object.FindFirstObjectByType<PlayerCameraController>(); } return cachedCamCtrl; } private void UpdateZoomSensitivity(bool isZooming) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Expected O, but got Unknown //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_0141: 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) //IL_008a: Expected O, but got Unknown //IL_008a: Expected O, but got Unknown //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Expected O, but got Unknown try { PlayerCameraController val = ResolveCameraController(); if ((Object)val != (Object)null) { if (csSensitivityField == null) { csSensitivityField = typeof(PlayerCameraController).GetField("csSensitivity", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); } if (!(csSensitivityField != null)) { return; } if (isZooming && ConfigManager.EnableZoom.Value) { if (!originalSensitivity.HasValue || (Object)lastCamCtrl != (Object)val) { originalSensitivity = (float)csSensitivityField.GetValue(val); lastCamCtrl = val; } float num = 1f; if (ConfigManager.ZoomSensitivityScale.Value && ConfigManager.Fov.Value > 0f) { Camera main = Camera.main; if ((Object)main != (Object)null) { num = main.fieldOfView / ConfigManager.Fov.Value; } } float num2 = originalSensitivity.Value * num * ConfigManager.ZoomSensitivityMult.Value; csSensitivityField.SetValue(val, num2); } else if (originalSensitivity.HasValue && (Object)lastCamCtrl != (Object)null) { csSensitivityField.SetValue(lastCamCtrl, originalSensitivity.Value); originalSensitivity = null; lastCamCtrl = null; } } else { originalSensitivity = null; lastCamCtrl = null; cachedCamCtrl = null; } } catch (Exception ex) { ((BaseUnityPlugin)this).Logger.LogError((object)("[LuckyEnhancements] Error scaling zoom sensitivity: " + ex.Message)); } } private void OnPhaseChanged(GamePhase oldPhase, GamePhase newPhase) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Invalid comparison between Unknown and I4 //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Invalid comparison between Unknown and I4 //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Invalid comparison between Unknown and I4 //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Invalid comparison between Unknown and I4 //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Expected O, but got Unknown //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Expected O, but got Unknown //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Expected O, but got Unknown //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Expected O, but got Unknown //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Expected O, but got Unknown if ((int)oldPhase == 1) { StatsOverlay.RecordSplit("Round " + (RoundContext.SelectedZeroBasedRoundIndex + 1), speedrunTime); } else if ((int)oldPhase == 3) { StatsOverlay.RecordSplit("Shop " + (RoundContext.SelectedZeroBasedRoundIndex + 1), speedrunTime); } if ((int)newPhase == 6) { string weaponName = "Unknown"; if ((Object)Weapon.Instance != (Object)null && (Object)Weapon.Instance.WeaponData != (Object)null) { weaponName = Weapon.Instance.WeaponData.TitleResolved ?? ((object)Unsafe.As<WeaponName, WeaponName>(ref Weapon.Instance.WeaponData.weaponName)/*cast due to .constrained prefix*/).ToString(); } bool flag = false; if ((Object)GameManager.Instance != (Object)null) { flag = GameManager.Instance.IsGameOverDueToRunWon; } string status = (flag ? "Victory" : $"Defeat (Round {RoundContext.SelectedZeroBasedRoundIndex + 1})"); StatsOverlay.RecordRunRecord(weaponName, status, speedrunTime); } else if ((int)newPhase == 7 && hasStartedCurrentRun) { string weaponName2 = "Unknown"; if ((Object)Weapon.Instance != (Object)null && (Object)Weapon.Instance.WeaponData != (Object)null) { weaponName2 = Weapon.Instance.WeaponData.TitleResolved ?? ((object)Unsafe.As<WeaponName, WeaponName>(ref Weapon.Instance.WeaponData.weaponName)/*cast due to .constrained prefix*/).ToString(); } StatsOverlay.RecordRunRecord(weaponName2, "Aborted", speedrunTime); } } private void UpdateSpeedrunTimer() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Invalid comparison between Unknown and I4 //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_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_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Invalid comparison between Unknown and I4 if ((Object)GameManager.Instance == (Object)null) { return; } GamePhase phase = GameManager.Instance.Phase; if (phase != lastPhase) { OnPhaseChanged(lastPhase, phase); lastPhase = phase; } if ((int)phase == 6 || (int)phase == 7 || (int)phase == 8) { speedrunTimerRunning = false; hasStartedCurrentRun = false; } else if (GameManager.Instance.IsRoundActive) { if (!hasStartedCurrentRun && RoundContext.SelectedZeroBasedRoundIndex == 0) { speedrunTime = 0f; StatsOverlay.lastSplitTime = 0f; StatsOverlay.currentRunSplits.Clear(); speedrunTimerRunning = true; hasStartedCurrentRun = true; } else if (hasStartedCurrentRun) { speedrunTimerRunning = true; } } if (speedrunTimerRunning && Time.timeScale != 0f && !SettingsMenuManager.IsPaused) { speedrunTime += Time.unscaledDeltaTime; } } private bool IsLoadingOrSplashActive() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Invalid comparison between Unknown and I4 //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Invalid comparison between Unknown and I4 //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Invalid comparison between Unknown and I4 //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Invalid comparison between Unknown and I4 //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Invalid comparison between Unknown and I4 //IL_0035: 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_003a: Invalid comparison between Unknown and I4 //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Invalid comparison between Unknown and I4 //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Expected O, but got Unknown //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Expected O, but got Unknown if ((Object)GameManager.Instance == (Object)null) { return true; } GameManager instance = GameManager.Instance; GamePhase phase = instance.Phase; if ((int)phase == 1 || (int)phase == 3 || (int)phase == 8 || (int)phase == 6 || (int)phase == 5 || (int)phase == 0 || (int)phase == 2) { return false; } if ((int)phase == 7) { FieldInfo field = typeof(GameManager).GetField("mainMenuUI", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (field != null) { object value = field.GetValue(instance); GameObject val = (GameObject)((value is GameObject) ? value : null); if ((Object)val != (Object)null && val.activeInHierarchy) { return false; } } } return true; } private void OnGUI() { if (ConfigManager.ModEnabled != null && ConfigManager.ModEnabled.Value && !IsLoadingOrSplashActive()) { StatsOverlay.DrawDisplayFilter(); StatsOverlay.DrawOverlays(MenuUI.isMenuOpen, MenuUI.menuTransitionProgress, fpsCount, speedrunTime); if (ConfigManager.EnableLegacyImguiMenu.Value) { MenuUI.DrawMenu(); } } } private void OnDestroy() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected O, but got Unknown //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0033: Expected O, but got Unknown MenuUI.SaveWindowSettings(); try { Camera main = Camera.main; if ((Object)main != (Object)null && (Object)main.targetTexture == (Object)StatsOverlay.pixelatedRt) { main.targetTexture = null; } } catch { } } } public static class MenuUI { [CompilerGenerated] private static class <>O { public static WindowFunction <0>__DrawWindow; } private static WindowFunction DrawWindowCallback; public static bool isMenuOpen = false; public static float menuTransitionProgress = 0f; public static float menuTargetProgress = 0f; public static Rect windowRect = new Rect(100f, 100f, 950f, 600f); public static bool isResizing = false; private static Vector2 resizeStartMouse = Vector2.zero; private static Vector2 resizeStartSize = Vector2.zero; public static string currentCategory = "Graphics & Quality"; public static float previousTimeScale = 1f; public static CursorLockMode lastLockMode = (CursorLockMode)0; public static bool lastCursorVisible = true; public static string waitingForKeybind = ""; private static Vector2 graphicsScrollPosition = Vector2.zero; private static Vector2 gameplayScrollPosition = Vector2.zero; private static Vector2 keybindsScrollPosition = Vector2.zero; private static Vector2 speedrunsScrollPosition = Vector2.zero; private static Vector2 aboutScrollPosition = Vector2.zero; private static Vector2 splitsDetailScrollPosition = Vector2.zero; private static SpeedrunRunRecord selectedRunForSplits = null; private static GUIStyle windowStyle; private static GUIStyle sidebarStyle; private static GUIStyle buttonStyle; private static GUIStyle buttonSelectedStyle; private static GUIStyle gridButtonStyle; private static GUIStyle gridButtonSelectedStyle; private static GUIStyle headerStyle; private static GUIStyle labelStyle; private static GUIStyle separatorStyle; private static GUIStyle resetButtonStyle; private static bool stylesInitialized = false; public static void InitStyles() { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Expected O, but got Unknown //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_0084: 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_0099: Expected O, but got Unknown //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Expected O, but got Unknown //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Expected O, but got Unknown //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Expected O, but got Unknown //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Expected O, but got Unknown //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: Unknown result type (might be due to invalid IL or missing references) //IL_01b8: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: Expected O, but got Unknown //IL_01eb: 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_0234: Unknown result type (might be due to invalid IL or missing references) //IL_0260: Unknown result type (might be due to invalid IL or missing references) //IL_026a: Expected O, but got Unknown //IL_0273: Unknown result type (might be due to invalid IL or missing references) //IL_027d: Expected O, but got Unknown //IL_0291: Unknown result type (might be due to invalid IL or missing references) //IL_02a2: Unknown result type (might be due to invalid IL or missing references) //IL_02ac: Expected O, but got Unknown //IL_02c7: 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_0300: Unknown result type (might be due to invalid IL or missing references) //IL_030a: Expected O, but got Unknown //IL_0333: Unknown result type (might be due to invalid IL or missing references) //IL_0357: Unknown result type (might be due to invalid IL or missing references) //IL_037c: Unknown result type (might be due to invalid IL or missing references) //IL_03a6: Unknown result type (might be due to invalid IL or missing references) //IL_03b0: Expected O, but got Unknown //IL_03b9: Unknown result type (might be due to invalid IL or missing references) //IL_03c3: Expected O, but got Unknown //IL_03c8: Unknown result type (might be due to invalid IL or missing references) //IL_03d2: Expected O, but got Unknown //IL_03ed: Unknown result type (might be due to invalid IL or missing references) //IL_0412: 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_0430: Expected O, but got Unknown //IL_0459: Unknown result type (might be due to invalid IL or missing references) //IL_0481: Unknown result type (might be due to invalid IL or missing references) //IL_049a: Unknown result type (might be due to invalid IL or missing references) //IL_04c2: Unknown result type (might be due to invalid IL or missing references) //IL_04db: Unknown result type (might be due to invalid IL or missing references) //IL_0505: Unknown result type (might be due to invalid IL or missing references) //IL_050f: Expected O, but got Unknown //IL_0518: Unknown result type (might be due to invalid IL or missing references) //IL_0522: Expected O, but got Unknown //IL_0536: Unknown result type (might be due to invalid IL or missing references) //IL_0542: Unknown result type (might be due to invalid IL or missing references) //IL_054c: Expected O, but got Unknown if (!stylesInitialized) { Texture2D background = CreateColorTexture(new Color(0.12f, 0.12f, 0.14f, 0.98f)); windowStyle = new GUIStyle(GUI.skin.window); windowStyle.normal.background = background; windowStyle.onNormal.background = background; windowStyle.border = new RectOffset(4, 4, 4, 4); Texture2D background2 = CreateColorTexture(new Color(0.08f, 0.08f, 0.09f, 0.98f)); sidebarStyle = new GUIStyle(); sidebarStyle.normal.background = background2; headerStyle = new GUIStyle(); headerStyle.normal.textColor = new Color(0.95f, 0.95f, 0.95f); headerStyle.fontSize = 20; headerStyle.fontStyle = (FontStyle)1; headerStyle.margin = new RectOffset(10, 10, 10, 15); labelStyle = new GUIStyle(); labelStyle.normal.textColor = new Color(0.85f, 0.85f, 0.85f); labelStyle.fontSize = 14; labelStyle.margin = new RectOffset(5, 5, 5, 5); Texture2D background3 = CreateColorTexture(new Color(0.18f, 0.18f, 0.2f, 1f)); Texture2D background4 = CreateColorTexture(new Color(0.25f, 0.25f, 0.28f, 1f)); Texture2D background5 = CreateColorTexture(new Color(0.35f, 0.35f, 0.4f, 1f)); buttonStyle = new GUIStyle(GUI.skin.button); buttonStyle.normal.background = background3; buttonStyle.normal.textColor = new Color(0.85f, 0.85f, 0.85f); buttonStyle.hover.background = background4; buttonStyle.hover.textColor = Color.white; buttonStyle.active.background = background5; buttonStyle.active.textColor = Color.white; buttonStyle.fontSize = 13; buttonStyle.alignment = (TextAnchor)3; buttonStyle.padding = new RectOffset(12, 10, 8, 8); buttonStyle.margin = new RectOffset(5, 5, 2, 2); Texture2D background6 = CreateColorTexture(new Color(0.18f, 0.48f, 0.82f, 1f)); buttonSelectedStyle = new GUIStyle(buttonStyle); buttonSelectedStyle.normal.background = background6; buttonSelectedStyle.normal.textColor = Color.white; buttonSelectedStyle.hover.background = background6; buttonSelectedStyle.hover.textColor = Color.white; gridButtonStyle = new GUIStyle(GUI.skin.button); gridButtonStyle.normal.background = background3; gridButtonStyle.normal.textColor = new Color(0.85f, 0.85f, 0.85f); gridButtonStyle.hover.background = background4; gridButtonStyle.hover.textColor = Color.white; gridButtonStyle.active.background = background5; gridButtonStyle.active.textColor = Color.white; gridButtonStyle.fontSize = 13; gridButtonStyle.alignment = (TextAnchor)4; gridButtonStyle.padding = new RectOffset(4, 4, 4, 4); gridButtonStyle.margin = new RectOffset(3, 3, 2, 2); gridButtonSelectedStyle = new GUIStyle(gridButtonStyle); gridButtonSelectedStyle.normal.background = background6; gridButtonSelectedStyle.normal.textColor = Color.white; gridButtonSelectedStyle.hover.background = background6; gridButtonSelectedStyle.hover.textColor = Color.white; resetButtonStyle = new GUIStyle(GUI.skin.button); resetButtonStyle.normal.background = background3; resetButtonStyle.normal.textColor = new Color(0.85f, 0.85f, 0.85f); resetButtonStyle.hover.background = CreateColorTexture(new Color(0.35f, 0.15f, 0.15f, 1f)); resetButtonStyle.hover.textColor = Color.white; resetButtonStyle.active.background = CreateColorTexture(new Color(0.45f, 0.2f, 0.2f, 1f)); resetButtonStyle.active.textColor = Color.white; resetButtonStyle.fontSize = 12; resetButtonStyle.alignment = (TextAnchor)4; resetButtonStyle.padding = new RectOffset(4, 4, 2, 2); resetButtonStyle.margin = new RectOffset(3, 3, 2, 2); Texture2D background7 = CreateColorTexture(new Color(0.25f, 0.25f, 0.28f, 0.5f)); separatorStyle = new GUIStyle(); separatorStyle.normal.background = background7; stylesInitialized = true; } } private static Texture2D CreateColorTexture(Color color) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000a: 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_0017: Expected O, but got Unknown Texture2D val = new Texture2D(1, 1); val.SetPixel(0, 0, color); val.Apply(); return val; } private static void DrawSeparator() { //IL_0028: Unknown result type (might be due to invalid IL or missing references) GUILayout.Space(10f); GUI.Box(GUILayoutUtility.GetRect(10f, 1f, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(true) }), "", separatorStyle); GUILayout.Space(10f); } public static void ToggleMenu() { //IL_0028: 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) isMenuOpen = !isMenuOpen; if (isMenuOpen) { previousTimeScale = Time.timeScale; Time.timeScale = 0f; lastLockMode = Cursor.lockState; lastCursorVisible = Cursor.visible; Cursor.visible = true; Cursor.lockState = (CursorLockMode)0; menuTargetProgress = 1f; GameControl.DisablePlayerLook(); GameControl.DisableWeaponInput(); } else { menuTargetProgress = 0f; SaveWindowSettings(); } } public static void SaveWindowSettings() { if (ConfigManager.PreserveWindowSize.Value) { ConfigManager.WindowX.Value = ((Rect)(ref windowRect)).x; ConfigManager.WindowY.Value = ((Rect)(ref windowRect)).y; ConfigManager.WindowWidth.Value = ((Rect)(ref windowRect)).width; ConfigManager.WindowHeight.Value = ((Rect)(ref windowRect)).height; ((ConfigEntryBase)ConfigManager.WindowWidth).ConfigFile.Save(); } } public static void DrawMenu() { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: 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_0071: 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_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0088: 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_0096: Unknown result type (might be due to invalid IL or missing references) //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_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: 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_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Expected O, but got Unknown InitStyles(); if (!(menuTransitionProgress > 0f)) { return; } Matrix4x4 matrix = GUI.matrix; Color color = GUI.color; float num = EaseOutCubic(menuTransitionProgress); Vector2 val = default(Vector2); ((Vector2)(ref val))..ctor(((Rect)(ref windowRect)).x + ((Rect)(ref windowRect)).width / 2f, ((Rect)(ref windowRect)).y + ((Rect)(ref windowRect)).height / 2f); GUIUtility.ScaleAroundPivot(new Vector2(num, num), val); GUI.color = new Color(color.r, color.g, color.b, num * color.a); Rect val2 = windowRect; if (DrawWindowCallback == null) { object obj = <>O.<0>__DrawWindow; if (obj == null) { WindowFunction val3 = DrawWindow; <>O.<0>__DrawWindow = val3; obj = (object)val3; } DrawWindowCallback = (WindowFunction)obj; } Rect val4 = GUI.Window(9999, val2, DrawWindowCallback, $"LuckyEnhancements (Press {ConfigManager.OpenMenuKey.Value} to close)", windowStyle); if (menuTransitionProgress >= 1f) { windowRect = val4; } GUI.color = color; GUI.matrix = matrix; } private static float EaseOutCubic(float x) { return 1f - Mathf.Pow(1f - x, 3f); } private static void DrawWindow(int windowId) { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_01a7: Unknown result type (might be due to invalid IL or missing references) //IL_01de: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Expected O, but got Unknown //IL_01fe: 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_022a: Unknown result type (might be due to invalid IL or missing references) //IL_0234: 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_028b: Invalid comparison between Unknown and I4 //IL_0247: Unknown result type (might be due to invalid IL or missing references) //IL_024c: Unknown result type (might be due to invalid IL or missing references) //IL_0251: Unknown result type (might be due to invalid IL or missing references) //IL_026a: Unknown result type (might be due to invalid IL or missing references) //IL_026f: Unknown result type (might be due to invalid IL or missing references) //IL_02ff: Unknown result type (might be due to invalid IL or missing references) //IL_0305: Invalid comparison between Unknown and I4 //IL_028e: Unknown result type (might be due to invalid IL or missing references) //IL_0293: Unknown result type (might be due to invalid IL or missing references) //IL_0298: Unknown result type (might be due to invalid IL or missing references) //IL_029d: Unknown result type (might be due to invalid IL or missing references) //IL_02a2: Unknown result type (might be due to invalid IL or missing references) //IL_02b2: Unknown result type (might be due to invalid IL or missing references) //IL_02dc: Unknown result type (might be due to invalid IL or missing references) //IL_0308: Unknown result type (might be due to invalid IL or missing references) //IL_030e: Invalid comparison between Unknown and I4 GUI.DragWindow(new Rect(0f, 0f, ((Rect)(ref windowRect)).width, 25f)); GUILayout.BeginHorizontal((GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandHeight(true) }); GUILayout.BeginVertical(sidebarStyle, (GUILayoutOption[])(object)new GUILayoutOption[2] { GUILayout.Width(180f), GUILayout.ExpandHeight(true) }); GUILayout.Space(15f); DrawCategoryButton("Graphics & Quality"); DrawCategoryButton("Display VFX"); DrawCategoryButton("HUD & Overlay"); DrawCategoryButton("Gameplay & Zoom"); DrawCategoryButton("Keybinds"); DrawCategoryButton("Speedruns"); DrawCategoryButton("About"); GUILayout.EndVertical(); GUILayout.Space(15f); GUILayout.BeginVertical((GUILayoutOption[])(object)new GUILayoutOption[2] { GUILayout.ExpandWidth(true), GUILayout.ExpandHeight(true) }); GUILayout.Space(10f); if (currentCategory == "Graphics & Quality") { DrawGraphicsSettings(); } else if (currentCategory == "Display VFX") { DrawDisplayFiltersSettings(); } else if (currentCategory == "HUD & Overlay") { DrawHUDOverlaySettings(); } else if (currentCategory == "Gameplay & Zoom") { DrawGameplaySettings(); } else if (currentCategory == "Keybinds") { DrawKeybindsSettings(); } else if (currentCategory == "Speedruns") { DrawSpeedrunsPage(); } else if (currentCategory == "About") { DrawAboutPage(); } GUILayout.EndVertical(); GUILayout.EndHorizontal(); Rect val = default(Rect); ((Rect)(ref val))..ctor(((Rect)(ref windowRect)).width - 16f, ((Rect)(ref windowRect)).height - 16f, 16f, 16f); GUIStyle val2 = new GUIStyle(); val2.normal.textColor = new Color(0.18f, 0.48f, 0.82f, 0.7f); val2.alignment = (TextAnchor)8; val2.fontSize = 14; GUI.Label(val, "◢", val2); Event current = Event.current; if ((int)current.type == 0 && ((Rect)(ref val)).Contains(current.mousePosition)) { isResizing = true; resizeStartMouse = GUIUtility.GUIToScreenPoint(current.mousePosition); resizeStartSize = new Vector2(((Rect)(ref windowRect)).width, ((Rect)(ref windowRect)).height); current.Use(); } if (isResizing) { if ((int)current.type == 3) { Vector2 val3 = GUIUtility.GUIToScreenPoint(current.mousePosition) - resizeStartMouse; ((Rect)(ref windowRect)).width = Mathf.Clamp(resizeStartSize.x + val3.x, 850f, 1600f); ((Rect)(ref windowRect)).height = Mathf.Clamp(resizeStartSize.y + val3.y, 550f, 1000f); current.Use(); } else if ((int)current.type == 1 || (int)current.rawType == 1) { isResizing = false; SaveWindowSettings(); } } } private static void DrawCategoryButton(string name) { bool num = currentCategory == name; GUIStyle val = (num ? buttonSelectedStyle : buttonStyle); if (GUILayout.Button(num ? ("> " + name) : name, val, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(38f) })) { currentCategory = name; } } private static void DrawGraphicsSettings() { //IL_0000: 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_0027: Unknown result type (might be due to invalid IL or missing references) graphicsScrollPosition = GUILayout.BeginScrollView(graphicsScrollPosition, (GUILayoutOption[])(object)new GUILayoutOption[2] { GUILayout.ExpandWidth(true), GUILayout.ExpandHeight(true) }); GUILayout.Label("Graphics Options", headerStyle, Array.Empty<GUILayoutOption>()); GUILayout.Space(10f); GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); GUILayout.Label("Show FPS Counter:", labelStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(150f) }); string value = ConfigManager.ShowFps.Value; string[] array = new string[4] { "Off", "Left", "Middle", "Right" }; for (int i = 0; i < array.Length; i++) { GUIStyle val = ((value == array[i]) ? gridButtonSelectedStyle : gridButtonStyle); if (GUILayout.Button(array[i], val, (GUILayoutOption[])(object)new GUILayoutOption[2] { GUILayout.Width(80f), GUILayout.Height(25f) })) { ConfigManager.ShowFps.Value = array[i]; ((ConfigEntryBase)ConfigManager.ShowFps).ConfigFile.Save(); } } GUILayout.EndHorizontal(); DrawSeparator(); int value2 = ConfigManager.FpsLimit.Value; float num = ((value2 <= 0) ? 301f : ((float)value2)); string text = ((value2 <= 0) ? "Max" : $"{value2}"); GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); GUILayout.Label("FPS Limit (" + text + "):", labelStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(160f) }); if (GUILayout.Button("-", gridButtonStyle, (GUILayoutOption[])(object)new GUILayoutOption[2] { GUILayout.Width(25f), GUILayout.Height(22f) })) { if (value2 == -1) { ConfigManager.FpsLimit.Value = 300; } else if (value2 > 1) { ConfigManager.FpsLimit.Value = value2 - 1; } GameControl.ApplyFpsLimit(isMenuOpen, menuTransitionProgress); ((ConfigEntryBase)ConfigManager.FpsLimit).ConfigFile.Save(); } int num2 = Mathf.RoundToInt(GUILayout.HorizontalSlider(num, 1f, 301f, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(180f) })); if (GUILayout.Button("+", gridButtonStyle, (GUILayoutOption[])(object)new GUILayoutOption[2] { GUILayout.Width(25f), GUILayout.Height(22f) }) && value2 != -1) { if (value2 < 300) { ConfigManager.FpsLimit.Value = value2 + 1; } else if (value2 == 300) { ConfigManager.FpsLimit.Value = -1; } GameControl.ApplyFpsLimit(isMenuOpen, menuTransitionProgress); ((ConfigEntryBase)ConfigManager.FpsLimit).ConfigFile.Save(); } GUILayout.EndHorizontal(); if (num2 != Mathf.RoundToInt(num)) { if (num2 == 301) { ConfigManager.FpsLimit.Value = -1; } else { ConfigManager.FpsLimit.Value = num2; } GameControl.ApplyFpsLimit(isMenuOpen, menuTransitionProgress); ((ConfigEntryBase)ConfigManager.FpsLimit).ConfigFile.Save(); } GUILayout.Space(10f); GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); GUILayout.Space(185f); int[] array2 = new int[6] { 30, 60, 120, 144, 240, -1 }; for (int j = 0; j < array2.Length; j++) { int num3 = array2[j]; string obj = ((num3 == -1) ? "Max" : num3.ToString()); GUIStyle val2 = ((value2 == num3) ? gridButtonSelectedStyle : gridButtonStyle); if (GUILayout.Button(obj, val2, (GUILayoutOption[])(object)new GUILayoutOption[2] { GUILayout.Width(48f), GUILayout.Height(25f) })) { ConfigManager.FpsLimit.Value = num3; GameControl.ApplyFpsLimit(isMenuOpen, menuTransitionProgress); ((ConfigEntryBase)ConfigManager.FpsLimit).ConfigFile.Save(); } } GUILayout.EndHorizontal(); DrawSeparator(); GUILayout.Label("Advanced Quality Settings", headerStyle, Array.Empty<GUILayoutOption>()); GUILayout.Space(5f); GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); GUILayout.Label("Show Stats Overlay:", labelStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(160f) }); bool value3 = ConfigManager.ShowStats.Value; bool flag = GUILayout.Toggle(value3, value3 ? " Enabled" : " Disabled", (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(100f) }); if (flag != value3) { ConfigManager.ShowStats.Value = flag; ((ConfigEntryBase)ConfigManager.ShowStats).ConfigFile.Save(); } GUILayout.EndHorizontal(); GUILayout.Space(8f); GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); GUILayout.Label($"Shadow Distance ({ConfigManager.ShadowDistance.Value:F0}m):", labelStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(160f) }); float num4 = GUILayout.HorizontalSlider(ConfigManager.ShadowDistance.Value, 0f, 500f, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(180f) }); if (num4 != ConfigManager.ShadowDistance.Value) { ConfigManager.ShadowDistance.Value = Mathf.Round(num4); QualitySettings.shadowDistance = ConfigManager.ShadowDistance.Value; ((ConfigEntryBase)ConfigManager.ShadowDistance).ConfigFile.Save(); } if (GUILayout.Button("Reset", resetButtonStyle, (GUILayoutOption[])(object)new GUILayoutOption[2] { GUILayout.Width(60f), GUILayout.Height(22f) })) { ConfigManager.ShadowDistance.Value = 150f; QualitySettings.shadowDistance = 150f; ((ConfigEntryBase)ConfigManager.ShadowDistance).ConfigFile.Save(); } GUILayout.EndHorizontal(); GUILayout.Space(8f); GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); GUILayout.Label($"LOD Bias ({ConfigManager.LodBias.Value:F2}x):", labelStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(160f) }); float num5 = GUILayout.HorizontalSlider(ConfigManager.LodBias.Value, 0.1f, 5f, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(180f) }); if (num5 != ConfigManager.LodBias.Value) { ConfigManager.LodBias.Value = (float)Math.Round(num5, 2); QualitySettings.lodBias = ConfigManager.LodBias.Value; ((ConfigEntryBase)ConfigManager.LodBias).ConfigFile.Save(); } if (GUILayout.Button("Reset", resetButtonStyle, (GUILayoutOption[])(object)new GUILayoutOption[2] { GUILayout.Width(60f), GUILayout.Height(22f) })) { ConfigManager.LodBias.Value = 1f; QualitySettings.lodBias = 1f; ((ConfigEntryBase)ConfigManager.LodBias).ConfigFile.Save(); } GUILayout.EndHorizontal(); GUILayout.Space(8f); GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); GUILayout.Label("Anti-Aliasing:", labelStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(160f) }); int[] array3 = new int[4] { 0, 2, 4, 8 }; string[] array4 = new string[4] { "Off", "2x", "4x", "8x" }; for (int k = 0; k < array3.Length; k++) { GUIStyle val3 = ((ConfigManager.AntiAliasing.Value == array3[k]) ? gridButtonSelectedStyle : gridButtonStyle); if (GUILayout.Button(array4[k], val3, (GUILayoutOption[])(object)new GUILayoutOption[2] { GUILayout.Width(55f), GUILayout.Height(24f) })) { ConfigManager.AntiAliasing.Value = array3[k]; QualitySettings.antiAliasing = array3[k]; ((ConfigEntryBase)ConfigManager.AntiAliasing).ConfigFile.Save(); } } GUILayout.EndHorizontal(); GUILayout.Space(8f); GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); GUILayout.Label("Texture Quality:", labelStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(160f) }); int[] array5 = new int[3] { 0, 1, 2 }; string[] array6 = new string[3] { "Full", "Half", "Quarter" }; for (int l = 0; l < array5.Length; l++) { GUIStyle val4 = ((ConfigManager.TextureQuality.Value == array5[l]) ? gridButtonSelectedStyle : gridButtonStyle); if (GUILayout.Button(array6[l], val4, (GUILayoutOption[])(object)new GUILayoutOption[2] { GUILayout.Width(75f), GUILayout.Height(24f) })) { ConfigManager.TextureQuality.Value = array5[l]; QualitySettings.globalTextureMipmapLimit = array5[l]; ((ConfigEntryBase)ConfigManager.TextureQuality).ConfigFile.Save(); } } GUILayout.EndHorizontal(); GUILayout.EndScrollView(); } private static void DrawDisplayFiltersSettings() { //IL_0000: 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_0027: Unknown result type (might be due to invalid IL or missing references) graphicsScrollPosition = GUILayout.BeginScrollView(graphicsScrollPosition, (GUILayoutOption[])(object)new GUILayoutOption[2] { GUILayout.ExpandWidth(true), GUILayout.ExpandHeight(true) }); GUILayout.Label("Display VFX Filters", headerStyle, Array.Empty<GUILayoutOption>()); GUILayout.Space(10f); GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); GUILayout.Label("Display Filter:", labelStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(160f) }); string value = ConfigManager.DisplayFilter.Value; string[] array = new string[17] { "None", "Scanlines", "RGB Lights", "Very Dark", "Very Bright", "Retro Amber", "Fallout Green", "Sepia", "Cinematic Letterbox", "Matrix Digital", "Rainbow Wave", "CRT Retro Arcade", "VHS Static", "Night Vision", "Doom Red", "Blizzard Ice", "Pixelated" }; GUILayout.BeginVertical(Array.Empty<GUILayoutOption>()); for (int i = 0; i < 5; i++) { GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); for (int j = 0; j < 4; j++) { int num = i * 4 + j; if (num < array.Length) { GUIStyle val = ((value == array[num]) ? gridButtonSelectedStyle : gridButtonStyle); if (GUILayout.Button(array[num], val, (GUILayoutOption[])(object)new GUILayoutOption[2] { GUILayout.Width(130f), GUILayout.Height(22f) })) { ConfigManager.DisplayFilter.Value = array[num]; ((ConfigEntryBase)ConfigManager.DisplayFilter).ConfigFile.Save(); } } } GUILayout.EndHorizontal(); } GUILayout.EndVertical(); GUILayout.EndHorizontal(); GUILayout.EndScrollView(); } private static void DrawHUDOverlaySettings() { //IL_0000: 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_0027: Unknown result type (might be due to invalid IL or missing references) gameplayScrollPosition = GUILayout.BeginScrollView(gameplayScrollPosition, (GUILayoutOption[])(object)new GUILayoutOption[2] { GUILayout.ExpandWidth(true), GUILayout.ExpandHeight(true) }); GUILayout.Label("Mod QoL Settings", headerStyle, Array.Empty<GUILayoutOption>()); GUILayout.Space(5f); GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); GUILayout.Label("Run In Background:", labelStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(160f) }); bool value = ConfigManager.DontStopOnFocusLoss.Value; bool flag = GUILayout.Toggle(value, value ? " Enabled" : " Disabled", (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(100f) }); if (flag != value) { ConfigManager.DontStopOnFocusLoss.Value = flag; Application.runInBackground = flag; ((ConfigEntryBase)ConfigManager.DontStopOnFocusLoss).ConfigFile.Save(); } GUILayout.EndHorizontal(); GUILayout.Space(8f); GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); GUILayout.Label("Preserve Window Size:", labelStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(160f) }); bool value2 = ConfigManager.PreserveWindowSize.Value; bool flag2 = GUILayout.Toggle(value2, value2 ? " Enabled" : " Disabled", (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(100f) }); if (flag2 != value2) { ConfigManager.PreserveWindowSize.Value = flag2; ((ConfigEntryBase)ConfigManager.PreserveWindowSize).ConfigFile.Save(); } GUILayout.EndHorizontal(); DrawSeparator(); GUILayout.Label("Mod HUD Settings", headerStyle, Array.Empty<GUILayoutOption>()); GUILayout.Space(5f); string[] array = new string[7] { "Off", "Top-Left", "Top-Middle", "Top-Right", "Bottom-Left", "Bottom-Middle", "Bottom-Right" }; GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); GUILayout.Label("Show Clock HUD:", labelStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(160f) }); string value3 = ConfigManager.ShowClock.Value; GUILayout.BeginVertical(Array.Empty<GUILayoutOption>()); GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); for (int i = 0; i < 4; i++) { GUIStyle val = ((value3 == array[i]) ? gridButtonSelectedStyle : gridButtonStyle); if (GUILayout.Button(array[i], val, (GUILayoutOption[])(object)new GUILayoutOption[2] { GUILayout.Width(90f), GUILayout.Height(22f) })) { ConfigManager.ShowClock.Value = array[i]; ((ConfigEntryBase)ConfigManager.ShowClock).ConfigFile.Save(); } } GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); for (int j = 4; j < 7; j++) { GUIStyle val2 = ((value3 == array[j]) ? gridButtonSelectedStyle : gridButtonStyle); if (GUILayout.Button(array[j], val2, (GUILayoutOption[])(object)new GUILayoutOption[2] { GUILayout.Width(90f), GUILayout.Height(22f) })) { ConfigManager.ShowClock.Value = array[j]; ((ConfigEntryBase)ConfigManager.ShowClock).ConfigFile.Save(); } } GUILayout.EndHorizontal(); GUILayout.EndVertical(); GUILayout.EndHorizontal(); GUILayout.Space(8f); GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); GUILayout.Label("Show Timer HUD:", labelStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(160f) }); string value4 = ConfigManager.ShowSpeedrunTimer.Value; GUILayout.BeginVertical(Array.Empty<GUILayoutOption>()); GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); for (int k = 0; k < 4; k++) { GUIStyle val3 = ((value4 == array[k]) ? gridButtonSelectedStyle : gridButtonStyle); if (GUILayout.Button(array[k], val3, (GUILayoutOption[])(object)new GUILayoutOption[2] { GUILayout.Width(90f), GUILayout.Height(22f) })) { ConfigManager.ShowSpeedrunTimer.Value = array[k]; ((ConfigEntryBase)ConfigManager.ShowSpeedrunTimer).ConfigFile.Save(); } } GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); for (int l = 4; l < 7; l++) { GUIStyle val4 = ((value4 == array[l]) ? gridButtonSelectedStyle : gridButtonStyle); if (GUILayout.Button(array[l], val4, (GUILayoutOption[])(object)new GUILayoutOption[2] { GUILayout.Width(90f), GUILayout.Height(22f) })) { ConfigManager.ShowSpeedrunTimer.Value = array[l]; ((ConfigEntryBase)ConfigManager.ShowSpeedrunTimer).ConfigFile.Save(); } } GUILayout.EndHorizontal(); GUILayout.EndVertical(); GUILayout.EndHorizontal(); DrawSeparator(); GUILayout.Label("HUD Appearance & Style", headerStyle, Array.Empty<GUILayoutOption>()); GUILayout.Space(5f); GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); GUILayout.Label($"Clock Size ({ConfigManager.ClockSize.Value}px):", labelStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(160f) }); int num = Mathf.RoundToInt(GUILayout.HorizontalSlider((float)ConfigManager.ClockSize.Value, 10f, 40f, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(180f) })); if (num != ConfigManager.ClockSize.Value) { ConfigManager.ClockSize.Value = num; ((ConfigEntryBase)ConfigManager.ClockSize).ConfigFile.Save(); } GUILayout.EndHorizontal(); GUILayout.Space(8f); GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); GUILayout.Label("Clock Text Color:", labelStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(160f) }); string value5 = ConfigManager.ClockColorName.Value; string[] array2 = new string[7] { "Green-Cyan", "Hot Pink", "Neon Purple", "Electric Blue", "Sun Gold", "Ice White", "Crimson Red" }; GUILayout.BeginVertical(Array.Empty<GUILayoutOption>()); GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); for (int m = 0; m < 4; m++) { GUIStyle val5 = ((value5 == array2[m]) ? gridButtonSelectedStyle : gridButtonStyle); if (GUILayout.Button(array2[m], val5, (GUILayoutOption[])(object)new GUILayoutOption[2] { GUILayout.Width(90f), GUILayout.Height(22f) })) { ConfigManager.ClockColorName.Value = array2[m]; ((ConfigEntryBase)ConfigManager.ClockColorName).ConfigFile.Save(); } } GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); for (int n = 4; n < 7; n++) { GUIStyle val6 = ((value5 == array2[n]) ? gridButtonSelectedStyle : gridButtonStyle); if (GUILayout.Button(array2[n], val6, (GUILayoutOption[])(object)new GUILayoutOption[2] { GUILayout.Width(90f), GUILayout.Height(22f) })) { ConfigManager.ClockColorName.Value = array2[n]; ((ConfigEntryBase)ConfigManager.ClockColorName).ConfigFile.Save(); } } GUILayout.EndHorizontal(); GUILayout.EndVertical(); GUILayout.EndHorizontal(); GUILayout.Space(12f); GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); GUILayout.Label($"Timer Size ({ConfigManager.TimerSize.Value}px):", labelStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(160f) }); int num2 = Mathf.RoundToInt(GUILayout.HorizontalSlider((float)ConfigManager.TimerSize.Value, 10f, 40f, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(180f) })); if (num2 != ConfigManager.TimerSize.Value) { ConfigManager.TimerSize.Value = num2; ((ConfigEntryBase)ConfigManager.TimerSize).ConfigFile.Save(); } GUILayout.EndHorizontal(); GUILayout.Space(8f); GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); GUILayout.Label("Timer Text Color:", labelStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(160f) }); string value6 = ConfigManager.TimerColorName.Value; GUILayout.BeginVertical(Array.Empty<GUILayoutOption>()); GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); for (int num3 = 0; num3 < 4; num3++) { GUIStyle val7 = ((value6 == array2[num3]) ? gridButtonSelectedStyle : gridButtonStyle); if (GUILayout.Button(array2[num3], val7, (GUILayoutOption[])(object)new GUILayoutOption[2] { GUILayout.Width(90f), GUILayout.Height(22f) })) { ConfigManager.TimerColorName.Value = array2[num3]; ((ConfigEntryBase)ConfigManager.TimerColorName).ConfigFile.Save(); } } GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); for (int num4 = 4; num4 < 7; num4++) { GUIStyle val8 = ((value6 == array2[num4]) ? gridButtonSelectedStyle : gridButtonStyle); if (GUILayout.Button(array2[num4], val8, (GUILayoutOption[])(object)new GUILayoutOption[2] { GUILayout.Width(90f), GUILayout.Height(22f) })) { ConfigManager.TimerColorName.Value = array2[num4]; ((ConfigEntryBase)ConfigManager.TimerColorName).ConfigFile.Save(); } } GUILayout.EndHorizontal(); GUILayout.EndVertical(); GUILayout.EndHorizontal(); GUILayout.Space(12f); GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); GUILayout.Label($"HUD Box Opacity ({Mathf.RoundToInt(ConfigManager.HudBgOpacity.Value * 100f)}%):", labelStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(160f) }); float num5 = GUILayout.HorizontalSlider(ConfigManager.HudBgOpacity.Value, 0f, 1f, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(180f) }); if (num5 != ConfigManager.HudBgOpacity.Value) { ConfigManager.HudBgOpacity.Value = (float)Math.Round(num5, 2); ((ConfigEntryBase)ConfigManager.HudBgOpacity).ConfigFile.Save(); } GUILayout.EndHorizontal(); GUILayout.Space(8f); GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); GUILayout.Label("HUD Font Style:", labelStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(160f) }); string value7 = ConfigManager.HudFontStyle.Value; string[] array3 = new string[4] { "Normal", "Bold", "Italic", "BoldItalic" }; for (int num6 = 0; num6 < array3.Length; num6++) { GUIStyle val9 = ((value7 == array3[num6]) ? gridButtonSelectedStyle : gridButtonStyle); if (GUILayout.Button(array3[num6], val9, (GUILayoutOption[])(object)new GUILayoutOption[2] { GUILayout.Width(80f), GUILayout.Height(22f) })) { ConfigManager.HudFontStyle.Value = array3[num6]; ((ConfigEntryBase)ConfigManager.HudFontStyle).ConfigFile.Save(); } } GUILayout.EndHorizontal(); DrawSeparator(); GUILayout.Label("Active Bullet Indicator", headerStyle, Array.Empty<GUILayoutOption>()); GUILayout.Space(5f); GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); GUILayout.Label("Selected Bullet:", labelStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(160f) }); string value8 = ConfigManager.ShowSelectedBullet.Value; string[] array4 = new string[4] { "Off", "Dot Queue Only", "Name Only", "Name & Ammo Count" }; int[] array5 = new int[4] { 50, 115, 95, 145 }; for (int num7 = 0; num7 < array4.Length; num7++) { GUIStyle val10 = ((value8 == array4[num7]) ? gridButtonSelectedStyle : gridButtonStyle); if (GUILayout.Button(array4[num7], val10, (GUILayoutOption[])(object)new GUILayoutOption[2] { GUILayout.Width((float)array5[num7]), GUILayout.Height(22f) })) { ConfigManager.ShowSelectedBullet.Value = array4[num7]; ((ConfigEntryBase)ConfigManager.ShowSelectedBullet).ConfigFile.Save(); } } GUILayout.EndHorizontal(); GUILayout.Space(8f); GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); GUILayout.Label($"Text Size ({ConfigManager.SelectedBulletSize.Value}px):", labelStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(160f) }); int num8 = Mathf.RoundToInt(GUILayout.HorizontalSlider((float)ConfigManager.SelectedBulletSize.Value, 10f, 30f, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(180f) })); if (num8 != ConfigManager.SelectedBulletSize.Value) { ConfigManager.SelectedBulletSize.Value = num8; ((ConfigEntryBase)ConfigManager.SelectedBulletSize).ConfigFile.Save(); } GUILayout.EndHorizontal(); GUILayout.Space(8f); GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); GUILayout.Label($"Vertical Offset ({ConfigManager.SelectedBulletOffset.Value:F0}px):", labelStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(160f) }); float num9 = GUILayout.HorizontalSlider(ConfigManager.SelectedBulletOffset.Value, 10f, 150f, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(180f) }); if (num9 != ConfigManager.SelectedBulletOffset.Value) { ConfigManager.SelectedBulletOffset.Value = Mathf.Round(num9); ((ConfigEntryBase)ConfigManager.SelectedBulletOffset).ConfigFile.Save(); } GUILayout.EndHorizontal(); GUILayout.Space(8f); GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); GUILayout.Label("Show Bullet Queue:", labelStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(160f) }); bool value9 = ConfigManager.ShowBulletQueue.Value; bool flag3 = GUILayout.Toggle(value9, value9 ? " Enabled" : " Disabled", (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(100f) }); if (flag3 != value9) { ConfigManager.ShowBulletQueue.Value = flag3; ((ConfigEntryBase)ConfigManager.ShowBulletQueue).ConfigFile.Save(); } GUILayout.EndHorizontal(); GUILayout.EndScrollView(); } private static void DrawKeybindsSettings() { //IL_0000: 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_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_0142: 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) keybindsScrollPosition = GUILayout.BeginScrollView(keybindsScrollPosition, (GUILayoutOption[])(object)new GUILayoutOption[2] { GUILayout.ExpandWidth(true), GUILayout.ExpandHeight(true) }); GUILayout.Label("Keybinds Settings", headerStyle, Array.Empty<GUILayoutOption>()); GUILayout.Space(10f); GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); GUILayout.Label("Open Settings Keybind:", labelStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(200f) }); if (GUILayout.Button((waitingForKeybind == "Menu") ? "Press any key..." : $"[ {ConfigManager.OpenMenuKey.Value} ]", buttonStyle, (GUILayoutOption[])(object)new GUILayoutOption[2] { GUILayout.Width(150f), GUILayout.Height(30f) })) { waitingForKeybind = "Menu"; } GUILayout.EndHorizontal(); GUILayout.Space(10f); GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); GUILayout.Label("Camera Zoom Keybind:", labelStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(200f) }); if (GUILayout.Button((waitingForKeybind == "Zoom") ? "Press any key..." : $"[ {ConfigManager.ZoomKey.Value} ]", buttonStyle, (GUILayoutOption[])(object)new GUILayoutOption[2] { GUILayout.Width(150f), GUILayout.Height(30f) })) { waitingForKeybind = "Zoom"; } GUILayout.EndHorizontal(); GUILayout.Space(10f); GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); GUILayout.Label("Quick Restart Keybind:", labelStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(200f) }); if (GUILayout.Button((waitingForKeybind == "Restart") ? "Press any key..." : $"[ {ConfigManager.QuickRestartKey.Value} ]", buttonStyle, (GUILayoutOption[])(object)new GUILayoutOption[2] { GUILayout.Width(150f), GUILayout.Height(30f) })) { waitingForKeybind = "Restart"; } GUILayout.EndHorizontal(); GUILayout.Space(20f); GUILayout.Label("Click a button and press any key to rebind the respective hotkey.", labelStyle, Array.Empty<GUILayoutOption>()); GUILayout.EndScrollView(); } private static void DrawGameplaySettings() { //IL_0000: 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_0027: Unknown result type (might be due to invalid IL or missing references) gameplayScrollPosition = GUILayout.BeginScrollView(gameplayScrollPosition, (GUILayoutOption[])(object)new GUILayoutOption[2] { GUILayout.ExpandWidth(true), GUILayout.ExpandHeight(true) }); GUILayout.Label("Gameplay Adjustments", headerStyle, Array.Empty<GUILayoutOption>()); GUILayout.Space(10f); GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); GUILayout.Label($"Game Speed ({ConfigManager.GameSpeed.Value:F1}x):", labelStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(150f) }); float num = GUILayout.HorizontalSlider(ConfigManager.GameSpeed.Value, 0.1f, 5f, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(200f) }); if (num != ConfigManager.GameSpeed.Value) { ConfigManager.GameSpeed.Value = num; ((ConfigEntryBase)ConfigManager.GameSpeed).ConfigFile.Save(); if (!isMenuOpen) { Time.timeScale = num; } } GUILayout.Space(10f); if (GUILayout.Button("Reset", resetButtonStyle, (GUILayoutOption[])(object)new GUILayoutOption[2] { GUILayout.Width(60f), GUILayout.Height(25f) })) { ConfigManager.GameSpeed.Value = 1f; ((ConfigEntryBase)ConfigManager.GameSpeed).ConfigFile.Save(); if (!isMenuOpen) { Time.timeScale = 1f; } } GUILayout.EndHorizontal(); DrawSeparator(); GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); GUILayout.Label($"Field of View ({ConfigManager.Fov.Value:F0}°):", labelStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(150f) }); float num2 = GUILayout.HorizontalSlider(ConfigManager.Fov.Value, 50f, 130f, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(200f) }); if (num2 != ConfigManager.Fov.Value) { ConfigManager.Fov.Value = num2; GameControl.ApplyFov(); ((ConfigEntryBase)ConfigManager.Fov).ConfigFile.Save(); } GUILayout.Space(10f); if (GUILayout.Button("Reset", resetButtonStyle, (GUILayoutOption[])(object)new GUILayoutOption[2] { GUILayout.Width(60f), GUILayout.Height(25f) })) { ConfigManager.Fov.Value = 60f; GameControl.ApplyFov(); ((ConfigEntryBase)ConfigManager.Fov).ConfigFile.Save(); } GUILayout.EndHorizontal(); DrawSeparator(); GUILayout.Label("Camera Zoom Settings", headerStyle, Array.Empty<GUILayoutOption>()); GUILayout.Space(5f); GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); GUILayout.Label("Enable Camera Zoom:", labelStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(150f) }); bool value = ConfigManager.EnableZoom.Value; bool flag = GUILayout.Toggle(value, value ? " Enabled" : " Disabled", (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(100f) }); if (flag != value) { ConfigManager.EnableZoom.Value = flag; ((ConfigEntryBase)ConfigManager.EnableZoom).ConfigFile.Save(); } GUILayout.EndHorizontal(); GUILayout.Space(8f); GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); GUILayout.Label($"Zoom Target FOV ({ConfigManager.ZoomFov.Value:F0}°):", labelStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(150f) }); float num3 = GUILayout.HorizontalSlider(ConfigManager.ZoomFov.Value, 10f, 50f, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(200f) }); if (num3 != ConfigManager.ZoomFov.Value) { ConfigManager.ZoomFov.Value = num3; ((ConfigEntryBase)ConfigManager.ZoomFov).ConfigFile.Save(); } GUILayout.Space(10f); if (GUILayout.Button("Reset", resetButtonStyle, (GUILayoutOption[])(object)new GUILayoutOption[2] { GUILayout.Width(60f), GUILayout.Height(25f) })) { ConfigManager.ZoomFov.Value = 30f; ((ConfigEntryBase)ConfigManager.ZoomFov).ConfigFile.Save(); } GUILayout.EndHorizontal(); GUILayout.Space(8f); GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); GUILayout.Label("Zoom Hold Mode:", labelStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(150f) }); bool flag2 = ConfigManager.ZoomType.Value == "Hold"; bool flag3 = GUILayout.Toggle(flag2, flag2 ? " Hold to Zoom" : " Toggle Zoom", (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(150f) }); if (flag3 != flag2) { ConfigManager.ZoomType.Value = (flag3 ? "Hold" : "Toggle"); ((ConfigEntryBase)ConfigManager.ZoomType).ConfigFile.Save(); } GUILayout.EndHorizontal(); GUILayout.Space(8f); GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); GUILayout.Label("Scale Zoom Sens:", labelStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(150f) }); bool value2 = ConfigManager.ZoomSensitivityScale.Value; bool flag4 = GUILayout.Toggle(value2, value2 ? " Enabled" : " Disabled", (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(100f) }); if (flag4 != value2) { ConfigManager.ZoomSensitivityScale.Value = flag4; ((ConfigEntryBase)ConfigManager.ZoomSensitivityScale).ConfigFile.Save(); } GUILayout.EndHorizontal(); GUILayout.Space(8f); GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); GUILayout.Label($"Zoom Sens Mult ({ConfigManager.ZoomSensitivityMult.Value:F2}x):", labelStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(150f) }); float num4 = GUILayout.HorizontalSlider(ConfigManager.ZoomSensitivityMult.Value, 0.1f, 2f, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(200f) }); if (num4 != ConfigManager.ZoomSensitivityMult.Value) { ConfigManager.ZoomSensitivityMult.Value = (float)Math.Round(num4, 2); ((ConfigEntryBase)ConfigManager.ZoomSensitivityMult).ConfigFile.Save(); } GUILayout.Space(10f); if (GUILayout.Button("Reset", resetButtonStyle, (GUILayoutOption[])(object)new GUILayoutOption[2] { GUILayout.Width(60f), GUILayout.Height(25f) })) { ConfigManager.ZoomSensitivityMult.Value = 1f; ((ConfigEntryBase)ConfigManager.ZoomSensitivityMult).ConfigFile.Save(); } GUILayout.EndHorizontal(); GUILayout.EndScrollView(); } private static void DrawSpeedrunsPage() { //IL_0000: 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_0027: 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_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_09df: Unknown result type (might be due to invalid IL or missing references) //IL_09e6: Expected O, but got Unknown //IL_0a25: Unknown result type (might be due to invalid IL or missing references) //IL_0a0f: Unknown result type (might be due to invalid IL or missing references) speedrunsScrollPosition = GUILayout.BeginScrollView(speedrunsScrollPosition, (GUILayoutOption[])(object)new GUILayoutOption[2] { GUILayout.ExpandWidth(true), GUILayout.ExpandHeight(true) }); GUILayout.Label("Speedrun History & Records", headerStyle, Array.Empty<GUILayoutOption>()); GUILayout.Space(10f); if (selectedRunForSplits != null) { GUILayout.Label("Splits for run on " + selectedRunForSplits.DateString + " (" + selectedRunForSplits.WeaponName + ")", headerStyle, Array.Empty<GUILayoutOption>()); GUILayout.BeginVertical(StatsOverlay.statsBoxStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(true) }); splitsDetailScrollPosition = GUILayout.BeginScrollView(splitsDetailScrollPosition, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(150f) }); GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); GUILayout.Label("Segment", labelStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(150f) }); GUILayout.Label("Duration", labelStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(100f) }); GUILayout.Label("Cumulative", labelStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(120f) }); GUILayout.EndHorizontal(); DrawSeparator(); string serializedSplits = selectedRunForSplits.SerializedSplits; if (!string.IsNullOrEmpty(serializedSplits)) { string[] array = serializedSplits.Split(new char[1] { ',' }, StringSplitOptions.RemoveEmptyEntries); for (int i = 0; i < array.Length; i++) { string[] array2 = array[i].Split(new char[1] { ':' }); if (array2.Length >= 3) { GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); GUILayout.Label(array2[0], labelStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(150f) }); GUILayout.Label($"{float.Parse(array2[1]):F2}s", labelStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(100f) }); GUILayout.Label(array2[2] + "s", labelStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(120f) }); GUILayout.EndHorizontal(); } } } else { GUILayout.Label("No splits recorded for this run.", labelStyle, Array.Empty<GUILayoutOption>()); } GUILayout.EndScrollView(); if (GUILayout.Button("Close Split Viewer", resetButtonStyle, (GUILayoutOption[])(object)new GUILayoutOption[2] { GUILayout.Width(140f), GUILayout.Height(25f) })) { selectedRunForSplits = null; } GUILayout.EndVertical(); GUILayout.Space(15f); DrawSeparator(); } GUILayout.Label("Current Run - Segment Splits", headerStyle, Array.Empty<GUILayoutOption>()); GUILayout.Space(5f); if (StatsOverlay.currentRunSplits.Count > 0) { GUILayout.BeginVertical(StatsOverlay.statsBoxStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(true) }); GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); GUILayout.Label("Segment", labelStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(150f) }); GUILayout.Label("Duration", labelStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(100f) }); GUILayout.Label("Cumulative", labelStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(120f) }); GUILayout.EndHorizontal(); DrawSeparator(); foreach (SpeedrunSplit currentRunSplit in StatsOverlay.currentRunSplits) { GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); GUILayout.Label(currentRunSplit.SegmentName, labelStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(150f) }); GUILayout.Label($"{currentRunSplit.SegmentDuration:F2}s", labelStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(100f) }); int num = (int)(currentRunSplit.CumulativeTime / 60f); int num2 = (int)(currentRunSplit.CumulativeTime % 60f); int num3 = (int)(currentRunSplit.CumulativeTime * 100f % 100f); GUILayout.Label($"{num:D2}:{num2:D2}.{num3:D2}", labelStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(120f) }); GUILayout.EndHorizontal(); } GUILayout.EndVertical(); } else { GUILayout.Label("No active splits for the current run. Start a round to begin timing!", labelStyle, Array.Empty<GUILayoutOption>()); } GUILayout.Space(20f); DrawSeparator(); GUILayout.Space(10f); GUILayout.Label("Personal Bests (PBs) per Weapon", headerStyle, Array.Empty<GUILayoutOption>()); GUILayout.Space(5f); if (StatsOverlay.weaponPBs.Count > 0) { GUILayout.BeginVertical(StatsOverlay.statsBoxStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(true) }); GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); GUILayout.Label("Weapon", labelStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(200f) }); GUILayout.Label("Best Final Time", labelStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(150f) }); GUILayout.EndHorizontal(); DrawSeparator(); foreach (KeyValuePair<string, float> weaponPB in StatsOverlay.weaponPBs) { GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); GUILayout.Label(weaponPB.Key, labelStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(200f) }); int num4 = (int)(weaponPB.Value / 60f); int num5 = (int)(weaponPB.Value % 60f); int num6 = (int)(weaponPB.Value * 100f % 100f);