using vnxbqy.UI;
|
using System.Collections.Generic;
|
using System.Linq;
|
using UnityEngine;
|
using UnityEngine.UI;
|
|
class CharmSourceWin : ILWindow
|
{
|
|
Button closeBtn;
|
Text sourceTxt;
|
|
|
|
|
#region Built-in
|
protected override void BindController()
|
{
|
closeBtn = proxy.GetWidgtEx<Button>("Btn_Close");
|
sourceTxt = proxy.GetWidgtEx<Text>("source");
|
|
}
|
|
protected override void AddListeners()
|
{
|
closeBtn.SetListener(() => {
|
WindowCenter.Instance.CloseIL<CharmSourceWin>();
|
});
|
|
}
|
|
protected override void OnPreOpen()
|
{
|
string source = string.Empty;
|
var keyList = FlowerGiftModel.Instance.charmSourceDict.Keys.ToList();
|
for (int i = 0; i < keyList.Count; i++)
|
{
|
source = source + Language.Get("CharmSource", keyList[i], FlowerGiftModel.Instance.charmSourceDict[keyList[i]]);
|
}
|
|
sourceTxt.text = source;
|
}
|
|
|
#endregion
|
|
|
}
|