Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
ContentChronicle.cs
Go to the documentation of this file.
2{
3 public UIList list;
4
5 public override void OnSwitchContent(int idTab)
6 {
7 list.callbacks = new UIList.Callback<MsgLog.Data, UIItem>
8 {
9 onInstantiate = delegate(MsgLog.Data a, UIItem b)
10 {
11 b.text1.text = a.text;
12 if (!a.col.IsEmpty())
13 {
14 b.text1.SetColor(a.col.ToEnum<FontColor>());
15 }
16 }
17 };
18 list.Clear();
19 foreach (MsgLog.Data item in EClass.game.log.GetList())
20 {
21 list.Add(item);
22 }
23 list.Refresh();
24 this.RebuildLayout(recursive: true);
25 }
26}
FontColor
Definition: FontColor.cs:2
override void OnSwitchContent(int idTab)
Definition: EClass.cs:5
static Game game
Definition: EClass.cs:8
MsgLog log
Definition: Game.cs:185
Definition: MsgLog.cs:7
List< Data > GetList(bool reverse=false)
Definition: MsgLog.cs:80
Definition: UIItem.cs:5
UIText text1
Definition: UIItem.cs:6
Definition: UIList.cs:9
override void Clear()
Definition: UIList.cs:349
override void Add(object item)
Definition: UIList.cs:302
virtual void Refresh(bool highlightLast=false)
Definition: UIList.cs:424
void SetColor(FontColor c)
Definition: UIText.cs:234