少年修仙传客户端代码仓库
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
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
 
 
}