Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of StatsMod v1.0.0
DetailedStatsMod.dll
Decompiled a day agousing System; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Text; using BepInEx; using Microsoft.CodeAnalysis; using RoR2; using RoR2.UI; using UnityEngine; using UnityEngine.EventSystems; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("DetailedStatsMod")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("DetailedStatsMod")] [assembly: AssemblyTitle("DetailedStatsMod")] [assembly: AssemblyVersion("1.0.0.0")] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace DetailedStatsMod { [BepInPlugin("com.daniil.detailedstats", "DetailedStatsAndItemStats", "1.0.0")] public class DetailedStatsPlugin : BaseUnityPlugin { public const string PluginGUID = "com.daniil.detailedstats"; public const string PluginName = "DetailedStatsAndItemStats"; public const string PluginVersion = "1.0.0"; private void Awake() { ((Component)this).gameObject.AddComponent<StatsOverlayUI>(); ((BaseUnityPlugin)this).Logger.LogInfo((object)"DetailedStatsMod успешно запущен!"); } public static void RefreshAllItemTooltips() { //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Invalid comparison between Unknown and I4 //IL_0080: Unknown result type (might be due to invalid IL or missing references) try { ItemInventoryDisplay[] array = Object.FindObjectsOfType<ItemInventoryDisplay>(); if (array == null) { return; } ItemInventoryDisplay[] array2 = array; foreach (ItemInventoryDisplay val in array2) { if ((Object)(object)val == (Object)null || val.itemIcons == null) { continue; } foreach (ItemIcon itemIcon in val.itemIcons) { if (!((Object)(object)itemIcon == (Object)null) && (int)itemIcon.itemIndex != -1) { if ((Object)(object)((Component)itemIcon).gameObject.GetComponent<ItemStatsHoverTrigger>() == (Object)null) { ((Component)itemIcon).gameObject.AddComponent<ItemStatsHoverTrigger>(); } UpdateItemTooltip(itemIcon, itemIcon.itemIndex, itemIcon.itemCount); } } } } catch (Exception ex) { Debug.LogWarning((object)("[DetailedStatsMod] Ошибка при обновлении тултипов: " + ex.Message)); } } public static void UpdateItemTooltip(ItemIcon icon, ItemIndex itemIndex, int itemCount) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Invalid comparison between Unknown and I4 //IL_002d: 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) if ((Object)(object)icon == (Object)null || (int)itemIndex == -1 || itemCount <= 0) { return; } TooltipProvider val = icon.tooltipProvider ?? ((Component)icon).GetComponent<TooltipProvider>(); if ((Object)(object)val == (Object)null) { return; } ItemDef itemDef = ItemCatalog.GetItemDef(itemIndex); if (!((Object)(object)itemDef == (Object)null)) { CharacterBody body = ResolveBodyFromIcon(icon); string statsDetails = ItemStatsCalculator.GetStatsDetails(itemIndex, itemCount, body); if (!string.IsNullOrEmpty(statsDetails)) { string text = ((!string.IsNullOrEmpty(itemDef.descriptionToken)) ? Language.GetString(itemDef.descriptionToken) : ((!string.IsNullOrEmpty(itemDef.pickupToken)) ? Language.GetString(itemDef.pickupToken) : "")); val.bodyToken = text + "\n\n" + statsDetails; } } } public static CharacterBody ResolveBodyFromIcon(ItemIcon icon) { ScoreboardStrip componentInParent = ((Component)icon).GetComponentInParent<ScoreboardStrip>(); if ((Object)(object)componentInParent != (Object)null && (Object)(object)componentInParent.master != (Object)null) { CharacterBody body = componentInParent.master.GetBody(); if ((Object)(object)body != (Object)null) { return body; } } return GetLocalBody(); } public static CharacterBody GetLocalBody() { LocalUser firstLocalUser = LocalUserManager.GetFirstLocalUser(); if (firstLocalUser != null && (Object)(object)firstLocalUser.cachedBody != (Object)null) { return firstLocalUser.cachedBody; } if (PlayerCharacterMasterController.instances.Count > 0) { PlayerCharacterMasterController obj = PlayerCharacterMasterController.instances[0]; if (obj == null) { return null; } CharacterMaster master = obj.master; if (master == null) { return null; } return master.GetBody(); } return null; } } public class ItemStatsHoverTrigger : MonoBehaviour, IPointerEnterHandler, IEventSystemHandler { private ItemIcon icon; private void Awake() { icon = ((Component)this).GetComponent<ItemIcon>(); } public void OnPointerEnter(PointerEventData eventData) { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Invalid comparison between Unknown and I4 //IL_0028: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)icon != (Object)null && (int)icon.itemIndex != -1) { DetailedStatsPlugin.UpdateItemTooltip(icon, icon.itemIndex, icon.itemCount); } } } public static class ItemStatsCalculator { public static string GetStatsDetails(ItemIndex index, int count, CharacterBody body) { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0568: Unknown result type (might be due to invalid IL or missing references) if (count <= 0) { return string.Empty; } ItemDef itemDef = ItemCatalog.GetItemDef(index); if ((Object)(object)itemDef == (Object)null) { return string.Empty; } float num = (Object.op_Implicit((Object)(object)body) ? body.damage : 12f); int num2 = (((Object)(object)body != (Object)null && (Object)(object)body.master != (Object)null) ? Mathf.RoundToInt(body.master.luck) : 0); string name = ((Object)itemDef).name; StringBuilder stringBuilder = new StringBuilder(); stringBuilder.AppendLine("<color=#D2A4FF><b>[ПОДРОБНЫЕ СТАТЫ]</b></color>"); stringBuilder.AppendLine($"<color=#7FD4FF>Стаков:</color> <b>{count}</b> | <color=#E5C158>Удача:</color> <b>{num2:+0;-0;0}</b>"); bool flag = true; switch (name) { case "CritGlasses": { float num12 = (float)count * 10f; float num13 = (Object.op_Implicit((Object)(object)body) ? body.crit : num12); stringBuilder.AppendLine($"• Шанс крита от очков: <color=#FF8484>+{num12:F0}%</color>"); stringBuilder.AppendLine(string.Format("• Итоговый крит персонажа: <color=#FF8484>{0:F1}%</color> {1}", num13, (num13 >= 100f) ? "(МАКС)" : "")); break; } case "Syringe": { float num18 = (float)count * 15f; stringBuilder.AppendLine($"• Скорость атаки: <color=#FFE680>+{num18:F0}%</color>"); if (Object.op_Implicit((Object)(object)body)) { stringBuilder.AppendLine($"• Текущая скорость атаки: <color=#FFE680>{body.attackSpeed:F2}x</color>"); } break; } case "BleedOnHit": { float num15 = Mathf.Min(100f, (float)count * 10f); float num16 = ApplyLuck(num15, num2); float num17 = 2.4f * num; stringBuilder.AppendLine($"• Шанс кровотечения: <color=#FF6666>{num16:F1}%</color> (базовый {num15:F0}%)"); stringBuilder.AppendLine($"• Урон тика: <color=#FF6666>{num17 * 0.1f:F1}</color> (всего {num17:F1} за 3 сек)"); break; } case "Bear": { float num14 = (1f - 1f / (1f + 0.15f * (float)count)) * 100f; stringBuilder.AppendLine($"• Шанс заблокировать урон: <color=#99FF99>{num14:F1}%</color>"); stringBuilder.AppendLine("• <size=85%><color=#888888>(Удача не влияет на шанс блока)</color></size>"); break; } case "Hoof": { float num11 = (float)count * 14f; stringBuilder.AppendLine($"• Скорость передвижения: <color=#70DBFF>+{num11:F0}%</color>"); if (Object.op_Implicit((Object)(object)body)) { stringBuilder.AppendLine($"• Текущая скорость: <color=#70DBFF>{body.moveSpeed:F1} м/с</color>"); } break; } case "ChainLightning": { float num7 = ApplyLuck(25f, num2); int num8 = 3 + (count - 1) * 2; float num9 = 20f + (float)(count - 1) * 2f; float num10 = 0.8f * num; stringBuilder.AppendLine($"• Шанс срабатывания: <color=#70DBFF>{num7:F1}%</color> (базовый 25%)"); stringBuilder.AppendLine($"• Целей: <color=#FFE680>{num8}</color> | Радиус: <color=#FFE680>{num9:F0} м</color>"); stringBuilder.AppendLine($"• Урон молнии: <color=#FF8484>{num10:F1}</color> (80% урона)"); break; } case "Missile": { float num5 = ApplyLuck(10f, num2); float num6 = 3f * (float)count * num; stringBuilder.AppendLine($"• Шанс ракеты: <color=#FFB366>{num5:F1}%</color> (базовый 10%)"); stringBuilder.AppendLine($"• Урон ракеты: <color=#FF6666>{num6:F1}</color> ({300 * count}% урона)"); break; } case "StickyBomb": { float num3 = Mathf.Min(100f, (float)count * 5f); float num4 = ApplyLuck(num3, num2); stringBuilder.AppendLine($"• Шанс бомбы: <color=#FF9933>{num4:F1}%</color> (базовый {num3:F0}%)"); stringBuilder.AppendLine($"• Взрывной урон: <color=#FF6666>{1.8f * num:F1}</color> (180% урона)"); break; } case "Feather": stringBuilder.AppendLine($"• Дополнительных прыжков: <color=#70DBFF>+{count}</color>"); break; case "Clover": stringBuilder.AppendLine($"• Бонус к удаче (Luck): <color=#99FF99>+{count}</color>"); break; default: flag = false; break; } if (!flag) { stringBuilder.AppendLine($"• Тир предмета: {itemDef.tier}"); stringBuilder.AppendLine($"• Базовый урон игрока: {num:F1}"); } return stringBuilder.ToString().TrimEnd(); } public static float ApplyLuck(float percentChance, int luck) { float num = Mathf.Clamp01(percentChance / 100f); if (luck == 0) { return percentChance; } if (luck > 0) { float num2 = Mathf.Pow(1f - num, (float)(1 + luck)); return (1f - num2) * 100f; } return Mathf.Pow(num, (float)(1 + Mathf.Abs(luck))) * 100f; } } public class StatsOverlayUI : MonoBehaviour { private Rect windowRect = new Rect(25f, 140f, 310f, 500f); private bool isVisible = true; private bool onlyInTab; private float uiScale = 1f; private Vector2 scrollPos = Vector2.zero; private bool isResizing; private float tooltipScanTimer; private GUIStyle headerStyle; private GUIStyle statLabelStyle; private GUIStyle statValueStyle; private GUIStyle titleStyle; private Texture2D windowBgTexture; private void Awake() { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) windowBgTexture = new Texture2D(1, 1); windowBgTexture.SetPixel(0, 0, new Color(0.08f, 0.08f, 0.12f, 0.92f)); windowBgTexture.Apply(); } private void Update() { if (Input.GetKeyDown((KeyCode)288)) { isVisible = !isVisible; } tooltipScanTimer += Time.deltaTime; if (Input.GetKeyDown((KeyCode)9) || tooltipScanTimer >= 1f) { tooltipScanTimer = 0f; DetailedStatsPlugin.RefreshAllItemTooltips(); } } private void InitStyles() { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Expected O, but got Unknown //IL_009f: 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_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Expected O, but got Unknown //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0101: 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_0110: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Expected O, but got Unknown //IL_0127: Unknown result type (might be due to invalid IL or missing references) if (titleStyle == null) { titleStyle = new GUIStyle(GUI.skin.label) { fontSize = 13, fontStyle = (FontStyle)1, alignment = (TextAnchor)3 }; titleStyle.normal.textColor = new Color(0.9f, 0.85f, 0.5f); headerStyle = new GUIStyle(GUI.skin.label) { fontSize = 12, fontStyle = (FontStyle)1, alignment = (TextAnchor)3 }; headerStyle.normal.textColor = new Color(0.45f, 0.85f, 1f); statLabelStyle = new GUIStyle(GUI.skin.label) { fontSize = 11, alignment = (TextAnchor)3 }; statLabelStyle.normal.textColor = new Color(0.85f, 0.85f, 0.85f); statValueStyle = new GUIStyle(GUI.skin.label) { fontSize = 11, fontStyle = (FontStyle)1, alignment = (TextAnchor)5 }; statValueStyle.normal.textColor = Color.white; } } private void OnGUI() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Expected O, but got Unknown //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) if (isVisible && (!onlyInTab || Input.GetKey((KeyCode)9))) { InitStyles(); Matrix4x4 matrix = GUI.matrix; if (Mathf.Abs(uiScale - 1f) > 0.01f) { GUIUtility.ScaleAroundPivot(new Vector2(uiScale, uiScale), new Vector2(((Rect)(ref windowRect)).x, ((Rect)(ref windowRect)).y)); } GUI.DrawTexture(windowRect, (Texture)(object)windowBgTexture); windowRect = GUI.Window(875412, windowRect, new WindowFunction(DrawWindowContent), string.Empty); GUI.matrix = matrix; } } private void DrawWindowContent(int id) { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_0607: Unknown result type (might be due to invalid IL or missing references) //IL_0637: Unknown result type (might be due to invalid IL or missing references) //IL_0663: Unknown result type (might be due to invalid IL or missing references) //IL_06b5: Unknown result type (might be due to invalid IL or missing references) //IL_06c1: Unknown result type (might be due to invalid IL or missing references) //IL_0388: Unknown result type (might be due to invalid IL or missing references) //IL_0491: Unknown result type (might be due to invalid IL or missing references) //IL_0597: Unknown result type (might be due to invalid IL or missing references) GUI.DragWindow(new Rect(0f, 0f, ((Rect)(ref windowRect)).width - 50f, 26f)); GUI.Label(new Rect(10f, 4f, 180f, 22f), "\ud83d\udcca СТАТИСТИКА ИГРОКА", titleStyle); if (GUI.Button(new Rect(((Rect)(ref windowRect)).width - 45f, 4f, 38f, 20f), "✕")) { isVisible = false; } CharacterBody localBody = DetailedStatsPlugin.GetLocalBody(); float num = 550f; scrollPos = GUI.BeginScrollView(new Rect(8f, 28f, ((Rect)(ref windowRect)).width - 16f, ((Rect)(ref windowRect)).height - 70f), scrollPos, new Rect(0f, 0f, ((Rect)(ref windowRect)).width - 36f, num)); if ((Object)(object)localBody == (Object)null) { GUI.Label(new Rect(5f, 10f, 200f, 20f), "Ожидание спавна персонажа...", statLabelStyle); } else { float y = 5f; float num2 = ((Rect)(ref windowRect)).width - 38f; string displayName = localBody.GetDisplayName(); DrawStatRow(ref y, num2, "Персонаж / Уровень", $"{displayName} (Ур. {localBody.level:F0})"); DrawStatRow(ref y, num2, "Опыт (EXP)", $"{localBody.experience:F0}"); DrawDivider(ref y, num2); GUI.Label(new Rect(0f, y, num2, 20f), "ВЫЖИВАЕМОСТЬ", headerStyle); y += 20f; HealthComponent healthComponent = localBody.healthComponent; float num3 = (Object.op_Implicit((Object)(object)healthComponent) ? healthComponent.health : localBody.maxHealth); float maxHealth = localBody.maxHealth; DrawStatRow(ref y, num2, "Здоровье (HP)", $"{num3:F0} / {maxHealth:F0}"); if (localBody.maxShield > 0f) { float num4 = (Object.op_Implicit((Object)(object)healthComponent) ? healthComponent.shield : 0f); DrawStatRow(ref y, num2, "Щиты (Shield)", $"{num4:F0} / {localBody.maxShield:F0}"); } if ((Object)(object)healthComponent != (Object)null && healthComponent.barrier > 0f) { DrawStatRow(ref y, num2, "Барьер (Barrier)", $"{healthComponent.barrier:F0}"); } DrawStatRow(ref y, num2, "Регенерация HP", $"{localBody.regen:F1} HP/с"); float armor = localBody.armor; float num5 = ((armor >= 0f) ? (armor / (100f + armor) * 100f) : ((0f - (1f - 100f / (100f - armor))) * 100f)); DrawStatRow(ref y, num2, "Броня", $"{armor:F1} ({num5:F1}%)"); if (localBody.cursePenalty > 1f) { DrawStatRow(ref y, num2, "Проклятие (Curse)", $"x{localBody.cursePenalty:F2}"); } DrawDivider(ref y, num2); GUI.Label(new Rect(0f, y, num2, 20f), "АТАКА И УРОН", headerStyle); y += 20f; DrawStatRow(ref y, num2, "Базовый урон", $"{localBody.damage:F1}"); DrawStatRow(ref y, num2, "Скорость атаки", $"{localBody.attackSpeed:F2}x"); DrawStatRow(ref y, num2, "Шанс крита", $"{localBody.crit:F1}%"); DrawStatRow(ref y, num2, "Множитель крита", $"{localBody.critMultiplier:F2}x"); int num6 = (Object.op_Implicit((Object)(object)localBody.master) ? Mathf.RoundToInt(localBody.master.luck) : 0); DrawStatRow(ref y, num2, "Удача (Luck)", $"{num6:+0;-0;0}"); DrawDivider(ref y, num2); GUI.Label(new Rect(0f, y, num2, 20f), "МОБИЛЬНОСТЬ", headerStyle); y += 20f; DrawStatRow(ref y, num2, "Скорость ходьбы", $"{localBody.moveSpeed:F1} м/с"); float num7 = localBody.moveSpeed * localBody.sprintingSpeedMultiplier; DrawStatRow(ref y, num2, "Скорость спринта", $"{num7:F1} м/с"); DrawStatRow(ref y, num2, "Макс. прыжков", $"{1 + localBody.maxJumpCount}"); DrawStatRow(ref y, num2, "Сила прыжка", $"{localBody.jumpPower:F1}"); DrawStatRow(ref y, num2, "Ускорение", $"{localBody.acceleration:F1}"); DrawDivider(ref y, num2); if ((Object)(object)localBody.master != (Object)null) { GUI.Label(new Rect(0f, y, num2, 20f), "ЭКОНОМИКА", headerStyle); y += 20f; DrawStatRow(ref y, num2, "Золото забега", $"{localBody.master.money}"); } } GUI.EndScrollView(); float num8 = ((Rect)(ref windowRect)).height - 38f; onlyInTab = GUI.Toggle(new Rect(8f, num8, 95f, 18f), onlyInTab, "Только в Tab"); GUI.Label(new Rect(110f, num8 - 2f, 45f, 20f), "Zoom:", statLabelStyle); uiScale = GUI.HorizontalSlider(new Rect(155f, num8 + 2f, 75f, 16f), uiScale, 0.75f, 1.75f); Rect val = default(Rect); ((Rect)(ref val))..ctor(((Rect)(ref windowRect)).width - 18f, ((Rect)(ref windowRect)).height - 18f, 18f, 18f); GUI.Label(val, "◢"); ProcessResize(val); } private void DrawStatRow(ref float y, float width, string label, string val) { //IL_0013: 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) GUI.Label(new Rect(0f, y, width * 0.58f, 18f), label, statLabelStyle); GUI.Label(new Rect(width * 0.58f, y, width * 0.42f, 18f), val, statValueStyle); y += 18f; } private void DrawDivider(ref float y, float width) { //IL_0017: Unknown result type (might be due to invalid IL or missing references) y += 3f; GUI.Box(new Rect(0f, y, width, 1f), ""); y += 5f; } private void ProcessResize(Rect handle) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Invalid comparison between Unknown and I4 //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Invalid comparison between Unknown and I4 //IL_0047: 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) Event current = Event.current; if ((int)current.type == 0 && ((Rect)(ref handle)).Contains(current.mousePosition)) { isResizing = true; current.Use(); } if (isResizing) { if ((int)current.type == 3) { ((Rect)(ref windowRect)).width = Mathf.Max(260f, current.mousePosition.x); ((Rect)(ref windowRect)).height = Mathf.Max(220f, current.mousePosition.y); current.Use(); } else if ((int)current.type == 1) { isResizing = false; current.Use(); } } } } }