Files
MinFt/Client/Assets/Scripts/UI/Tips/EventInfoPopupPanelTitle.cs
Liubing\LB 3d8d4d18f3 first commit
先修复一下,错误的场景

删除不必要的钓场资产

修复into场景

update:更新meta文件,修复报错

update:修复资源

修复第一章节建造

修复建造第三章

update:删除多余内容

update:更新README.md

update:还原图标

update:更新README

update:更新配置
2026-04-28 02:17:22 +08:00

41 lines
1.3 KiB
C#
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
using asap.core;
using cfg;
using GameCore;
using TMPro;
using UnityEngine;
using UnityEngine.UI;
public class EventInfoPopupPanelTitle : MonoBehaviour
{
public int eventItemID;
public string infoTextKey = "UI_EventSandDigPanel_4";
public string tipsTextKey = "UI_EventSandDigPanel_7";
public Image icon;
public TMP_Text text_info;
public TMP_Text text_tips;
private void Reset()
{
text_info = transform.Find("root/info1/text_info").GetComponent<TMP_Text>();
text_tips = transform.Find("root/text_tips").GetComponent<TMP_Text>();
}
protected virtual void Start()
{
Tables tables = GContext.container.Resolve<Tables>();
Item item = tables.TbItem.GetOrDefault(eventItemID);
if (item == null)
{
#if UNITY_EDITOR
Debug.LogError($"见大你填错了{gameObject.name},没有这个代币 eventItemID {eventItemID}");
#endif
return;
}
if(icon)
GContext.container.Resolve<IUIService>().SetImageSprite(icon, item.Icon);
string itemName = LocalizationMgr.GetText(item.Name_l10n_key);
if(text_info)
text_info.text = LocalizationMgr.GetFormatTextValue(infoTextKey, itemName);
if(text_tips)
text_tips.text = LocalizationMgr.GetFormatTextValue(tipsTextKey, itemName);
}
}