diff --git a/Assets/Scripts/Studio/UI/Panel/Panel_Tooltip.cs b/Assets/Scripts/Studio/UI/Panel/Panel_Tooltip.cs index 52d7b727..bd515e81 100644 --- a/Assets/Scripts/Studio/UI/Panel/Panel_Tooltip.cs +++ b/Assets/Scripts/Studio/UI/Panel/Panel_Tooltip.cs @@ -1,10 +1,7 @@ using System.Reflection; -using System.Xml; using TMPro; using UnityEngine; using UnityEngine.EventSystems; -using UnityEngine.UI; -using UnityEngine.UI.Extensions; using XRLib.UI; namespace Studio.UI @@ -75,13 +72,10 @@ namespace Studio.UI { Vector2 mousePos = Input.mousePosition; - float bgSizeX = image_bg.sizeDelta.x / 2 * Screen.width / standardScreenWidth; - float bgSizeY = image_bg.sizeDelta.y / 2 * Screen.height / standardScreenHeight; - - float movePosX = (mousePos.x + bgSizeX); + float bgSizeY = image_bg.sizeDelta.y * 1.3f * Screen.height / standardScreenHeight; float movePosY = mousePos.y - bgSizeY; - Vector2 movePos = new Vector2(movePosX, movePosY); + Vector2 movePos = new Vector2(mousePos.x, movePosY); image_bg.transform.position = movePos; text_tooltip.transform.position = movePos;