Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
UIListEx.cs
Go to the documentation of this file.
1using System;
2using UnityEngine;
3
4public class UIListEx<T> : UIList where T : Component
5{
6 public class RefObjectEx : RefObject
7 {
8 public Action onClick;
9
10 public Action<T> onInstantiate;
11
12 public string text;
13 }
14
15 public T mold;
16
17 public override void Refresh(bool highlightLast = false)
18 {
19 if (callbacks == null)
20 {
22 {
23 onClick = delegate(RefObjectEx a, T b)
24 {
25 if (a.onClick != null)
26 {
27 a.onClick();
28 }
29 },
30 onInstantiate = delegate(RefObjectEx a, T b)
31 {
32 OnInstantiate(a, b);
33 if (a.onInstantiate != null)
34 {
35 a.onInstantiate(b);
36 }
37 },
38 mold = mold
39 };
40 }
41 base.Refresh();
42 }
43
44 public virtual void OnInstantiate(RefObjectEx o, T t)
45 {
46 }
47}
UIList.ICallback callbacks
Definition: BaseList.cs:13
Action< T > onInstantiate
Definition: UIListEx.cs:10
override void Refresh(bool highlightLast=false)
Definition: UIListEx.cs:17
virtual void OnInstantiate(RefObjectEx o, T t)
Definition: UIListEx.cs:44
T mold
Definition: UIListEx.cs:15
Definition: UIList.cs:9