From 39001a600fcae2bcf27c225df8752d75fb92fef4 Mon Sep 17 00:00:00 2001
From: yyl <yyl>
Date: 星期五, 31 十月 2025 11:18:26 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.1.20:10010/r/Project_SG_scripts

---
 Main/System/ItemTip/SmallTipWin.cs |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/Main/System/ItemTip/SmallTipWin.cs b/Main/System/ItemTip/SmallTipWin.cs
index e2bdbcc..7e35643 100644
--- a/Main/System/ItemTip/SmallTipWin.cs
+++ b/Main/System/ItemTip/SmallTipWin.cs
@@ -57,7 +57,8 @@
         Vector2 adjustedPos = new Vector2(worldPos.x, worldPos.y + (!isDownShow ? screenHeight * 0.5f : -screenHeight * 0.5f));
 
         Vector2 screenAdjustedPos = CameraManager.uiCamera.WorldToScreenPoint(adjustedPos);
-        screenAdjustedPos.x = Mathf.Clamp(screenAdjustedPos.x, rectTransform.rect.width * 0.5f, Screen.width - rectTransform.rect.width * 0.5f);
+        var rectWidth = rectTransform.rect.width * Screen.width / canvasScaler.referenceResolution.x;
+        screenAdjustedPos.x = Mathf.Clamp(screenAdjustedPos.x, rectWidth * 0.5f, Screen.width - rectWidth * 0.5f);
         screenAdjustedPos.y = Mathf.Clamp(screenAdjustedPos.y, rectTransform.rect.height * 0.5f, Screen.height - rectTransform.rect.height * 0.5f - 15);
 
         adjustedPos = CameraManager.uiCamera.ScreenToWorldPoint(screenAdjustedPos);

--
Gitblit v1.8.0