Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
UIMultiList.cs
Go to the documentation of this file.
1using System.Collections.Generic;
2using UnityEngine;
3
4public class UIMultiList : MonoBehaviour
5{
6 public List<ListOwner> owners = new List<ListOwner>();
7
8 public Layer layer;
9
10 public Window[] windows;
11
12 public UIList[] lists;
13
14 public UIHeader[] headers;
15
16 public bool Double;
17
18 public bool addTab;
19
20 public void Clear()
21 {
22 owners.Clear();
23 }
24
25 public void AddOwner(int i, ListOwner o)
26 {
27 o.index = owners.Count;
28 owners.Add(o);
29 o.layer = layer;
30 o.window = windows[i];
31 o.list = lists[i];
32 o.multi = this;
33 o.main = i == 0;
34 if (!Double && addTab)
35 {
36 o.tab = o.window.AddTab(o.TextTab);
37 }
38 o.OnCreate();
39 }
40
41 public void Build(UIList.SortMode m = UIList.SortMode.ByNone)
42 {
43 foreach (ListOwner owner in owners)
44 {
45 owner.list.sortMode = m;
46 }
47 if (Double)
48 {
49 owners[0].other = owners[1];
50 owners[1].other = owners[0];
51 }
52 }
53
54 public void Refresh()
55 {
56 foreach (ListOwner owner in owners)
57 {
58 owner.OnSwitchContent();
59 }
60 }
61}
Definition: Layer.cs:9
virtual void OnSwitchContent()
Definition: ListOwner.cs:77
virtual string TextTab
Definition: ListOwner.cs:55
virtual void OnCreate()
Definition: ListOwner.cs:73
Window window
Definition: ListOwner.cs:19
Definition: UIList.cs:9
SortMode
Definition: UIList.cs:27
void AddOwner(int i, ListOwner o)
Definition: UIMultiList.cs:25
void Clear()
Definition: UIMultiList.cs:20
Layer layer
Definition: UIMultiList.cs:8
Window[] windows
Definition: UIMultiList.cs:10
List< ListOwner > owners
Definition: UIMultiList.cs:6
UIHeader[] headers
Definition: UIMultiList.cs:14
void Refresh()
Definition: UIMultiList.cs:54
UIList[] lists
Definition: UIMultiList.cs:12
void Build(UIList.SortMode m=UIList.SortMode.ByNone)
Definition: UIMultiList.cs:41
Definition: Window.cs:13
Setting.Tab AddTab(string idLang, UIContent content=null, Action action=null, Sprite sprite=null, string langTooltip=null)
Definition: Window.cs:1443