Decompiled source of MegabonkModMenu v0.2.1

BepInEx/plugins/MegabonkModMenu.dll

Decompiled 15 hours ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using Assets.Scripts.Actors.Player;
using Assets.Scripts.Inventory__Items__Pickups;
using Assets.Scripts.Inventory__Items__Pickups.Items;
using Assets.Scripts.Inventory__Items__Pickups.Stats;
using Assets.Scripts.Inventory__Items__Pickups.Weapons;
using Assets.Scripts.Menu.Shop;
using Assets.Scripts.Player.Movement;
using Assets.Scripts._Data.Tomes;
using BepInEx;
using BepInEx.Core.Logging.Interpolation;
using BepInEx.Logging;
using BepInEx.Unity.IL2CPP;
using Il2CppInterop.Runtime.Injection;
using Il2CppSystem.Collections.Generic;
using Inventory__Items__Pickups.Xp_and_Levels;
using Microsoft.CodeAnalysis;
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.Events;
using UnityEngine.UI;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")]
[assembly: AssemblyCompany("MegabonkModMenu")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("MegabonkModMenu")]
[assembly: AssemblyTitle("MegabonkModMenu")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace MegabonkModMenu
{
	[BepInPlugin("elmor.megabonk.modmenu", "Megabonk Mod Menu", "0.2.0")]
	public sealed class Plugin : BasePlugin
	{
		public const string PluginGuid = "elmor.megabonk.modmenu";

		public const string PluginName = "Megabonk Mod Menu";

		public const string PluginVersion = "0.2.0";

		internal static Plugin Instance;

		public override void Load()
		{
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_0018: Expected O, but got Unknown
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0041: Expected O, but got Unknown
			Instance = this;
			ClassInjector.RegisterTypeInIl2Cpp<MenuBehaviour>();
			GameObject val = new GameObject("MegabonkModMenuHost");
			Object.DontDestroyOnLoad((Object)(object)val);
			((Object)val).hideFlags = (HideFlags)61;
			val.AddComponent<MenuBehaviour>();
			ManualLogSource log = ((BasePlugin)this).Log;
			bool flag = default(bool);
			BepInExInfoLogInterpolatedStringHandler val2 = new BepInExInfoLogInterpolatedStringHandler(37, 2, ref flag);
			if (flag)
			{
				((BepInExLogInterpolatedStringHandler)val2).AppendFormatted<string>("Megabonk Mod Menu");
				((BepInExLogInterpolatedStringHandler)val2).AppendLiteral(" v");
				((BepInExLogInterpolatedStringHandler)val2).AppendFormatted<string>("0.2.0");
				((BepInExLogInterpolatedStringHandler)val2).AppendLiteral(" loaded. Press F1 to open the menu.");
			}
			log.LogInfo(val2);
		}
	}
	public sealed class MenuBehaviour : MonoBehaviour
	{
		private enum MenuTab
		{
			Player,
			Combat,
			Movement,
			Currency,
			Spawn
		}

		private enum SpawnTab
		{
			Items,
			Tomes,
			Weapons
		}

		private enum PlayerSubTab
		{
			Defense,
			Recovery,
			Status
		}

		private enum CombatSubTab
		{
			Damage,
			Presets,
			Projectiles
		}

		private enum MovementSubTab
		{
			Actions,
			Mobility
		}

		private enum CurrencySubTab
		{
			Economy,
			Powerups
		}

		private Rect _panelRect = new Rect(20f, 20f, 470f, 530f);

		private bool _showMenu;

		private bool _capturedDefaults;

		private bool _savedPositionValid;

		private bool _requestHeal;

		private bool _requestGold;

		private bool _requestXp;

		private bool _requestSilver;

		private bool _requestTeleport;

		private bool _dragging;

		private float _nextStatApplyTime;

		private MenuTab _activeTab;

		private SpawnTab _activeSpawnTab;

		private PlayerSubTab _activePlayerSubTab;

		private CombatSubTab _activeCombatSubTab;

		private MovementSubTab _activeMovementSubTab;

		private CurrencySubTab _activeCurrencySubTab;

		private Texture2D _panelBackground;

		private Texture2D _headerBackground;

		private GUIStyle _panelStyle;

		private Font _uiFont;

		private GameObject _canvasRoot;

		private RectTransform _canvasRootRect;

		private RectTransform _windowRect;

		private RectTransform _pageHost;

		private Text _canvasTitle;

		private Text _statusPrimaryText;

		private Text _statusSecondaryText;

		private Text _statusTertiaryText;

		private readonly Dictionary<MenuTab, GameObject> _tabPages = new Dictionary<MenuTab, GameObject>();

		private readonly Dictionary<MenuTab, Image> _tabButtonBackgrounds = new Dictionary<MenuTab, Image>();

		private readonly List<Action> _uiRefreshers = new List<Action>();

		private readonly Dictionary<string, string> _appliedStatSignatures = new Dictionary<string, string>();

		private bool _draggingCanvasWindow;

		private bool _resizingCanvasWindow;

		private Vector2 _canvasPointerStartLocal;

		private Vector2 _windowStartAnchoredPosition;

		private Vector2 _windowStartSize;

		private Vector2 _dragOffset;

		private Vector3 _savedPosition;

		private float _defaultBaseMoveSpeed;

		private float _defaultMoveSpeed;

		private float _defaultMaxRunSpeed;

		private float _defaultSwimSpeed;

		private float _defaultSlideForce;

		private float _defaultFov = 75f;

		private int _cachedHp;

		private int _cachedMaxHp;

		private float _cachedShield;

		private float _cachedMaxShield;

		private int _cachedLevel;

		private int _cachedXp;

		private Vector3 _cachedPosition;

		private bool _godMode;

		private bool _noclip;

		private bool _infiniteJump;

		private float _speedMultiplier = 1f;

		private int _targetFov = 75;

		private float _maxHealthBonus;

		private float _shieldBonus;

		private float _healthRegenBonus;

		private float _overhealBonus;

		private float _armorBonus;

		private float _evasionBonus;

		private float _thornsBonus;

		private float _damageMultiplier = 1f;

		private float _attackSpeedMultiplier = 1f;

		private float _projectileBonus;

		private float _critChanceBonus;

		private float _critDamageBonus;

		private float _lifestealBonus;

		private float _projectileBounceBonus;

		private float _projectileSpeedMultiplier = 1f;

		private float _sizeMultiplier = 1f;

		private float _durationMultiplier = 1f;

		private float _damageToElitesMultiplier = 1f;

		private float _knockbackMultiplier = 1f;

		private float _jumpHeightMultiplier = 1f;

		private float _extraJumpsBonus;

		private float _goldMultiplier = 1f;

		private float _xpMultiplier = 1f;

		private float _silverMultiplier = 1f;

		private float _luckBonus;

		private float _shopDiscountBonus;

		private float _pickupRangeBonus;

		private float _eliteSpawnMultiplier = 1f;

		private float _powerupMultiplier = 1f;

		private float _powerupDropChanceMultiplier = 1f;

		private const float MinWindowWidth = 860f;

		private const float MinWindowHeight = 560f;

		private const float ResizeGripSize = 18f;

		private float _nextUiRefreshTime;

		private readonly string[] _weaponNames = (from n in Enum.GetNames(typeof(EWeapon))
			where n != "None"
			select n).OrderBy<string, string>((string n) => n, StringComparer.OrdinalIgnoreCase).ToArray();

		private readonly string[] _tomeNames = Enum.GetNames(typeof(ETome)).OrderBy<string, string>((string n) => n, StringComparer.OrdinalIgnoreCase).ToArray();

		private readonly string[] _itemNames = Enum.GetNames(typeof(EItem)).OrderBy<string, string>((string n) => n, StringComparer.OrdinalIgnoreCase).ToArray();

		private Vector2 _weaponScroll;

		private Vector2 _tomeScroll;

		private Vector2 _itemScroll;

		private Vector2 _playerTabScroll;

		private Vector2 _combatTabScroll;

		private Vector2 _movementTabScroll;

		private Vector2 _currencyTabScroll;

		private int _itemAddAmount = 1;

		private int _goldAddAmount = 1000;

		private int _silverAddAmount = 1000;

		private int _xpAddAmount = 1000;

		private string _statusText = "Ready";

		private float _statusUntil;

		private static readonly EventType[] RelevantGuiEvents;

		public MenuBehaviour(IntPtr ptr)
			: base(ptr)
		{
		}//IL_0015: Unknown result type (might be due to invalid IL or missing references)
		//IL_001a: Unknown result type (might be due to invalid IL or missing references)


		private void Update()
		{
			//IL_008a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0091: Expected O, but got Unknown
			try
			{
				HandleInput();
				if (_showMenu)
				{
					EnsureCanvasUi();
					HandleCanvasWindowInteraction();
					RefreshCanvasUi();
				}
				MyPlayer instance = MyPlayer.Instance;
				if (!((Object)(object)instance == (Object)null) && instance.inventory != null)
				{
					CaptureDefaults(instance);
					ProcessRequests(instance);
					ApplyConfiguredStats(instance);
					ApplyLiveFeatures(instance);
					CachePlayerInfo(instance);
				}
			}
			catch (Exception ex)
			{
				ManualLogSource log = ((BasePlugin)Plugin.Instance).Log;
				bool flag = default(bool);
				BepInExErrorLogInterpolatedStringHandler val = new BepInExErrorLogInterpolatedStringHandler(20, 1, ref flag);
				if (flag)
				{
					((BepInExLogInterpolatedStringHandler)val).AppendLiteral("Menu update failed: ");
					((BepInExLogInterpolatedStringHandler)val).AppendFormatted<Exception>(ex);
				}
				log.LogError(val);
			}
		}

		private void OnGUI()
		{
		}

		private void HandleInput()
		{
			if (Input.GetKeyDown((KeyCode)282))
			{
				SetMenuVisible(!_showMenu);
			}
		}

		private void SetMenuVisible(bool visible)
		{
			_showMenu = visible;
			Cursor.visible = visible;
			Cursor.lockState = (CursorLockMode)((!visible) ? 1 : 0);
			if ((Object)(object)_canvasRoot != (Object)null)
			{
				_canvasRoot.SetActive(visible);
			}
			PushStatus(visible ? "Menu opened" : "Menu hidden");
		}

		private void ProcessRequests(MyPlayer player)
		{
			//IL_0197: Unknown result type (might be due to invalid IL or missing references)
			if (_requestHeal)
			{
				_requestHeal = false;
				FullHeal(player);
				PushStatus("Player healed to full");
			}
			if (_requestGold)
			{
				_requestGold = false;
				PlayerInventory inventory = player.inventory;
				if (inventory != null)
				{
					inventory.ChangeGold(_goldAddAmount);
				}
				PushStatus($"Added {_goldAddAmount} gold");
			}
			if (_requestXp)
			{
				_requestXp = false;
				PlayerInventory inventory2 = player.inventory;
				if (inventory2 != null)
				{
					inventory2.AddXp(_xpAddAmount);
				}
				PushStatus($"Added {_xpAddAmount} XP");
			}
			if (_requestSilver)
			{
				_requestSilver = false;
				PlayerInventory inventory3 = player.inventory;
				if (inventory3 != null)
				{
					inventory3.AddSilver(_silverAddAmount);
				}
				PushStatus($"Added {_silverAddAmount} silver");
			}
			if (_requestTeleport && _savedPositionValid)
			{
				_requestTeleport = false;
				PlayerMovement playerMovement = player.playerMovement;
				if (playerMovement != null)
				{
					playerMovement.TeleportPlayer(_savedPosition);
				}
				PushStatus("Teleported to saved position");
			}
		}

		private void CaptureDefaults(MyPlayer player)
		{
			if (_capturedDefaults)
			{
				return;
			}
			PlayerMovement playerMovement = player.playerMovement;
			PlayerMovementValues val = ((playerMovement != null) ? playerMovement.movementValues : null);
			if (!((Object)(object)playerMovement == (Object)null) && val != null)
			{
				_defaultBaseMoveSpeed = player.baseMovementSpeed;
				_defaultMoveSpeed = val.moveSpeed;
				_defaultMaxRunSpeed = val.maxRunSpeed;
				_defaultSwimSpeed = val.swimSpeed;
				_defaultSlideForce = val.slideForce;
				PlayerCamera instance = PlayerCamera.Instance;
				Camera val2 = ((instance != null) ? instance.camera : null);
				if ((Object)(object)val2 != (Object)null)
				{
					_defaultFov = val2.fieldOfView;
					_targetFov = Mathf.RoundToInt(_defaultFov);
				}
				_capturedDefaults = true;
			}
		}

		private void ApplyConfiguredStats(MyPlayer player)
		{
			if (!(Time.unscaledTime < _nextStatApplyTime))
			{
				_nextStatApplyTime = Time.unscaledTime + 0.2f;
				PlayerInventory inventory = player.inventory;
				StatInventory val = ((inventory != null) ? inventory.statInventory : null);
				if (val != null)
				{
					ApplyMovingStat(val, "modmenu_max_health", (EStat)0, _maxHealthBonus, (EStatModifyType)2, _maxHealthBonus > 0.01f);
					ApplyMovingStat(val, "modmenu_shield", (EStat)2, _shieldBonus, (EStatModifyType)2, _shieldBonus > 0.01f);
					ApplyMovingStat(val, "modmenu_regen", (EStat)1, _healthRegenBonus, (EStatModifyType)2, _healthRegenBonus > 0.01f);
					ApplyMovingStat(val, "modmenu_overheal", (EStat)47, _overhealBonus, (EStatModifyType)2, _overhealBonus > 0.01f);
					ApplyMovingStat(val, "modmenu_armor", (EStat)4, _armorBonus, (EStatModifyType)2, _armorBonus > 0.01f);
					ApplyMovingStat(val, "modmenu_evasion", (EStat)5, _evasionBonus, (EStatModifyType)2, _evasionBonus > 0.01f);
					ApplyMovingStat(val, "modmenu_thorns", (EStat)3, _thornsBonus, (EStatModifyType)2, _thornsBonus > 0.01f);
					ApplyMovingStat(val, "modmenu_damage_mult", (EStat)12, _damageMultiplier, (EStatModifyType)1, Math.Abs(_damageMultiplier - 1f) > 0.01f);
					ApplyMovingStat(val, "modmenu_attack_speed", (EStat)15, _attackSpeedMultiplier, (EStatModifyType)1, Math.Abs(_attackSpeedMultiplier - 1f) > 0.01f);
					ApplyMovingStat(val, "modmenu_projectiles", (EStat)16, _projectileBonus, (EStatModifyType)2, _projectileBonus > 0.01f);
					ApplyMovingStat(val, "modmenu_crit_chance", (EStat)18, _critChanceBonus, (EStatModifyType)2, _critChanceBonus > 0.01f);
					ApplyMovingStat(val, "modmenu_crit_damage", (EStat)19, _critDamageBonus, (EStatModifyType)2, _critDamageBonus > 0.01f);
					ApplyMovingStat(val, "modmenu_lifesteal", (EStat)17, _lifestealBonus, (EStatModifyType)2, _lifestealBonus > 0.01f);
					ApplyMovingStat(val, "modmenu_projectile_bounces", (EStat)45, _projectileBounceBonus, (EStatModifyType)2, _projectileBounceBonus > 0.01f);
					ApplyMovingStat(val, "modmenu_projectile_speed", (EStat)11, _projectileSpeedMultiplier, (EStatModifyType)1, Math.Abs(_projectileSpeedMultiplier - 1f) > 0.01f);
					ApplyMovingStat(val, "modmenu_size", (EStat)9, _sizeMultiplier, (EStatModifyType)1, Math.Abs(_sizeMultiplier - 1f) > 0.01f);
					ApplyMovingStat(val, "modmenu_duration", (EStat)10, _durationMultiplier, (EStatModifyType)1, Math.Abs(_durationMultiplier - 1f) > 0.01f);
					ApplyMovingStat(val, "modmenu_damage_to_elites", (EStat)23, _damageToElitesMultiplier, (EStatModifyType)1, Math.Abs(_damageToElitesMultiplier - 1f) > 0.01f);
					ApplyMovingStat(val, "modmenu_knockback", (EStat)24, _knockbackMultiplier, (EStatModifyType)1, Math.Abs(_knockbackMultiplier - 1f) > 0.01f);
					ApplyMovingStat(val, "modmenu_move_speed", (EStat)25, _speedMultiplier, (EStatModifyType)1, Math.Abs(_speedMultiplier - 1f) > 0.01f);
					ApplyMovingStat(val, "modmenu_jump_height", (EStat)26, _jumpHeightMultiplier, (EStatModifyType)1, Math.Abs(_jumpHeightMultiplier - 1f) > 0.01f);
					ApplyMovingStat(val, "modmenu_extra_jumps", (EStat)46, _extraJumpsBonus, (EStatModifyType)2, _extraJumpsBonus > 0.01f);
					ApplyMovingStat(val, "modmenu_gold_mult", (EStat)31, _goldMultiplier, (EStatModifyType)1, Math.Abs(_goldMultiplier - 1f) > 0.01f);
					ApplyMovingStat(val, "modmenu_xp_mult", (EStat)32, _xpMultiplier, (EStatModifyType)1, Math.Abs(_xpMultiplier - 1f) > 0.01f);
					ApplyMovingStat(val, "modmenu_silver_mult", (EStat)49, _silverMultiplier, (EStatModifyType)1, Math.Abs(_silverMultiplier - 1f) > 0.01f);
					ApplyMovingStat(val, "modmenu_luck", (EStat)30, _luckBonus, (EStatModifyType)2, _luckBonus > 0.01f);
					ApplyMovingStat(val, "modmenu_shop_discount", (EStat)35, _shopDiscountBonus, (EStatModifyType)2, _shopDiscountBonus > 0.01f);
					ApplyMovingStat(val, "modmenu_pickup_range", (EStat)29, _pickupRangeBonus, (EStatModifyType)2, _pickupRangeBonus > 0.01f);
					ApplyMovingStat(val, "modmenu_elite_spawn", (EStat)39, _eliteSpawnMultiplier, (EStatModifyType)1, Math.Abs(_eliteSpawnMultiplier - 1f) > 0.01f);
					ApplyMovingStat(val, "modmenu_powerup_mult", (EStat)40, _powerupMultiplier, (EStatModifyType)1, Math.Abs(_powerupMultiplier - 1f) > 0.01f);
					ApplyMovingStat(val, "modmenu_powerup_drop", (EStat)41, _powerupDropChanceMultiplier, (EStatModifyType)1, Math.Abs(_powerupDropChanceMultiplier - 1f) > 0.01f);
				}
			}
		}

		private void ApplyLiveFeatures(MyPlayer player)
		{
			if (_godMode)
			{
				FullHeal(player);
			}
			PlayerMovement playerMovement = player.playerMovement;
			if ((Object)(object)playerMovement != (Object)null)
			{
				playerMovement.isNoclipping = _noclip;
				if (_infiniteJump)
				{
					playerMovement.usedJumps = 0;
					playerMovement.aerialJumps = Mathf.Max(playerMovement.aerialJumps, 8);
					playerMovement.readyToJump = true;
					playerMovement.jumping = false;
				}
			}
			PlayerCamera instance = PlayerCamera.Instance;
			if ((Object)(object)instance != (Object)null)
			{
				instance.SetFov(_targetFov);
			}
		}

		private void CachePlayerInfo(MyPlayer player)
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			_cachedPosition = ((Component)player).transform.position;
			PlayerInventory inventory = player.inventory;
			PlayerHealth val = ((inventory != null) ? inventory.playerHealth : null);
			if (val != null)
			{
				_cachedHp = val.hp;
				_cachedMaxHp = val.maxHp;
				_cachedShield = val.shield;
				_cachedMaxShield = val.maxShield;
			}
			PlayerInventory inventory2 = player.inventory;
			PlayerXp val2 = ((inventory2 != null) ? inventory2.playerXp : null);
			if (val2 != null)
			{
				_cachedLevel = val2.level;
				_cachedXp = val2.xp;
			}
		}

		private void FullHeal(MyPlayer player)
		{
			PlayerInventory inventory = player.inventory;
			PlayerHealth val = ((inventory != null) ? inventory.playerHealth : null);
			if (val != null)
			{
				val.hp = val.maxHp;
				val.shield = val.maxShield;
				val.overheal = val.maxOverheal;
			}
		}

		private void EnsureCanvasUi()
		{
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			//IL_0040: Expected O, but got Unknown
			//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f4: Unknown result type (might be due to invalid IL or missing references)
			//IL_0100: Unknown result type (might be due to invalid IL or missing references)
			//IL_0126: Unknown result type (might be due to invalid IL or missing references)
			//IL_0143: Unknown result type (might be due to invalid IL or missing references)
			//IL_0159: Unknown result type (might be due to invalid IL or missing references)
			//IL_016f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0185: Unknown result type (might be due to invalid IL or missing references)
			//IL_0191: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_01cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0214: Unknown result type (might be due to invalid IL or missing references)
			//IL_0221: Unknown result type (might be due to invalid IL or missing references)
			//IL_0261: Unknown result type (might be due to invalid IL or missing references)
			//IL_0278: Unknown result type (might be due to invalid IL or missing references)
			//IL_028f: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_032b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0342: Unknown result type (might be due to invalid IL or missing references)
			//IL_0359: Unknown result type (might be due to invalid IL or missing references)
			//IL_0370: Unknown result type (might be due to invalid IL or missing references)
			//IL_0387: Unknown result type (might be due to invalid IL or missing references)
			//IL_03ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_03c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_03dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_03f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_040a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0421: Unknown result type (might be due to invalid IL or missing references)
			//IL_0447: Unknown result type (might be due to invalid IL or missing references)
			//IL_045f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0476: Unknown result type (might be due to invalid IL or missing references)
			//IL_048d: Unknown result type (might be due to invalid IL or missing references)
			//IL_04a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_04bb: 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_0555: Unknown result type (might be due to invalid IL or missing references)
			//IL_0570: Unknown result type (might be due to invalid IL or missing references)
			//IL_058b: Unknown result type (might be due to invalid IL or missing references)
			//IL_05a6: Unknown result type (might be due to invalid IL or missing references)
			if (!((Object)(object)_canvasRoot != (Object)null))
			{
				_uiFont = Resources.GetBuiltinResource<Font>("Arial.ttf");
				EnsureEventSystem();
				_canvasRoot = new GameObject("GogurtCanvas");
				_canvasRoot.transform.SetParent(((Component)this).transform, false);
				((Object)_canvasRoot).hideFlags = (HideFlags)61;
				Canvas val = _canvasRoot.AddComponent<Canvas>();
				val.renderMode = (RenderMode)0;
				val.sortingOrder = 5000;
				_canvasRoot.AddComponent<GraphicRaycaster>();
				CanvasScaler val2 = _canvasRoot.AddComponent<CanvasScaler>();
				val2.uiScaleMode = (ScaleMode)1;
				val2.referenceResolution = new Vector2(1920f, 1080f);
				val2.matchWidthOrHeight = 0.5f;
				RectTransform val3 = (_canvasRootRect = _canvasRoot.GetComponent<RectTransform>());
				val3.anchorMin = Vector2.zero;
				val3.anchorMax = Vector2.one;
				val3.offsetMin = Vector2.zero;
				val3.offsetMax = Vector2.zero;
				RectTransform val4 = (_windowRect = CreatePanel("Window", (Transform)(object)val3, new Color(0.12f, 0.13f, 0.15f, 0.98f)));
				val4.anchorMin = new Vector2(0.5f, 0.5f);
				val4.anchorMax = new Vector2(0.5f, 0.5f);
				val4.pivot = new Vector2(0.5f, 0.5f);
				val4.sizeDelta = new Vector2(980f, 660f);
				val4.anchoredPosition = Vector2.zero;
				RectTransform val5 = CreatePanel("Header", (Transform)(object)val4, new Color(0.15f, 0.18f, 0.22f, 1f));
				val5.anchorMin = new Vector2(0f, 1f);
				val5.anchorMax = new Vector2(1f, 1f);
				val5.pivot = new Vector2(0.5f, 1f);
				val5.sizeDelta = new Vector2(0f, 42f);
				val5.anchoredPosition = Vector2.zero;
				_canvasTitle = CreateText("Title", (Transform)(object)val5, "GOGURT", 18, (TextAnchor)4, (FontStyle)1);
				RectTransform rectTransform = ((Graphic)_canvasTitle).rectTransform;
				rectTransform.anchorMin = new Vector2(0.5f, 0.5f);
				rectTransform.anchorMax = new Vector2(0.5f, 0.5f);
				rectTransform.pivot = new Vector2(0.5f, 0.5f);
				rectTransform.sizeDelta = new Vector2(280f, 28f);
				rectTransform.anchoredPosition = Vector2.zero;
				Button val6 = CreateButton("CloseButton", (Transform)(object)val5, "X");
				((Graphic)((Selectable)val6).image).color = new Color(0.32f, 0.35f, 0.39f, 1f);
				((UnityEvent)val6.onClick).AddListener(UnityAction.op_Implicit((Action)delegate
				{
					SetMenuVisible(visible: false);
				}));
				RectTransform component = ((Component)val6).GetComponent<RectTransform>();
				component.anchorMin = new Vector2(1f, 0.5f);
				component.anchorMax = new Vector2(1f, 0.5f);
				component.pivot = new Vector2(1f, 0.5f);
				component.sizeDelta = new Vector2(34f, 24f);
				component.anchoredPosition = new Vector2(-14f, 0f);
				RectTransform val7 = CreatePanel("ResizeGrip", (Transform)(object)val4, new Color(0.4f, 0.44f, 0.5f, 0.95f));
				val7.anchorMin = new Vector2(1f, 0f);
				val7.anchorMax = new Vector2(1f, 0f);
				val7.pivot = new Vector2(1f, 0f);
				val7.sizeDelta = new Vector2(18f, 18f);
				val7.anchoredPosition = new Vector2(-6f, 6f);
				RectTransform val8 = CreatePanel("Sidebar", (Transform)(object)val4, new Color(0.1f, 0.11f, 0.13f, 1f));
				val8.anchorMin = new Vector2(0f, 0f);
				val8.anchorMax = new Vector2(0f, 1f);
				val8.pivot = new Vector2(0f, 1f);
				val8.sizeDelta = new Vector2(148f, -52f);
				val8.anchoredPosition = new Vector2(0f, -52f);
				VerticalLayoutGroup val9 = ((Component)val8).gameObject.AddComponent<VerticalLayoutGroup>();
				((LayoutGroup)val9).padding = MakeRectOffset(10, 10, 10, 10);
				((HorizontalOrVerticalLayoutGroup)val9).spacing = 8f;
				((HorizontalOrVerticalLayoutGroup)val9).childControlHeight = false;
				((HorizontalOrVerticalLayoutGroup)val9).childControlWidth = true;
				((HorizontalOrVerticalLayoutGroup)val9).childForceExpandHeight = false;
				((HorizontalOrVerticalLayoutGroup)val9).childForceExpandWidth = true;
				_pageHost = CreatePanel("PageHost", (Transform)(object)val4, new Color(0.14f, 0.15f, 0.17f, 1f));
				_pageHost.anchorMin = new Vector2(0f, 0f);
				_pageHost.anchorMax = new Vector2(1f, 1f);
				_pageHost.offsetMin = new Vector2(154f, 8f);
				_pageHost.offsetMax = new Vector2(-8f, -52f);
				CreateSidebarButton(val8, MenuTab.Player, "Player");
				CreateSidebarButton(val8, MenuTab.Combat, "Combat");
				CreateSidebarButton(val8, MenuTab.Movement, "Movement");
				CreateSidebarButton(val8, MenuTab.Currency, "Currency");
				CreateSidebarButton(val8, MenuTab.Spawn, "Spawner");
				BuildPlayerPage();
				BuildCombatPage();
				BuildMovementPage();
				BuildCurrencyPage();
				BuildSpawnPage();
				SetActiveTab(MenuTab.Player);
				_canvasRoot.SetActive(_showMenu);
			}
		}

		private void RefreshCanvasUi()
		{
			//IL_0079: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)_canvasRoot == (Object)null || !_showMenu || !_canvasRoot.activeSelf || Time.unscaledTime < _nextUiRefreshTime)
			{
				return;
			}
			_nextUiRefreshTime = Time.unscaledTime + 0.05f;
			if ((Object)(object)_canvasTitle != (Object)null)
			{
				((Graphic)_canvasTitle).color = RainbowColor(Time.unscaledTime * 1.8f);
			}
			foreach (Action uiRefresher in _uiRefreshers)
			{
				uiRefresher();
			}
		}

		private void HandleCanvasWindowInteraction()
		{
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0041: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_0084: Unknown result type (might be due to invalid IL or missing references)
			//IL_0085: Unknown result type (might be due to invalid IL or missing references)
			//IL_0091: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a7: 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_0106: 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_0110: Unknown result type (might be due to invalid IL or missing references)
			//IL_0119: Unknown result type (might be due to invalid IL or missing references)
			//IL_011e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0120: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cf: Unknown result type (might be due to invalid IL or missing references)
			//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_0141: Unknown result type (might be due to invalid IL or missing references)
			//IL_0143: Unknown result type (might be due to invalid IL or missing references)
			//IL_0148: Unknown result type (might be due to invalid IL or missing references)
			//IL_014d: Unknown result type (might be due to invalid IL or missing references)
			//IL_015f: Unknown result type (might be due to invalid IL or missing references)
			//IL_017e: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01df: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e4: Unknown result type (might be due to invalid IL or missing references)
			if (!_showMenu || (Object)(object)_windowRect == (Object)null || (Object)(object)_canvasRootRect == (Object)null)
			{
				return;
			}
			Vector2 val = Vector2.op_Implicit(Input.mousePosition);
			Vector2 val2 = default(Vector2);
			if (!RectTransformUtility.ScreenPointToLocalPointInRectangle(_canvasRootRect, val, (Camera)null, ref val2))
			{
				return;
			}
			if (Input.GetMouseButtonDown(0))
			{
				if (IsPointerInResizeGrip(val))
				{
					_resizingCanvasWindow = true;
					_draggingCanvasWindow = false;
					_canvasPointerStartLocal = val2;
					_windowStartSize = _windowRect.sizeDelta;
					_windowStartAnchoredPosition = _windowRect.anchoredPosition;
					return;
				}
				if (IsPointerInHeader(val))
				{
					_draggingCanvasWindow = true;
					_resizingCanvasWindow = false;
					_canvasPointerStartLocal = val2;
					_windowStartAnchoredPosition = _windowRect.anchoredPosition;
				}
			}
			if (Input.GetMouseButton(0))
			{
				if (_draggingCanvasWindow)
				{
					Vector2 val3 = val2 - _canvasPointerStartLocal;
					_windowRect.anchoredPosition = _windowStartAnchoredPosition + val3;
				}
				else if (_resizingCanvasWindow)
				{
					Vector2 val4 = val2 - _canvasPointerStartLocal;
					float num = Mathf.Max(860f, _windowStartSize.x + val4.x);
					float num2 = Mathf.Max(560f, _windowStartSize.y - val4.y);
					float num3 = num - _windowStartSize.x;
					float num4 = num2 - _windowStartSize.y;
					_windowRect.sizeDelta = new Vector2(num, num2);
					_windowRect.anchoredPosition = _windowStartAnchoredPosition + new Vector2(num3 * 0.5f, (0f - num4) * 0.5f);
				}
			}
			if (Input.GetMouseButtonUp(0))
			{
				_draggingCanvasWindow = false;
				_resizingCanvasWindow = false;
			}
		}

		private bool IsPointerInHeader(Vector2 screenPosition)
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_0037: Unknown result type (might be due to invalid IL or missing references)
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			Vector2 val = default(Vector2);
			if (!RectTransformUtility.RectangleContainsScreenPoint(_windowRect, screenPosition, (Camera)null) || !RectTransformUtility.ScreenPointToLocalPointInRectangle(_windowRect, screenPosition, (Camera)null, ref val))
			{
				return false;
			}
			Rect rect = _windowRect.rect;
			float num = ((Rect)(ref rect)).height * 0.5f;
			float num2 = ((Rect)(ref rect)).width * 0.5f;
			bool flag = val.y >= num - 42f;
			bool flag2 = val.x <= num2 - 60f;
			return flag && flag2;
		}

		private bool IsPointerInResizeGrip(Vector2 screenPosition)
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_0037: Unknown result type (might be due to invalid IL or missing references)
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_005a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0069: Unknown result type (might be due to invalid IL or missing references)
			Vector2 val = default(Vector2);
			if (!RectTransformUtility.RectangleContainsScreenPoint(_windowRect, screenPosition, (Camera)null) || !RectTransformUtility.ScreenPointToLocalPointInRectangle(_windowRect, screenPosition, (Camera)null, ref val))
			{
				return false;
			}
			Rect rect = _windowRect.rect;
			float num = ((Rect)(ref rect)).width * 0.5f;
			float num2 = (0f - ((Rect)(ref rect)).height) * 0.5f;
			return val.x >= num - 34f && val.y <= num2 + 34f;
		}

		private void EnsureEventSystem()
		{
			//IL_0018: Unknown result type (might be due to invalid IL or missing references)
			//IL_001e: Expected O, but got Unknown
			if (!((Object)(object)Object.FindObjectOfType<EventSystem>() != (Object)null))
			{
				GameObject val = new GameObject("GogurtEventSystem");
				Object.DontDestroyOnLoad((Object)(object)val);
				((Object)val).hideFlags = (HideFlags)61;
				val.AddComponent<EventSystem>();
				val.AddComponent<StandaloneInputModule>();
			}
		}

		private static RectOffset MakeRectOffset(int left, int right, int top, int bottom)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Expected O, but got Unknown
			RectOffset val = new RectOffset();
			val.left = left;
			val.right = right;
			val.top = top;
			val.bottom = bottom;
			return val;
		}

		private void BuildPlayerPage()
		{
			RectTransform parent = CreatePage(MenuTab.Player, "Player");
			CreatePlayerSection(parent);
			CreateRecoverySection(parent);
			CreateStatusSection(parent);
			CreatePlayerUtilitySection(parent);
		}

		private void BuildCombatPage()
		{
			RectTransform parent = CreatePage(MenuTab.Combat, "Combat");
			CreateCombatDamageSection(parent);
			CreateCombatPresetSection(parent);
			CreateCombatProjectileSection(parent);
			CreateCombatUtilitySection(parent);
		}

		private void BuildMovementPage()
		{
			RectTransform parent = CreatePage(MenuTab.Movement, "Movement");
			CreateMovementActionSection(parent);
			CreateMovementMobilitySection(parent);
		}

		private void BuildCurrencyPage()
		{
			RectTransform parent = CreatePage(MenuTab.Currency, "Currency");
			CreateCurrencyEconomySection(parent);
			CreateCurrencyPowerupSection(parent);
		}

		private void BuildSpawnPage()
		{
			RectTransform parent = CreatePage(MenuTab.Spawn, "Spawn");
			CreateSpawnSection(parent, "Items", _itemNames);
			CreateSpawnSection(parent, "Tomes", _tomeNames);
			CreateSpawnSection(parent, "Weapons", _weaponNames);
		}

		private RectTransform CreatePage(MenuTab tab, string title)
		{
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Expected O, but got Unknown
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			//IL_0051: Unknown result type (might be due to invalid IL or missing references)
			//IL_0076: 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_00bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_010d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0114: Expected O, but got Unknown
			//IL_0138: Unknown result type (might be due to invalid IL or missing references)
			//IL_014f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0166: Unknown result type (might be due to invalid IL or missing references)
			//IL_017d: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_0222: Unknown result type (might be due to invalid IL or missing references)
			//IL_0229: Expected O, but got Unknown
			//IL_024e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0265: Unknown result type (might be due to invalid IL or missing references)
			//IL_027c: 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_02aa: Unknown result type (might be due to invalid IL or missing references)
			GameObject val = new GameObject(title + "Page");
			val.transform.SetParent((Transform)(object)_pageHost, false);
			RectTransform val2 = val.AddComponent<RectTransform>();
			val2.anchorMin = Vector2.zero;
			val2.anchorMax = Vector2.one;
			val2.offsetMin = Vector2.zero;
			val2.offsetMax = Vector2.zero;
			((Graphic)val.AddComponent<Image>()).color = new Color(0.15f, 0.16f, 0.18f, 1f);
			Text val3 = CreateText("PageTitle", (Transform)(object)val2, title, 18, (TextAnchor)3, (FontStyle)1);
			RectTransform rectTransform = ((Graphic)val3).rectTransform;
			rectTransform.anchorMin = new Vector2(0f, 1f);
			rectTransform.anchorMax = new Vector2(1f, 1f);
			rectTransform.pivot = new Vector2(0f, 1f);
			rectTransform.sizeDelta = new Vector2(0f, 28f);
			rectTransform.anchoredPosition = new Vector2(18f, -12f);
			GameObject val4 = new GameObject("Scroll");
			val4.transform.SetParent((Transform)(object)val2, false);
			RectTransform val5 = val4.AddComponent<RectTransform>();
			val5.anchorMin = new Vector2(0f, 0f);
			val5.anchorMax = new Vector2(1f, 1f);
			val5.offsetMin = new Vector2(12f, 12f);
			val5.offsetMax = new Vector2(-12f, -48f);
			((Graphic)val4.AddComponent<Image>()).color = new Color(0.11f, 0.12f, 0.14f, 1f);
			RectTransform val6 = CreatePanel("Viewport", (Transform)(object)val5, new Color(0.11f, 0.12f, 0.14f, 1f));
			val6.anchorMin = Vector2.zero;
			val6.anchorMax = Vector2.one;
			val6.offsetMin = Vector2.zero;
			val6.offsetMax = Vector2.zero;
			((Component)val6).gameObject.AddComponent<Mask>().showMaskGraphic = false;
			GameObject val7 = new GameObject("Content");
			val7.transform.SetParent((Transform)(object)val6, false);
			RectTransform val8 = val7.AddComponent<RectTransform>();
			val8.anchorMin = new Vector2(0f, 1f);
			val8.anchorMax = new Vector2(1f, 1f);
			val8.pivot = new Vector2(0.5f, 1f);
			val8.offsetMin = new Vector2(0f, 0f);
			val8.offsetMax = new Vector2(0f, 0f);
			VerticalLayoutGroup val9 = val7.AddComponent<VerticalLayoutGroup>();
			((LayoutGroup)val9).padding = MakeRectOffset(6, 10, 6, 10);
			((HorizontalOrVerticalLayoutGroup)val9).spacing = 10f;
			((HorizontalOrVerticalLayoutGroup)val9).childControlHeight = true;
			((HorizontalOrVerticalLayoutGroup)val9).childControlWidth = true;
			((HorizontalOrVerticalLayoutGroup)val9).childForceExpandHeight = false;
			((HorizontalOrVerticalLayoutGroup)val9).childForceExpandWidth = true;
			val7.AddComponent<ContentSizeFitter>().verticalFit = (FitMode)2;
			ScrollRect val10 = val4.AddComponent<ScrollRect>();
			val10.content = val8;
			val10.viewport = val6;
			val10.horizontal = false;
			val10.vertical = true;
			val10.scrollSensitivity = 22f;
			val10.verticalScrollbar = CreateVerticalScrollbar((Transform)(object)val5);
			val10.verticalScrollbarVisibility = (ScrollbarVisibility)2;
			val10.verticalScrollbarSpacing = 4f;
			_tabPages[tab] = val;
			return val8;
		}

		private void CreateSidebarButton(RectTransform parent, MenuTab tab, string label)
		{
			Button val = CreateButton($"{tab}Button", (Transform)(object)parent, label);
			LayoutElement val2 = ((Component)val).gameObject.AddComponent<LayoutElement>();
			val2.preferredHeight = 42f;
			_tabButtonBackgrounds[tab] = ((Selectable)val).image;
			((UnityEvent)val.onClick).AddListener(UnityAction.op_Implicit((Action)delegate
			{
				SetActiveTab(tab);
			}));
			_uiRefreshers.Add(delegate
			{
				//IL_0061: Unknown result type (might be due to invalid IL or missing references)
				//IL_0046: Unknown result type (might be due to invalid IL or missing references)
				if (_tabButtonBackgrounds.TryGetValue(tab, out var value))
				{
					((Graphic)value).color = ((_activeTab == tab) ? new Color(0.24f, 0.47f, 0.63f, 1f) : new Color(0.2f, 0.21f, 0.24f, 1f));
				}
			});
		}

		private void SetActiveTab(MenuTab tab)
		{
			_activeTab = tab;
			foreach (KeyValuePair<MenuTab, GameObject> tabPage in _tabPages)
			{
				tabPage.Value.SetActive(tabPage.Key == tab);
			}
		}

		private RectTransform CreateSection(RectTransform parent, string title, float preferredHeight)
		{
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
			RectTransform val = CreatePanel(title + "Section", (Transform)(object)parent, new Color(0.18f, 0.19f, 0.22f, 1f));
			LayoutElement val2 = ((Component)val).gameObject.AddComponent<LayoutElement>();
			val2.preferredHeight = preferredHeight;
			VerticalLayoutGroup val3 = ((Component)val).gameObject.AddComponent<VerticalLayoutGroup>();
			((LayoutGroup)val3).padding = MakeRectOffset(12, 12, 12, 12);
			((HorizontalOrVerticalLayoutGroup)val3).spacing = 8f;
			((HorizontalOrVerticalLayoutGroup)val3).childControlHeight = true;
			((HorizontalOrVerticalLayoutGroup)val3).childControlWidth = true;
			((HorizontalOrVerticalLayoutGroup)val3).childForceExpandHeight = false;
			((HorizontalOrVerticalLayoutGroup)val3).childForceExpandWidth = true;
			Text val4 = CreateText("SectionTitle", (Transform)(object)val, title, 16, (TextAnchor)3, (FontStyle)1);
			((Graphic)val4).color = new Color(0.9f, 0.93f, 0.97f, 1f);
			return val;
		}

		private void CreatePlayerSection(RectTransform parent)
		{
			RectTransform parent2 = CreateSection(parent, "Defense", 260f);
			CreateBoundSlider(parent2, "Armor", 0f, 100f, () => _armorBonus, delegate(float v)
			{
				_armorBonus = v;
			}, "0.0");
			CreateBoundSlider(parent2, "Evasion", 0f, 100f, () => _evasionBonus, delegate(float v)
			{
				_evasionBonus = v;
			}, "0.0");
			CreateBoundSlider(parent2, "Shield", 0f, 300f, () => _shieldBonus, delegate(float v)
			{
				_shieldBonus = v;
			}, "0");
			CreateBoundSlider(parent2, "Thorns", 0f, 200f, () => _thornsBonus, delegate(float v)
			{
				_thornsBonus = v;
			}, "0");
		}

		private void CreateRecoverySection(RectTransform parent)
		{
			RectTransform parent2 = CreateSection(parent, "Recovery", 340f);
			CreateActionButton(parent2, "Full Heal", delegate
			{
				_requestHeal = true;
			});
			CreateToggleButton(parent2, () => _godMode ? "God Mode: ON" : "God Mode: OFF", delegate
			{
				_godMode = !_godMode;
				PushStatus(_godMode ? "True god mode enabled" : "God mode disabled");
			});
			CreateBoundSlider(parent2, "Health Regen", 0f, 25f, () => _healthRegenBonus, delegate(float v)
			{
				_healthRegenBonus = v;
			}, "0.0");
			CreateBoundSlider(parent2, "Max Health", 0f, 500f, () => _maxHealthBonus, delegate(float v)
			{
				_maxHealthBonus = v;
			}, "0");
			CreateBoundSlider(parent2, "Overheal", 0f, 300f, () => _overhealBonus, delegate(float v)
			{
				_overhealBonus = v;
			}, "0");
		}

		private void CreateStatusSection(RectTransform parent)
		{
			RectTransform parent2 = CreateSection(parent, "Status", 170f);
			_statusPrimaryText = CreateText("Status1", (Transform)(object)parent2, string.Empty, 14, (TextAnchor)3, (FontStyle)0);
			_statusSecondaryText = CreateText("Status2", (Transform)(object)parent2, string.Empty, 14, (TextAnchor)3, (FontStyle)0);
			_statusTertiaryText = CreateText("Status3", (Transform)(object)parent2, string.Empty, 14, (TextAnchor)3, (FontStyle)0);
			Text status4 = CreateText("Status4", (Transform)(object)parent2, string.Empty, 14, (TextAnchor)3, (FontStyle)0);
			Text status5 = CreateText("Status5", (Transform)(object)parent2, string.Empty, 14, (TextAnchor)3, (FontStyle)0);
			_uiRefreshers.Add(delegate
			{
				if ((Object)(object)_statusPrimaryText != (Object)null)
				{
					_statusPrimaryText.text = "God Mode: " + (_godMode ? "ACTIVE" : "OFF");
				}
				if ((Object)(object)_statusSecondaryText != (Object)null)
				{
					_statusSecondaryText.text = $"HP: {_cachedHp}/{_cachedMaxHp}    Shield: {_cachedShield:0}/{_cachedMaxShield:0}";
				}
				if ((Object)(object)_statusTertiaryText != (Object)null)
				{
					_statusTertiaryText.text = $"Level: {_cachedLevel}    XP: {_cachedXp}";
				}
				if ((Object)(object)status4 != (Object)null)
				{
					status4.text = $"Pos: {_cachedPosition.x:0.0}, {_cachedPosition.y:0.0}, {_cachedPosition.z:0.0}";
				}
				if ((Object)(object)status5 != (Object)null)
				{
					status5.text = ((Time.time < _statusUntil) ? ("Notice: " + _statusText) : "Notice: Ready");
				}
			});
		}

		private void CreatePlayerUtilitySection(RectTransform parent)
		{
			RectTransform parent2 = CreateSection(parent, "Utilities", 80f);
			CreateActionButton(parent2, "Reset Player Modifiers", delegate
			{
				_godMode = false;
				_armorBonus = 0f;
				_evasionBonus = 0f;
				_shieldBonus = 0f;
				_thornsBonus = 0f;
				_healthRegenBonus = 0f;
				_maxHealthBonus = 0f;
				_overhealBonus = 0f;
				PushStatus("Player modifiers reset");
			});
		}

		private void CreateCombatDamageSection(RectTransform parent)
		{
			RectTransform parent2 = CreateSection(parent, "Damage", 340f);
			CreateBoundSlider(parent2, "Attack Speed", 1f, 5f, () => _attackSpeedMultiplier, delegate(float v)
			{
				_attackSpeedMultiplier = v;
			}, "0.00x");
			CreateBoundSlider(parent2, "Crit Chance", 0f, 1f, () => _critChanceBonus, delegate(float v)
			{
				_critChanceBonus = v;
			}, "0.00");
			CreateBoundSlider(parent2, "Crit Damage", 0f, 5f, () => _critDamageBonus, delegate(float v)
			{
				_critDamageBonus = v;
			}, "0.00");
			CreateBoundSlider(parent2, "Damage Multiplier", 1f, 10f, () => _damageMultiplier, delegate(float v)
			{
				_damageMultiplier = v;
			}, "0.00x");
			CreateBoundSlider(parent2, "Damage To Elites", 0.25f, 10f, () => _damageToElitesMultiplier, delegate(float v)
			{
				_damageToElitesMultiplier = v;
			}, "0.00x");
			CreateBoundSlider(parent2, "Lifesteal", 0f, 5f, () => _lifestealBonus, delegate(float v)
			{
				_lifestealBonus = v;
			}, "0.00");
		}

		private void CreateCombatPresetSection(RectTransform parent)
		{
			RectTransform parent2 = CreateSection(parent, "Presets", 120f);
			CreateActionButton(parent2, "Boss Melt", delegate
			{
				_damageMultiplier = 8f;
				_attackSpeedMultiplier = 4f;
				_critChanceBonus = 1f;
			});
			CreateActionButton(parent2, "2x Damage", delegate
			{
				_damageMultiplier = 2f;
				_attackSpeedMultiplier = 1.5f;
				_projectileBonus = Mathf.Max(_projectileBonus, 1f);
			});
		}

		private void CreateCombatProjectileSection(RectTransform parent)
		{
			RectTransform parent2 = CreateSection(parent, "Projectiles", 340f);
			CreateBoundSlider(parent2, "Duration", 0.25f, 5f, () => _durationMultiplier, delegate(float v)
			{
				_durationMultiplier = v;
			}, "0.00x");
			CreateBoundSlider(parent2, "Extra Projectiles", 0f, 10f, () => _projectileBonus, delegate(float v)
			{
				_projectileBonus = v;
			}, "0");
			CreateBoundSlider(parent2, "Knockback", 0.25f, 5f, () => _knockbackMultiplier, delegate(float v)
			{
				_knockbackMultiplier = v;
			}, "0.00x");
			CreateBoundSlider(parent2, "Projectile Bounces", 0f, 20f, () => _projectileBounceBonus, delegate(float v)
			{
				_projectileBounceBonus = v;
			}, "0");
			CreateBoundSlider(parent2, "Projectile Speed", 0.25f, 5f, () => _projectileSpeedMultiplier, delegate(float v)
			{
				_projectileSpeedMultiplier = v;
			}, "0.00x");
			CreateBoundSlider(parent2, "Size", 0.25f, 5f, () => _sizeMultiplier, delegate(float v)
			{
				_sizeMultiplier = v;
			}, "0.00x");
		}

		private void CreateCombatUtilitySection(RectTransform parent)
		{
			RectTransform parent2 = CreateSection(parent, "Utilities", 80f);
			CreateActionButton(parent2, "Reset Combat Modifiers", delegate
			{
				_attackSpeedMultiplier = 1f;
				_critChanceBonus = 0f;
				_critDamageBonus = 0f;
				_damageMultiplier = 1f;
				_damageToElitesMultiplier = 1f;
				_durationMultiplier = 1f;
				_knockbackMultiplier = 1f;
				_lifestealBonus = 0f;
				_projectileBonus = 0f;
				_projectileBounceBonus = 0f;
				_projectileSpeedMultiplier = 1f;
				_sizeMultiplier = 1f;
				PushStatus("Combat modifiers reset");
			});
		}

		private void CreateMovementActionSection(RectTransform parent)
		{
			RectTransform parent2 = CreateSection(parent, "Actions", 220f);
			CreateBoundSlider(parent2, "FOV", 50f, 130f, () => _targetFov, delegate(float v)
			{
				_targetFov = Mathf.RoundToInt(v);
			}, "0");
			CreateActionButton(parent2, "Save Position", delegate
			{
				//IL_0003: Unknown result type (might be due to invalid IL or missing references)
				//IL_0008: Unknown result type (might be due to invalid IL or missing references)
				_savedPosition = _cachedPosition;
				_savedPositionValid = true;
			});
			CreateActionButton(parent2, "Teleport Saved", delegate
			{
				if (_savedPositionValid)
				{
					_requestTeleport = true;
				}
			});
			CreateActionButton(parent2, "Reset Movement Defaults", delegate
			{
				_noclip = false;
				_infiniteJump = false;
				_speedMultiplier = 1f;
				_jumpHeightMultiplier = 1f;
				_extraJumpsBonus = 0f;
				_targetFov = Mathf.RoundToInt(_defaultFov);
			});
		}

		private void CreateMovementMobilitySection(RectTransform parent)
		{
			RectTransform parent2 = CreateSection(parent, "Mobility", 270f);
			CreateBoundSlider(parent2, "Extra Jumps", 0f, 20f, () => _extraJumpsBonus, delegate(float v)
			{
				_extraJumpsBonus = v;
			}, "0");
			CreateToggleButton(parent2, () => _infiniteJump ? "Infinite Jump: ON" : "Infinite Jump: OFF", delegate
			{
				_infiniteJump = !_infiniteJump;
			});
			CreateBoundSlider(parent2, "Jump Height", 1f, 4f, () => _jumpHeightMultiplier, delegate(float v)
			{
				_jumpHeightMultiplier = v;
			}, "0.00x");
			CreateBoundSlider(parent2, "Move Speed", 0.5f, 5f, () => _speedMultiplier, delegate(float v)
			{
				_speedMultiplier = v;
			}, "0.00x");
			CreateToggleButton(parent2, () => _noclip ? "Noclip: ON" : "Noclip: OFF", delegate
			{
				_noclip = !_noclip;
			});
		}

		private void CreateCurrencyEconomySection(RectTransform parent)
		{
			RectTransform parent2 = CreateSection(parent, "Economy", 650f);
			CreateBoundSlider(parent2, "Gold Multiplier", 1f, 10f, () => _goldMultiplier, delegate(float v)
			{
				_goldMultiplier = v;
			}, "0.00x");
			CreateBoundSlider(parent2, "Luck", 0f, 10f, () => _luckBonus, delegate(float v)
			{
				_luckBonus = v;
			}, "0.0");
			CreateBoundSlider(parent2, "Pickup Range", 0f, 50f, () => _pickupRangeBonus, delegate(float v)
			{
				_pickupRangeBonus = v;
			}, "0.0");
			CreateBoundSlider(parent2, "Shop Discount", 0f, 1f, () => _shopDiscountBonus, delegate(float v)
			{
				_shopDiscountBonus = v;
			}, "0.00");
			CreateBoundSlider(parent2, "Silver Multiplier", 1f, 10f, () => _silverMultiplier, delegate(float v)
			{
				_silverMultiplier = v;
			}, "0.00x");
			CreateBoundSlider(parent2, "XP Multiplier", 1f, 10f, () => _xpMultiplier, delegate(float v)
			{
				_xpMultiplier = v;
			}, "0.00x");
			CreateBoundSlider(parent2, "Gold Add Amount", 1f, 10000f, () => _goldAddAmount, delegate(float v)
			{
				_goldAddAmount = Mathf.RoundToInt(v);
			}, "0");
			CreateActionButton(parent2, () => $"Add {_goldAddAmount} Gold", delegate
			{
				_requestGold = true;
			});
			CreateBoundSlider(parent2, "Silver Add Amount", 1f, 10000f, () => _silverAddAmount, delegate(float v)
			{
				_silverAddAmount = Mathf.RoundToInt(v);
			}, "0");
			CreateActionButton(parent2, () => $"Add {_silverAddAmount} Silver", delegate
			{
				_requestSilver = true;
			});
			CreateBoundSlider(parent2, "XP Add Amount", 1f, 10000f, () => _xpAddAmount, delegate(float v)
			{
				_xpAddAmount = Mathf.RoundToInt(v);
			}, "0");
			CreateActionButton(parent2, () => $"Add {_xpAddAmount} XP", delegate
			{
				_requestXp = true;
			});
			CreateActionButton(parent2, "Reset Economy", delegate
			{
				_goldMultiplier = 1f;
				_xpMultiplier = 1f;
				_silverMultiplier = 1f;
				_luckBonus = 0f;
				_shopDiscountBonus = 0f;
				_pickupRangeBonus = 0f;
				_goldAddAmount = 1000;
				_silverAddAmount = 1000;
				_xpAddAmount = 1000;
				PushStatus("Economy modifiers reset");
			});
		}

		private void CreateCurrencyPowerupSection(RectTransform parent)
		{
			RectTransform parent2 = CreateSection(parent, "Powerups", 190f);
			CreateBoundSlider(parent2, "Elite Spawn", 0f, 5f, () => _eliteSpawnMultiplier, delegate(float v)
			{
				_eliteSpawnMultiplier = v;
			}, "0.00x");
			CreateBoundSlider(parent2, "Powerup Drop Chance", 0f, 5f, () => _powerupDropChanceMultiplier, delegate(float v)
			{
				_powerupDropChanceMultiplier = v;
			}, "0.00x");
			CreateBoundSlider(parent2, "Powerup Multiplier", 0f, 5f, () => _powerupMultiplier, delegate(float v)
			{
				_powerupMultiplier = v;
			}, "0.00x");
		}

		private void CreateSpawnSection(RectTransform parent, string title, string[] names)
		{
			//IL_0077: 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_00e7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0109: Unknown result type (might be due to invalid IL or missing references)
			//IL_011f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0141: Unknown result type (might be due to invalid IL or missing references)
			//IL_0148: Expected O, but got Unknown
			//IL_016c: 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_019a: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c8: Unknown result type (might be due to invalid IL or missing references)
			RectTransform parent2 = CreateSection(parent, title, 380f);
			if (title == "Items")
			{
				CreateBoundSlider(parent2, "Amount", 1f, 20f, () => _itemAddAmount, delegate(float v)
				{
					_itemAddAmount = Mathf.RoundToInt(v);
				}, "0");
			}
			RectTransform val = CreatePanel(title + "ListHolder", (Transform)(object)parent2, new Color(0.12f, 0.13f, 0.15f, 1f));
			((Component)val).gameObject.AddComponent<LayoutElement>().preferredHeight = 220f;
			ScrollRect val2 = ((Component)val).gameObject.AddComponent<ScrollRect>();
			val2.horizontal = false;
			val2.vertical = true;
			val2.scrollSensitivity = 20f;
			RectTransform val3 = CreatePanel("Viewport", (Transform)(object)val, new Color(0.12f, 0.13f, 0.15f, 1f));
			val3.anchorMin = Vector2.zero;
			val3.anchorMax = Vector2.one;
			val3.offsetMin = new Vector2(0f, 0f);
			val3.offsetMax = new Vector2(0f, 0f);
			((Component)val3).gameObject.AddComponent<Mask>().showMaskGraphic = false;
			GameObject val4 = new GameObject("Content");
			val4.transform.SetParent((Transform)(object)val3, false);
			RectTransform val5 = val4.AddComponent<RectTransform>();
			val5.anchorMin = new Vector2(0f, 1f);
			val5.anchorMax = new Vector2(1f, 1f);
			val5.pivot = new Vector2(0.5f, 1f);
			val5.offsetMin = new Vector2(0f, 0f);
			val5.offsetMax = new Vector2(0f, 0f);
			VerticalLayoutGroup val6 = val4.AddComponent<VerticalLayoutGroup>();
			((LayoutGroup)val6).padding = MakeRectOffset(6, 6, 6, 6);
			((HorizontalOrVerticalLayoutGroup)val6).spacing = 6f;
			((HorizontalOrVerticalLayoutGroup)val6).childControlHeight = true;
			((HorizontalOrVerticalLayoutGroup)val6).childControlWidth = true;
			((HorizontalOrVerticalLayoutGroup)val6).childForceExpandHeight = false;
			((HorizontalOrVerticalLayoutGroup)val6).childForceExpandWidth = true;
			val4.AddComponent<ContentSizeFitter>().verticalFit = (FitMode)2;
			val2.viewport = val3;
			val2.content = val5;
			val2.verticalScrollbar = CreateVerticalScrollbar((Transform)(object)val);
			val2.verticalScrollbarVisibility = (ScrollbarVisibility)2;
			val2.verticalScrollbarSpacing = 4f;
			foreach (string name in names)
			{
				CreateSpawnEntry(val5, title, name);
			}
		}

		private void CreateSpawnEntry(RectTransform parent, string sectionTitle, string name)
		{
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Expected O, but got Unknown
			GameObject val = new GameObject(name + "Row");
			val.transform.SetParent((Transform)(object)parent, false);
			RectTransform parent2 = val.AddComponent<RectTransform>();
			LayoutElement val2 = val.AddComponent<LayoutElement>();
			val2.preferredHeight = 34f;
			HorizontalLayoutGroup val3 = val.AddComponent<HorizontalLayoutGroup>();
			((HorizontalOrVerticalLayoutGroup)val3).spacing = 8f;
			((HorizontalOrVerticalLayoutGroup)val3).childControlHeight = true;
			((HorizontalOrVerticalLayoutGroup)val3).childControlWidth = true;
			((HorizontalOrVerticalLayoutGroup)val3).childForceExpandHeight = true;
			((HorizontalOrVerticalLayoutGroup)val3).childForceExpandWidth = false;
			Text val4 = CreateText("Label", (Transform)(object)parent2, name, 14, (TextAnchor)3, (FontStyle)0);
			LayoutElement val5 = ((Component)val4).gameObject.AddComponent<LayoutElement>();
			val5.preferredWidth = 420f;
			val5.flexibleWidth = 1f;
			Button val6 = CreateButton("SpawnButton", (Transform)(object)parent2, "SPAWN");
			LayoutElement val7 = ((Component)val6).gameObject.AddComponent<LayoutElement>();
			val7.preferredWidth = 100f;
			((UnityEvent)val6.onClick).AddListener(UnityAction.op_Implicit((Action)delegate
			{
				//IL_003f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0063: Unknown result type (might be due to invalid IL or missing references)
				//IL_007c: Unknown result type (might be due to invalid IL or missing references)
				switch (sectionTitle)
				{
				case "Items":
					SpawnItem(Enum.Parse<EItem>(name), _itemAddAmount);
					break;
				case "Tomes":
					SpawnTome(Enum.Parse<ETome>(name));
					break;
				case "Weapons":
					SpawnWeapon(Enum.Parse<EWeapon>(name));
					break;
				}
			}));
		}

		private void CreateBoundSlider(RectTransform parent, string label, float min, float max, Func<float> getter, Action<float> setter, string format)
		{
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_0028: Expected O, but got Unknown
			//IL_009b: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a2: Expected O, but got Unknown
			GameObject val = new GameObject(label + "SliderRow");
			val.transform.SetParent((Transform)(object)parent, false);
			RectTransform val2 = val.AddComponent<RectTransform>();
			LayoutElement val3 = val.AddComponent<LayoutElement>();
			val3.preferredHeight = 50f;
			VerticalLayoutGroup val4 = val.AddComponent<VerticalLayoutGroup>();
			((HorizontalOrVerticalLayoutGroup)val4).spacing = 4f;
			((HorizontalOrVerticalLayoutGroup)val4).childControlWidth = true;
			((HorizontalOrVerticalLayoutGroup)val4).childControlHeight = true;
			((HorizontalOrVerticalLayoutGroup)val4).childForceExpandHeight = false;
			((HorizontalOrVerticalLayoutGroup)val4).childForceExpandWidth = true;
			val.AddComponent<ContentSizeFitter>().verticalFit = (FitMode)2;
			GameObject val5 = new GameObject("Header");
			val5.transform.SetParent((Transform)(object)val2, false);
			RectTransform parent2 = val5.AddComponent<RectTransform>();
			HorizontalLayoutGroup val6 = val5.AddComponent<HorizontalLayoutGroup>();
			((HorizontalOrVerticalLayoutGroup)val6).childControlWidth = true;
			((HorizontalOrVerticalLayoutGroup)val6).childControlHeight = true;
			((HorizontalOrVerticalLayoutGroup)val6).childForceExpandWidth = true;
			((HorizontalOrVerticalLayoutGroup)val6).childForceExpandHeight = false;
			((HorizontalOrVerticalLayoutGroup)val6).spacing = 8f;
			val5.AddComponent<LayoutElement>().preferredHeight = 20f;
			Text val7 = CreateText("Name", (Transform)(object)parent2, label, 14, (TextAnchor)3, (FontStyle)0);
			LayoutElement val8 = ((Component)val7).gameObject.AddComponent<LayoutElement>();
			val8.preferredWidth = 260f;
			val8.flexibleWidth = 1f;
			Text valueText = CreateText("Value", (Transform)(object)parent2, string.Empty, 14, (TextAnchor)5, (FontStyle)0);
			LayoutElement val9 = ((Component)valueText).gameObject.AddComponent<LayoutElement>();
			val9.preferredWidth = 120f;
			Slider val10 = CreateSlider((Transform)(object)val2, min, max, getter());
			((UnityEvent<float>)(object)val10.onValueChanged).AddListener(UnityAction<float>.op_Implicit(setter));
			_uiRefreshers.Add(delegate
			{
				if ((Object)(object)valueText != (Object)null)
				{
					valueText.text = getter().ToString(format);
				}
			});
		}

		private void CreateToggleButton(RectTransform parent, Func<string> labelGetter, Action onClick)
		{
			Button button = CreateButton("ToggleButton", (Transform)(object)parent, labelGetter());
			LayoutElement val = ((Component)button).gameObject.AddComponent<LayoutElement>();
			val.preferredHeight = 32f;
			((UnityEvent)button.onClick).AddListener(UnityAction.op_Implicit(onClick));
			_uiRefreshers.Add(delegate
			{
				Text componentInChildren = ((Component)button).GetComponentInChildren<Text>();
				if ((Object)(object)componentInChildren != (Object)null)
				{
					componentInChildren.text = labelGetter();
				}
			});
		}

		private void CreateActionButton(RectTransform parent, string label, Action onClick)
		{
			CreateActionButton(parent, () => label, onClick);
		}

		private void CreateActionButton(RectTransform parent, Func<string> labelGetter, Action onClick)
		{
			Button button = CreateButton("ActionButton", (Transform)(object)parent, labelGetter());
			LayoutElement val = ((Component)button).gameObject.AddComponent<LayoutElement>();
			val.preferredHeight = 32f;
			((UnityEvent)button.onClick).AddListener(UnityAction.op_Implicit(onClick));
			_uiRefreshers.Add(delegate
			{
				Text componentInChildren = ((Component)button).GetComponentInChildren<Text>();
				if ((Object)(object)componentInChildren != (Object)null)
				{
					componentInChildren.text = labelGetter();
				}
			});
		}

		private RectTransform CreatePanel(string name, Transform parent, Color color)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			GameObject val = new GameObject(name);
			val.transform.SetParent(parent, false);
			RectTransform result = val.AddComponent<RectTransform>();
			Image val2 = val.AddComponent<Image>();
			((Graphic)val2).color = color;
			return result;
		}

		private Text CreateText(string name, Transform parent, string text, int fontSize, TextAnchor alignment, FontStyle style)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_005d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0066: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			GameObject val = new GameObject(name);
			val.transform.SetParent(parent, false);
			RectTransform val2 = val.AddComponent<RectTransform>();
			val2.sizeDelta = new Vector2(0f, (float)fontSize + 8f);
			Text val3 = val.AddComponent<Text>();
			val3.font = _uiFont;
			val3.text = text;
			val3.fontSize = fontSize;
			val3.alignment = alignment;
			val3.fontStyle = style;
			((Graphic)val3).color = new Color(0.88f, 0.9f, 0.93f, 1f);
			val3.horizontalOverflow = (HorizontalWrapMode)1;
			val3.verticalOverflow = (VerticalWrapMode)0;
			return val3;
		}

		private Button CreateButton(string name, Transform parent, string label)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			//IL_004f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_0095: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b9: Unknown result type (might be due to invalid IL or missing references)
			GameObject val = new GameObject(name);
			val.transform.SetParent(parent, false);
			RectTransform val2 = val.AddComponent<RectTransform>();
			val2.sizeDelta = new Vector2(0f, 30f);
			Image val3 = val.AddComponent<Image>();
			((Graphic)val3).color = new Color(0.21f, 0.22f, 0.25f, 1f);
			Button val4 = val.AddComponent<Button>();
			((Selectable)val4).targetGraphic = (Graphic)(object)val3;
			Text val5 = CreateText("Label", (Transform)(object)val2, label, 14, (TextAnchor)4, (FontStyle)0);
			((Graphic)val5).rectTransform.anchorMin = Vector2.zero;
			((Graphic)val5).rectTransform.anchorMax = Vector2.one;
			((Graphic)val5).rectTransform.offsetMin = Vector2.zero;
			((Graphic)val5).rectTransform.offsetMax = Vector2.zero;
			return val4;
		}

		private Slider CreateSlider(Transform parent, float min, float max, float value)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Expected O, but got Unknown
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0085: Unknown result type (might be due to invalid IL or missing references)
			//IL_009d: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_0106: Expected O, but got Unknown
			//IL_012a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0141: Unknown result type (might be due to invalid IL or missing references)
			//IL_0158: Unknown result type (might be due to invalid IL or missing references)
			//IL_016f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0186: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0200: Unknown result type (might be due to invalid IL or missing references)
			//IL_020d: Unknown result type (might be due to invalid IL or missing references)
			//IL_021d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0224: Expected O, but got Unknown
			//IL_0248: Unknown result type (might be due to invalid IL or missing references)
			//IL_025f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0276: Unknown result type (might be due to invalid IL or missing references)
			//IL_028d: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_02cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_02fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_0311: Unknown result type (might be due to invalid IL or missing references)
			//IL_0328: Unknown result type (might be due to invalid IL or missing references)
			GameObject val = new GameObject("Slider");
			val.transform.SetParent(parent, false);
			RectTransform val2 = val.AddComponent<RectTransform>();
			val2.sizeDelta = new Vector2(0f, 1.5f);
			LayoutElement val3 = val.AddComponent<LayoutElement>();
			val3.preferredHeight = 1.5f;
			Slider val4 = val.AddComponent<Slider>();
			val4.minValue = min;
			val4.maxValue = max;
			val4.value = value;
			RectTransform val5 = CreatePanel("Background", (Transform)(object)val2, new Color(0.08f, 0.09f, 0.11f, 1f));
			val5.anchorMin = new Vector2(0f, 0.5f);
			val5.anchorMax = new Vector2(1f, 0.5f);
			val5.pivot = new Vector2(0.5f, 0.5f);
			val5.sizeDelta = new Vector2(0f, 4f);
			val5.anchoredPosition = Vector2.zero;
			GameObject val6 = new GameObject("FillArea");
			val6.transform.SetParent((Transform)(object)val2, false);
			RectTransform val7 = val6.AddComponent<RectTransform>();
			val7.anchorMin = new Vector2(0f, 0.5f);
			val7.anchorMax = new Vector2(1f, 0.5f);
			val7.pivot = new Vector2(0.5f, 0.5f);
			val7.offsetMin = new Vector2(0f, -2f);
			val7.offsetMax = new Vector2(0f, 2f);
			RectTransform val8 = CreatePanel("Fill", (Transform)(object)val7, new Color(0.24f, 0.47f, 0.63f, 1f));
			val8.anchorMin = new Vector2(0f, 0f);
			val8.anchorMax = new Vector2(1f, 1f);
			val8.pivot = new Vector2(0f, 0.5f);
			val8.offsetMin = Vector2.zero;
			val8.offsetMax = Vector2.zero;
			GameObject val9 = new GameObject("HandleSlideArea");
			val9.transform.SetParent((Transform)(object)val2, false);
			RectTransform val10 = val9.AddComponent<RectTransform>();
			val10.anchorMin = new Vector2(0f, 0f);
			val10.anchorMax = new Vector2(1f, 1f);
			val10.pivot = new Vector2(0.5f, 0.5f);
			val10.offsetMin = new Vector2(0f, 0f);
			val10.offsetMax = new Vector2(0f, 0f);
			RectTransform val11 = CreatePanel("Handle", (Transform)(object)val10, new Color(0.86f, 0.9f, 0.95f, 1f));
			val11.anchorMin = new Vector2(0.5f, 0.5f);
			val11.anchorMax = new Vector2(0.5f, 0.5f);
			val11.pivot = new Vector2(0.5f, 0.5f);
			val11.sizeDelta = new Vector2(8f, 20f);
			val4.fillRect = val8;
			val4.handleRect = val11;
			((Selectable)val4).targetGraphic = (Graphic)(object)((Component)val11).GetComponent<Image>();
			val4.direction = (Direction)0;
			return val4;
		}

		private Scrollbar CreateVerticalScrollbar(Transform parent)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Expected O, but got Unknown
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0042: Unknown result type (might be due to invalid IL or missing references)
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_006e: Unknown result type (might be due to invalid IL or missing references)
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b7: Expected O, but got Unknown
			//IL_00cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_00dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_010a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0131: Unknown result type (might be due to invalid IL or missing references)
			//IL_0149: Unknown result type (might be due to invalid IL or missing references)
			//IL_0160: Unknown result type (might be due to invalid IL or missing references)
			//IL_0177: Unknown result type (might be due to invalid IL or missing references)
			//IL_018e: Unknown result type (might be due to invalid IL or missing references)
			GameObject val = new GameObject("Scrollbar");
			val.transform.SetParent(parent, false);
			RectTransform val2 = val.AddComponent<RectTransform>();
			val2.anchorMin = new Vector2(1f, 0f);
			val2.anchorMax = new Vector2(1f, 1f);
			val2.pivot = new Vector2(1f, 1f);
			val2.sizeDelta = new Vector2(10f, 0f);
			val2.anchoredPosition = Vector2.zero;
			Image val3 = val.AddComponent<Image>();
			((Graphic)val3).color = new Color(0.1f, 0.11f, 0.13f, 0.9f);
			GameObject val4 = new GameObject("SlidingArea");
			val4.transform.SetParent((Transform)(object)val2, false);
			RectTransform val5 = val4.AddComponent<RectTransform>();
			val5.anchorMin = Vector2.zero;
			val5.anchorMax = Vector2.one;
			val5.offsetMin = new Vector2(1f, 1f);
			val5.offsetMax = new Vector2(-1f, -1f);
			RectTransform val6 = CreatePanel("Handle", (Transform)(object)val5, new Color(0.76f, 0.8f, 0.86f, 1f));
			val6.anchorMin = new Vector2(0f, 1f);
			val6.anchorMax = new Vector2(1f, 1f);
			val6.pivot = new Vector2(0.5f, 1f);
			val6.sizeDelta = new Vector2(0f, 36f);
			Scrollbar val7 = val.AddComponent<Scrollbar>();
			val7.direction = (Direction)2;
			((Selectable)val7).targetGraphic = (Graphic)(object)((Component)val6).GetComponent<Image>();
			val7.handleRect = val6;
			return val7;
		}

		private void DrawPanel()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			//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_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0067: Unknown result type (might be due to invalid IL or missing references)
			//IL_009a: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_0162: Unknown result type (might be due to invalid IL or missing references)
			//IL_019a: Unknown result type (might be due to invalid IL or missing references)
			//IL_01cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_01fc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0231: Unknown result type (might be due to invalid IL or missing references)
			//IL_0266: Unknown result type (might be due to invalid IL or missing references)
			//IL_029b: 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: Unknown result type (might be due to invalid IL or missing references)
			//IL_0315: Unknown result type (might be due to invalid IL or missing references)
			//IL_031a: Unknown result type (might be due to invalid IL or missing references)
			//IL_033f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0345: Unknown result type (might be due to invalid IL or missing references)
			//IL_034c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0351: Unknown result type (might be due to invalid IL or missing references)
			//IL_0373: Unknown result type (might be due to invalid IL or missing references)
			//IL_0379: Unknown result type (might be due to invalid IL or missing references)
			//IL_0380: 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_03a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_03ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_03b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_03b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_03d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_03dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_03e4: Unknown result type (might be due to invalid IL or missing references)
			EnsurePanelStyle();
			Color color = GUI.color;
			Color backgroundColor = GUI.backgroundColor;
			Color contentColor = GUI.contentColor;
			GUI.color = Color.white;
			GUI.backgroundColor = Color.white;
			GUI.contentColor = Color.white;
			GUI.BeginGroup(_panelRect);
			GUI.DrawTexture(new Rect(0f, 0f, ((Rect)(ref _panelRect)).width, ((Rect)(ref _panelRect)).height), (Texture)(object)_panelBackground, (ScaleMode)0, false);
			GUI.Box(new Rect(0f, 0f, ((Rect)(ref _panelRect)).width, ((Rect)(ref _panelRect)).height), string.Empty, _panelStyle);
			GUI.DrawTexture(new Rect(0f, 0f, ((Rect)(ref _panelRect)).width, 38f), (Texture)(object)_headerBackground, (ScaleMode)0, false);
			float num = 14f;
			float num2 = 12f;
			float num3 = ((Rect)(ref _panelRect)).width - 28f;
			float num4 = (num3 - 10f) / 2f;
			Rect val = default(Rect);
			((Rect)(ref val))..ctor(num, 0f, num4, 30f);
			Rect val2 = default(Rect);
			((Rect)(ref val2))..ctor(num + num4 + 10f, 0f, num4, 30f);
			float num5 = (num3 - 24f) / 5f;
			Rect rect = default(Rect);
			((Rect)(ref rect))..ctor(num, num2, 240f, 24f);
			DrawRainbowWaveText(rect, "Gogurt", Time.time * 2.2f);
			if (GUI.Button(new Rect(((Rect)(ref _panelRect)).width - 48f, 8f, 34f, 24f), "X"))
			{
				SetMenuVisible(visible: false);
			}
			num2 += 32f;
			if (GUI.Button(new Rect(num, num2, num5, 28f), "Player"))
			{
				_activeTab = MenuTab.Player;
			}
			if (GUI.Button(new Rect(num + num5 + 6f, num2, num5, 28f), "Combat"))
			{
				_activeTab = MenuTab.Combat;
			}
			if (GUI.Button(new Rect(num + (num5 + 6f) * 2f, num2, num5, 28f), "Movement"))
			{
				_activeTab = MenuTab.Movement;
			}
			if (GUI.Button(new Rect(num + (num5 + 6f) * 3f, num2, num5, 28f), "Currency"))
			{
				_activeTab = MenuTab.Currency;
			}
			if (GUI.Button(new Rect(num + (num5 + 6f) * 4f, num2, num5, 28f), "Spawn"))
			{
				_activeTab = MenuTab.Spawn;
			}
			num2 += 40f;
			switch (_activeTab)
			{
			case MenuTab.Player:
				_playerTabScroll = DrawPlayerTab(new Rect(num, num2, num3, ((Rect)(ref _panelRect)).height - num2 - 14f), _playerTabScroll, num4);
				break;
			case MenuTab.Combat:
				_combatTabScroll = DrawCombatTab(new Rect(num, num2, num3, ((Rect)(ref _panelRect)).height - num2 - 14f), _combatTabScroll, num4);
				break;
			case MenuTab.Movement:
				_movementTabScroll = DrawMovementTab(new Rect(num, num2, num3, ((Rect)(ref _panelRect)).height - num2 - 14f), _movementTabScroll, num4);
				break;
			case MenuTab.Currency:
				_currencyTabScroll = DrawCurrencyTab(new Rect(num, num2, num3, ((Rect)(ref _panelRect)).height - num2 - 14f), _currencyTabScroll, num4);
				break;
			case MenuTab.Spawn:
				DrawSpawnTab(num, num2, num3, num4);
				break;
			}
			GUI.EndGroup();
			GUI.color = color;
			GUI.backgroundColor = backgroundColor;
			GUI.contentColor = contentColor;
		}

		private Vector2 DrawPlayerTab(Rect rect, Vector2 scroll, float halfWidth)
		{
			//IL_0087: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0113: Unknown result type (might be due to invalid IL or missing references)
			//IL_0118: Unknown result type (might be due to invalid IL or missing references)
			//IL_0125: Unknown result type (might be due to invalid IL or missing references)
			//IL_012c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0131: Unknown result type (might be due to invalid IL or missing references)
			//IL_016b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0192: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_021c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0270: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_02fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_0330: Unknown result type (might be due to invalid IL or missing references)
			//IL_0384: Unknown result type (might be due to invalid IL or missing references)
			//IL_03b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_03e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_05f9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0620: Unknown result type (might be due to invalid IL or missing references)
			//IL_084b: Unknown result type (might be due to invalid IL or missing references)
			//IL_084c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0850: Unknown result type (might be due to invalid IL or missing references)
			//IL_0660: Unknown result type (might be due to invalid IL or missing references)
			//IL_0709: Unknown result type (might be due to invalid IL or missing references)
			//IL_0772: Unknown result type (might be due to invalid IL or missing references)
			//IL_0814: Unknown result type (might be due to invalid IL or missing references)
			//IL_0430: Unknown result type (might be due to invalid IL or missing references)
			//IL_0460: Unknown result type (might be due to invalid IL or missing references)
			//IL_04b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_04ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_053e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0574: Unknown result type (might be due to invalid IL or missing references)
			//IL_05c8: Unknown result type (might be due to invalid IL or missing references)
			float num = ((Rect)(ref rect)).y + 38f;
			float num2 = ((Rect)(ref rect)).height - 38f;
			float num3 = ((Rect)(ref rect)).width - 18f;
			float num4 = 360f;
			Rect val = default(Rect);
			((Rect)(ref val))..ctor(0f, 0f, halfWidth, 30f);
			Rect val2 = default(Rect);
			((Rect)(ref val2))..ctor(halfWidth + 10f, 0f, halfWidth, 30f);
			float num5 = (num3 - 12f) / 3f;
			float y = ((Rect)(ref rect)).y;
			if (GUI.Button(new Rect(0f, y, num5, 28f), "Defense"))
			{
				_activePlayerSubTab = PlayerSubTab.Defense;
			}
			if (GUI.Button(new Rect(num5 + 6f, y, num5, 28f), "Recovery"))
			{
				_activePlayerSubTab = PlayerSubTab.Recovery;
			}
			if (GUI.Button(new Rect((num5 + 6f) * 2f, y, num5, 28f), "Status"))
			{
				_activePlayerSubTab = PlayerSubTab.Status;
			}
			scroll = GUI.BeginScrollView(new Rect(((Rect)(ref rect)).x, num, ((Rect)(ref rect)).width, num2), scroll, new Rect(0f, 0f, num3, num4), false, true);
			y = 0f;
			switch (_activePlayerSubTab)
			{
			case PlayerSubTab.Defense:
				GUI.Label(new Rect(0f, y, num3, 20f), "Defense");
				y += 26f;
				GUI.Label(new Rect(0f, y, num3, 20f), $"Armor Bonus: {_armorBonus:0.0}");
				y += 22f;
				_armorBonus = GUI.HorizontalSlider(new Rect(0f, y, num3, 20f), _armorBonus, 0f, 100f);
				y += 28f;
				GUI.Label(new Rect(0f, y, num3, 20f), $"Evasion Bonus: {_evasionBonus:0.0}");
				y += 22f;
				_evasionBonus = GUI.HorizontalSlider(new Rect(0f, y, num3, 20f), _evasionBonus, 0f, 100f);
				y += 28f;
				GUI.Label(new Rect(0f, y, num3, 20f), $"Shield Bonus: {_shieldBonus:0}");
				y += 22f;
				_shieldBonus = GUI.HorizontalSlider(new Rect(0f, y, num3, 20f), _shieldBonus, 0f, 300f);
				y += 28f;
				GUI.Label(new Rect(0f, y, num3, 20f), $"Thorns Bonus: {_thornsBonus:0}");
				y += 22f;
				_thornsBonus = GUI.HorizontalSlider(new Rect(0f, y, num3, 20f), _thornsBonus, 0f, 200f);
				break;
			case PlayerSubTab.Recovery:
				GUI.Label(new Rect(0f, y, num3, 20f), "Recovery");
				y = (((Rect)(ref val2)).y = (((Rect)(ref val)).y = y + 26f));
				if (GUI.Button(val, _godMode ? "God Mode: ON" : "God Mode: OFF"))
				{
					_godMode = !_godMode;
					PushStatus(_godMode ? "True god mode enabled" : "God mode disabled");
				}
				if (GUI.Button(val2, "Full Heal"))
				{
					_requestHeal = true;
				}
				y += 38f;
				GUI.Label(new Rect(0f, y, num3, 20f), $"Health Regen Bonus: {_healthRegenBonus:0.0}");
				y += 22f;
				_healthRegenBonus = GUI.HorizontalSlider(new Rect(0f, y, num3, 20f), _healthRegenBonus, 0f, 25f);
				y += 28f;
				GUI.Label(new Rect(0f, y, num3, 20f), $"Max Health Bonus: {_maxHealthBonus:0}");
				y += 22f;
				_maxHealthBonus = GUI.HorizontalSlider(new Rect(0f, y, num3, 20f), _maxHealthBonus, 0f, 500f);
				y += 28f;
				GUI.Label(new Rect(0f, y, num3, 20f), $"Overheal Bonus: {_overhealBonus:0}");
				y += 22f;
				_overhealBonus = GUI.HorizontalSlider(new Rect(0f, y, num3, 20f), _overhealBonus, 0f, 300f);
				break;
			case PlayerSubTab.Status:
				GUI.Label(new Rect(0f, y, num3, 20f), "Status");
				y += 24f;
				GUI.Label(new Rect(0f, y, num3, 20f), "God Mode: " + (_godMode ? "ACTIVE" : "OFF"));
				y += 20f;
				GUI.Label(new Rect(0f, y, num3, 20f), $"HP: {_cachedHp}/{_cachedMaxHp}    Shield: {_cachedShield:0}/{_cachedMaxShield:0}");
				y += 20f;
				GUI.Label(new Rect(0f, y, num3, 20f), $"Level: {_cachedLevel}    XP: {_cachedXp}");
				y += 20f;
				GUI.Label(new Rect(0f, y, num3, 20f), $"Pos: {_cachedPosition.x:0.0}, {_cachedPosition.y:0.0}, {_cachedPosition.z:0.0}");
				y += 20f;
				GUI.Label(new Rect(0f, y, num3, 20f), (Time.time < _statusUntil) ? ("Notice: " + _statusText) : "Notice: Ready");
				break;
			}
			GUI.EndScrollView();
			return scroll;
		}

		private Vector2 DrawCombatTab(Rect rect, Vector2 scroll, float halfWidth)
		{
			//IL_0087: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0113: Unknown result type (might be due to invalid IL or missing references)
			//IL_0118: Unknown result type (might be due to invalid IL or missing references)
			//IL_0125: Unknown result type (might be due to invalid IL or missing references)
			//IL_012c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0131: Unknown result type (might be due to invalid IL or missing references)
			//IL_016b: Unknown result type (might be due to invalid IL or missing references)
			//IL_01cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0202: Unknown result type (might be due to invalid IL or missing references)
			//IL_0256: Unknown result type (might be due to invalid IL or missing references)
			//IL_028c: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_0316: Unknown result type (might be due to invalid IL or missing references)
			//IL_0377: Unknown result type (might be due to invalid IL or missing references)
			//IL_03ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_040e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0444: Unknown result type (might be due to invalid IL or missing references)
			//IL_0498: Unknown result type (might be due to invalid IL or missing references)
			//IL_04d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_0557: Unknown result type (might be due to invalid IL or missing references)
			//IL_05b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_05ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_0642: Unknown result type (might be due to invalid IL or missing references)
			//IL_0678: Unknown result type (might be due to invalid IL or missing references)
			//IL_06d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_070f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0763: Unknown result type (might be due to invalid IL or missing references)
			//IL_0799: Unknown result type (might be due to invalid IL or missing references)
			//IL_07fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_0830: Unknown result type (might be due to invalid IL or missing references)
			//IL_0890: Unknown result type (might be due to invalid IL or missing references)
			//IL_08b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_08b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0510: Unknown result type (might be due to invalid IL or missing references)
			//IL_08bc: Unknown result type (might be due to invalid IL or missing references)
			float num = ((Rect)(ref rect)).y + 38f;
			float num2 = ((Rect)(ref rect)).height - 38f;
			float num3 = ((Rect)(ref rect)).width - 18f;
			float num4 = 340f;
			Rect val = default(Rect);
			((Rect)(ref val))..ctor(0f, 0f, halfWidth, 30f);
			Rect val2 = default(Rect);
			((Rect)(ref val2))..ctor(halfWidth + 10f, 0f, halfWidth, 30f);
			float num5 = (num3 - 12f) / 3f;
			float y = ((Rect)(ref rect)).y;
			if (GUI.Button(new Rect(0f, y, num5, 28f), "Damage"))
			{
				_activeCombatSubTab = CombatSubTab.Damage;
			}
			if (GUI.Button(new Rect(num5 + 6f, y, num5, 28f), "Presets"))
			{
				_activeCombatSubTab = CombatSubTab.Presets;
			}
			if (GUI.Button(new Rect((num5 + 6f) * 2f, y, num5, 28f), "Projectiles"))
			{
				_activeCombatSubTab = CombatSubTab.Projectiles;
			}
			scroll = GUI.BeginScrollView(new Rect(((Rect)(ref rect)).x, num, ((Rect)(ref rect)).width, num2), scroll, new Rect(0f, 0f, num3, num4), false, true);
			y = 0f;
			switch (_activeCombatSubTab)
			{
			case CombatSubTab.Damage:
				GUI.Label(new Rect(0f, y, num3, 20f), $"Attack Speed Multiplier: {_attackSpeedMultiplier:0.00}x");
				y += 22f;
				_attackSpeedMultiplier = GUI.HorizontalSlider(new Rect(0f, y, num3, 20f), _attackSpeedMultiplier, 1f, 5f);
				y += 28f;
				GUI.Label(new Rect(0f, y, num3, 20f), $"Crit Chance Bonus: {_critChanceBonus:0.00}");
				y += 22f;
				_critChanceBonus = GUI.HorizontalSlider(new Rect(0f, y, num3, 20f), _critChanceBonus, 0f, 1f);
				y += 28f;
				GUI.Label(new Rect(0f, y, num3, 20f), $"Crit Damage Bonus: {_critDamageBonus:0.00}");
				y += 22f;
				_critDamageBonus = GUI.HorizontalSlider(new Rect(0f, y, num3, 20f), _critDamageBonus, 0f, 5f);
				y += 28f;
				GUI.Label(new Rect(0f, y, num3, 20f), $"Damage Multiplier: {_damageMultiplier:0.00}x");
				y += 22f;
				_damageMultiplier = GUI.HorizontalSlider(new Rect(0f, y, num3, 20f), _damageMultiplier, 1f, 10f);
				y += 28f;
				GUI.Label(new Rect(0f, y, num3, 20f), $"Damage To Elites: {_damageToElitesMultiplier:0.00}x");
				y += 22f;
				_damageToElitesMultiplier = GUI.HorizontalSlider(new Rect(0f, y, num3, 20f), _damageToElitesMultiplier, 0.25f, 10f);
				y += 28f;
				GUI.Label(new Rect(0f, y, num3, 20f), $"Lifesteal Bonus: {_lifestealBonus:0.00}");
				y += 22f;
				_lifestealBonus = GUI.HorizontalSlider(new Rect(0f, y, num3, 20f), _lifestealBonus, 0f, 5f);
				break;
			case CombatSubTab.Presets:
				((Rect)(ref val)).y = y;
				((Rect)(ref val2)).y = y;
				if (GUI.Button(val, "Preset: 2x Damage"))
				{
					_damageMultiplier = 2f;
					_attackSpeedMultiplier = 1.5f;
					_projectileBonus = Mathf.Max(_projectileBonus, 1f);
				}
				if (GUI.Button(val2, "Preset: Boss Melt"))
				{
					_damageMultiplier = 8f;
					_attackSpeedMultiplier = 4f;
					_critChanceBonus = 1f;
				}
				break;
			case CombatSubTab.Projectiles:
				GUI.Label(new Rect(0f, y, num3, 20f), $"Duration: {_durationMultiplier:0.00}x");
				y += 22f;
				_durationMultiplier = GUI.HorizontalSlider(new Rect(0f, y, num3, 20f), _durationMultiplier, 0.25f, 5f);
				y += 28f;
				GUI.Label(new Rect(0f, y, num3, 20f), $"Extra Projectiles: {_projectileBonus:0}");
				y += 22f;
				_projectileBonus = GUI.HorizontalSlider(new Rect(0f, y, num3, 20f), _projectileBonus, 0f, 10f);
				y += 28f;
				GUI.Label(new Rect(0f, y, num3, 20f), $"Knockback: {_knockbackMultiplier:0.00}x");
				y += 22f;
				_knockbackMultiplier = GUI.HorizontalSlider(new Rect(0f, y, num3, 20f), _knockbackMultiplier, 0.25f, 5f);
				y += 28f;
				GUI.Label(new Rect(0f, y, num3, 20f), $"Projectile Bounces: {_projectileBounceBonus:0}");
				y += 22f;
				_projectileBounceBonus = GUI.HorizontalSlider(new Rect(0f, y, num3, 20f), _projectileBounceBonus, 0f, 20f);
				y += 28f;
				GUI.Label(new Rect(0f, y, num3, 20f), $"Projectile Speed: {_projectileSpeedMultiplier:0.00}x");
				y += 22f;
				_projectileSpeedMultiplier = GUI.HorizontalSlider(new Rect(0f, y, num3, 20f), _projectileSpeedMultiplier, 0.25f, 5f);
				y += 28f;
				GUI.Label(new Rect(0f, y, num3, 20f), $"Size: {_sizeMultiplier:0.00}x");
				y += 22f;
				_sizeMultiplier = GUI.HorizontalSlider(new Rect(0f, y, num3, 20f), _sizeMultiplier, 0.25f, 5f);
				break;
			}
			GUI.EndScrollView();
			return scroll;
		}

		private Vector2 DrawMovementTab(Rect rect, Vector2 scroll, float halfWidth)
		{
			//IL_0087: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b4: 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_00e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_0133: Unknown result type (might be due to invalid IL or missing references)
			//IL_0181: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d9: 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_0230: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_04c0: Unknown result type (might be due to invalid IL or missing references)
			//IL_04c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_04c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_0317: Unknown result type (might be due to invalid IL or missing references)
			//IL_036b: Unknown result type (might be due to invalid IL or missing references)
			//IL_03a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0402: Unknown result type (might be due to invalid IL or missing references)
			//IL_0438: Unknown result type (might be due to invalid IL or missing references)
			//IL_0499: Unknown result type (might be due to invalid IL or missing references)
			float num = ((Rect)(ref rect)).y + 38f;
			float num2 = ((Rect)(ref rect)).height - 38f;
			float num3 = ((Rect)(ref rect)).width - 18f;
			float num4 = 320f;
			Rect val = default(Rect);
			((Rect)(ref val))..ctor(0f, 0f, halfWidth, 30f);
			Rect val2 = default(Rect);
			((Rect)(ref val2))..ctor(halfWidth + 10f, 0f, halfWidth, 30f);
			float num5 = (num3 - 6f) / 2f;
			float y = ((Rect)(ref rect)).y;
			if (GUI.Button(new Rect(0f, y, num5, 28f), "Actions"))
			{
				_activeMovementSubTab = MovementSubTab.Actions;
			}
			if (GUI.Button(new Rect(num5 + 6f, y, num5, 28f), "Mobility"))
			{
				_activeMovementSubTab = MovementSubTab.Mobility;
			}
			scroll = GUI.BeginScrollView(new Rect(((Rect)(ref rect)).x, num, ((Rect)(ref rect)).width, num2), scroll, new Rect(0f, 0f, num3, num4), false, true);
			y = 0f;
			switch (_activeMovementSubTab)
			{
			case MovementSubTab.Actions:
				GUI.Label(new Rect(0f, y, num3, 20f), $"FOV: {_targetFov}");
				y += 22f;
				_targetFov = Mathf.RoundToInt(GUI.HorizontalSlider(new Rect(0f, y, num3, 20f), (float)_targetFov, 50f, 130f));
				y = (((Rect)(ref val2)).y = (((Rect)(ref val)).y = y + 34f));
				if (GUI.Button(val, "Save Position"))
				{
					_savedPosition = _cachedPosition;
					_savedPositionValid = true;
				}
				GUI.enabled = _savedPositionValid;
				if (GUI.Button(val2, "Teleport Saved"))
				{
					_requestTeleport = true;
				}
				GUI.enabled = true;
				y += 40f;
				if (GUI.Button(new Rect(0f, y, num3, 30f), "Reset Movement Defaults"))
				{
					_noclip = false;
					_infiniteJump = false;
					_speedMultiplier = 1f;
					_jumpHeightMultiplier = 1f;
					_extraJumpsBonus = 0f;
					_targetFov = Mathf.RoundToInt(_defaultFov);
				}
				break;
			case MovementSubTab.Mobility:
				((Rect)(ref val)).y = y;
				((Rect)(ref val2)).y = y;
				if (GUI.Button(val, _noclip ? "Noclip: ON" : "Noclip: OFF"))
				{
					_noclip = !_noclip;
				}
				if (GUI.Button(val2, _infiniteJump ? "Infinite Jump: ON" : "Infinite Jump: OFF"))
				{
					_infiniteJump = !_infiniteJump;
				}
				y += 40f;
				GUI.Label(new Rect(0f, y, num3, 20f), $"Extra Jumps: {_extraJumpsBonus:0}");
				y += 22f;
				_extraJumpsBonus = GUI.HorizontalSlider(new Rect(0f, y, num3, 20f), _extraJumpsBonus, 0f, 20f);
				y += 28f;
				GUI.Label(new Rect(0f, y, num3, 20f), $"Jump Height Multiplier: {_jumpHeightMultiplier:0.00}x");
				y += 22f;
				_jumpHeightMultiplier = GUI.HorizontalSlider(new Rect(0f, y, num3, 20f), _jumpHeightMultiplier, 1f, 4f);
				y += 28f;
				GUI.Label(new Rect(0f, y, num3, 20f), $"Move Speed Multiplier: {_speedMultiplier:0.00}x");
				y += 22f;
				_speedMultiplier = GUI.HorizontalSlider(new Rect(0f, y, num3, 20f), _speedMultiplier, 0.5f, 5f);
				break;
			}
			GUI.EndScrollView();
			return scroll;
		}

		private Vector2 DrawCurrencyTab(Rect rect, Vector2 scroll, float halfWidth)
		{
			//IL_0087: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b4: 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_00e5: Unknown result typ