Elin Decompiled Documentation EA 23.272 Nightly
Loading...
Searching...
No Matches
ListOwner.cs
Go to the documentation of this file.
1using System;
2
3public class ListOwner<T1, T2> : ListOwner
4{
5 public virtual void OnClick(T1 a, T2 b)
6 {
7 }
8
9 public virtual void OnInstantiate(T1 a, T2 b)
10 {
11 }
12
13 public virtual void OnList()
14 {
15 }
16}
17public class ListOwner : EClass
18{
19 public Layer layer;
20
21 public Window window;
22
24
26
27 public UIList list;
28
30
32
33 public string textTab;
34
35 public string textHeader;
36
37 public bool main;
38
39 public int index;
40
41 public Func<string> funcHeader;
42
44 {
45 get
46 {
47 if (!main)
48 {
49 return other;
50 }
51 return this;
52 }
53 }
54
55 public virtual string IdTitle => GetType().Name;
56
57 public virtual string IdHeaderRow => null;
58
59 public virtual string TextTab => textTab.lang();
60
61 public virtual string TextHeader
62 {
63 get
64 {
65 if (funcHeader == null)
66 {
67 if (!textHeader.IsEmpty())
68 {
69 return textHeader.lang();
70 }
71 return "";
72 }
73 return funcHeader();
74 }
75 }
76
77 public virtual void List()
78 {
79 }
80
81 public virtual void OnCreate()
82 {
83 }
84
85 public virtual void OnSwitchContent()
86 {
87 List();
89 if (Lang.GetList(IdTitle) != null)
90 {
92 }
94 }
95
96 public void RefreshCaption()
97 {
98 if (!TextHeader.IsEmpty())
99 {
101 }
102 }
103
104 public virtual void OnRefreshMenu()
105 {
108 }
109
110 public void RefreshTab()
111 {
112 tab.button.mainText.SetText(TextTab);
113 }
114
115 public void MoveToOther(object c)
116 {
118 other.List();
119 list.RebuildLayoutTo(layer);
120 SE.Resource();
123 }
124}
Definition: EClass.cs:6
Definition: Lang.cs:6
static string[] GetList(string id)
Definition: Lang.cs:114
Definition: Layer.cs:9
Window.Setting.Tab tab
Definition: ListOwner.cs:31
virtual void List()
Definition: ListOwner.cs:77
virtual void OnList()
Definition: ListOwner.cs:13
ListOwner Main
Definition: ListOwner.cs:44
int index
Definition: ListOwner.cs:39
void MoveToOther(object c)
Definition: ListOwner.cs:115
ListOwner other
Definition: ListOwner.cs:25
virtual void OnInstantiate(T1 a, T2 b)
Definition: ListOwner.cs:9
void RefreshTab()
Definition: ListOwner.cs:110
virtual void OnSwitchContent()
Definition: ListOwner.cs:85
virtual string TextTab
Definition: ListOwner.cs:59
Func< string > funcHeader
Definition: ListOwner.cs:41
string textHeader
Definition: ListOwner.cs:35
UIList list
Definition: ListOwner.cs:27
Layer layer
Definition: ListOwner.cs:19
string textTab
Definition: ListOwner.cs:33
virtual void OnCreate()
Definition: ListOwner.cs:81
WindowMenu menu
Definition: ListOwner.cs:29
virtual void OnClick(T1 a, T2 b)
Definition: ListOwner.cs:5
void RefreshCaption()
Definition: ListOwner.cs:96
virtual string IdHeaderRow
Definition: ListOwner.cs:57
Window window
Definition: ListOwner.cs:21
virtual string IdTitle
Definition: ListOwner.cs:55
bool main
Definition: ListOwner.cs:37
UIMultiList multi
Definition: ListOwner.cs:23
virtual void OnRefreshMenu()
Definition: ListOwner.cs:104
virtual string TextHeader
Definition: ListOwner.cs:62
Definition: UIList.cs:9
void RemoveDynamic(object item)
Definition: UIList.cs:387
void Clear()
Definition: WindowMenu.cs:44
Definition: Window.cs:13
WindowMenu menuRight
Definition: Window.cs:709
void SetCaption(string text)
Definition: Window.cs:1289
WindowMenu menuLeft
Definition: Window.cs:700
void SetTitles(string langList, string idHeaderRow=null)
Definition: Window.cs:1262