This commit is contained in:
Caiyanpeng committed 2021-12-28 11:25:09 +08:00
1 parent a2b44262f7
commit 2b390717c2
130 files changed
+21774 -2581

No files matched your search

+12 -2
View File
@@ -33,13 +33,24 @@ namespace Assets.Scripts.UI.Control
protected void Awake()
{
#if !(UNITY_ANDROID || UNITY_IOS)
//pc版依然让tooltip变成下面的
var newtool = transform.Find("Tooltips").gameObject;
var newrect = newtool.GetComponent<RectTransform>();
newrect.anchorMin = new Vector2(0.5f, 1);
newrect.anchorMax = new Vector2(0.5f, 1);
newrect.pivot = new Vector2(0.5f, 1);
newrect.anchoredPosition = new Vector2(0, -50);
//newrect.transform.localPosition = newrect.GetTruePosition(new Vector2(0, -50));
// -16 -66 0 -50
#endif
outline = this.GetComponent<Outline>();
if (mType == Type.Border && outline == null)
{
outline = this.gameObject.AddComponent<Outline>();
outline.effectDistance = new Vector2(2, 2);
}
//设置光标
//cursor = Resources.Load<Texture2D>("Images/PointerButtonHover");
@@ -75,7 +86,6 @@ namespace Assets.Scripts.UI.Control
}
}
tooltips.SetActive(false);
mButton = this.GetComponent<Button>();
InitColor();