22 lines
484 B
C#
22 lines
484 B
C#
using UnityEngine.UI;
|
|
using TMPro;
|
|
using UnityEngine;
|
|
|
|
public class ToolInfoTips : MonoBehaviour
|
|
{
|
|
public TextMeshProUGUI itemText;
|
|
public RectTransform bg;
|
|
public void ShowTips(string Item, Vector3 pos)
|
|
{
|
|
gameObject.SetActive(true);
|
|
itemText.text = Item;
|
|
GetComponent<RectTransform>().position = pos;
|
|
Utilitys.AdjustImageWidth(itemText, bg, 30, 52);
|
|
}
|
|
|
|
public void HideTips()
|
|
{
|
|
gameObject.SetActive(false);
|
|
}
|
|
|
|
} |