2025-10-03 00:31:34 +08:00
|
|
|
using Data;
|
|
|
|
|
using Managers;
|
|
|
|
|
using TMPro;
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
using UnityEngine.UI;
|
|
|
|
|
|
|
|
|
|
namespace UI
|
|
|
|
|
{
|
2025-10-10 14:08:23 +08:00
|
|
|
public class MapViewUI : MonoBehaviour
|
2025-10-03 00:31:34 +08:00
|
|
|
{
|
|
|
|
|
public TMP_Text text;
|
|
|
|
|
public Image icon;
|
|
|
|
|
public DimensionDef DimensionDefine;
|
|
|
|
|
|
|
|
|
|
public void Init(DimensionDef dimensionDef)
|
|
|
|
|
{
|
|
|
|
|
if (dimensionDef == null) return;
|
|
|
|
|
text.text = $"<color=yellow>{dimensionDef.label}</color>\n{dimensionDef.description}";
|
|
|
|
|
if (!string.IsNullOrEmpty(dimensionDef.icon))
|
|
|
|
|
icon.sprite = PackagesImageManager.Instance.GetSprite(dimensionDef.icon);
|
2025-10-10 14:08:23 +08:00
|
|
|
DimensionDefine = dimensionDef;
|
2025-10-03 00:31:34 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|