Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
LayerDistribution.cs
Go to the documentation of this file.
2{
3 public Card container;
4
5 public UIList list;
6
8
9 public void SetContainer(Card t, Window.SaveData d)
10 {
11 container = t;
12 data = d;
13 list.callbacks = new UIList.Callback<SourceCategory.Row, ButtonCategory>
14 {
15 onClick = delegate(SourceCategory.Row a, ButtonCategory b)
16 {
17 if (a.children.Count > 0)
18 {
19 b.buttonFold.onClick.Invoke();
20 }
21 },
22 onInstantiate = delegate(SourceCategory.Row a, ButtonCategory b)
23 {
24 b.mainText.text = a.GetName().ToTitleCase();
25 b.SetFold(a.children.Count > 0, a.parent == null, delegate(UIList l)
26 {
27 foreach (SourceCategory.Row child in a.children)
28 {
29 l.Add(child);
30 }
31 });
32 },
33 onRefresh = null
34 };
35 foreach (SourceCategory.Row row in ELayer.sources.categories.rows)
36 {
37 if (row.parent == null && row.id != "new" && row.id != "none")
38 {
39 list.Add(row);
40 }
41 }
42 list.Refresh();
43 }
44}
UIButton buttonFold
void SetFold(bool show, bool folded)
Definition: Card.cs:11
Definition: ELayer.cs:4
static SourceManager sources
Definition: ELayer.cs:37
Window.SaveData data
void SetContainer(Card t, Window.SaveData d)
List< Row > children
SourceCategory categories
Definition: UIList.cs:9
override void Add(object item)
Definition: UIList.cs:302
virtual void Refresh(bool highlightLast=false)
Definition: UIList.cs:424
Definition: Window.cs:13