Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
UIList.Callback< T1, T2 > Class Template Reference
Inheritance diagram for UIList.Callback< T1, T2 >:
UIList.ICallback

Public Member Functions

void SetList (UIList _list)
 
void CreateMold ()
 
Component GetMold ()
 
Component Instantiate (object obj, Transform parent)
 
void OnClick (object obj, Component button)
 
void OnList (SortMode mode)
 
void OnRedraw (object obj, Component c, int index)
 
int OnSort (object obj, SortMode mode)
 
void OnRefresh ()
 
Component GetComponent (Transform t)
 
Component GetComponent (Transform t)
 
void SetList (UIList list)
 
void CreateMold ()
 
Component Instantiate (object obj, Transform parent)
 
Component GetMold ()
 
void OnClick (object obj, Component button)
 
void OnRedraw (object obj, Component button, int index)
 
void OnList (SortMode mode)
 
int OnSort (object obj, SortMode mode)
 
void OnRefresh ()
 

Public Attributes

Action< T1, T2 > onInstantiate
 
Action< T1, T2 > onClick
 
Action< T1, T2, int > onRedraw
 
Action< SortModeonList
 
Func< T1, SortMode, int > onSort
 
Action onRefresh
 
T2 mold
 
UIList list
 

Properties

bool useSort [get]
 
bool useOnClick [get]
 
- Properties inherited from UIList.ICallback
bool useSort [get]
 
bool useOnClick [get]
 

Detailed Description

Type Constraints
T2 :Component 

Definition at line 52 of file UIList.cs.

Member Function Documentation

◆ CreateMold()

void UIList.Callback< T1, T2 >.CreateMold ( )
inline

Implements UIList.ICallback.

Definition at line 79 of file UIList.cs.

80 {
81 if (!mold)
82 {
83 mold = list.GetMold<T2>();
84 }
85 }
UIList list
Definition: UIList.cs:68

References UIList.Callback< T1, T2 >.list, and UIList.Callback< T1, T2 >.mold.

◆ GetComponent()

Component UIList.Callback< T1, T2 >.GetComponent ( Transform  t)
inline

Implements UIList.ICallback.

Definition at line 149 of file UIList.cs.

150 {
151 return t.GetComponent<T2>();
152 }

◆ GetMold()

Component UIList.Callback< T1, T2 >.GetMold ( )
inline

Implements UIList.ICallback.

Definition at line 87 of file UIList.cs.

88 {
89 return mold;
90 }

References UIList.Callback< T1, T2 >.mold.

◆ Instantiate()

Component UIList.Callback< T1, T2 >.Instantiate ( object  obj,
Transform  parent 
)
inline

Implements UIList.ICallback.

Definition at line 92 of file UIList.cs.

93 {
94 T2 val = (list.usePool ? PoolManager.Spawn(mold) : UnityEngine.Object.Instantiate(mold));
95 val.SetActive(enable: true);
96 val.transform.SetParent(parent, worldPositionStays: false);
98 {
99 UIButton uIButton = (val as UIButton) ?? (val as UIItem)?.button1;
100 if ((bool)uIButton)
101 {
102 uIButton.instantClick = false;
103 }
104 }
105 if (onInstantiate != null)
106 {
107 onInstantiate((T1)obj, val);
108 }
109 return val;
110 }
static Transform Spawn(string id, string path, Transform parent)
Definition: PoolManager.cs:86
Definition: UIItem.cs:5
Action< T1, T2 > onInstantiate
Definition: UIList.cs:54
bool disableInstaClick
Definition: UIList.cs:223
UIList parent
Definition: UIList.cs:261

References UIList.disableInstaClick, UIList.Callback< T1, T2 >.list, UIList.Callback< T1, T2 >.mold, UIList.Callback< T1, T2 >.onInstantiate, UIList.parent, and PoolManager.Spawn().

◆ OnClick()

void UIList.Callback< T1, T2 >.OnClick ( object  obj,
Component  button 
)
inline

Implements UIList.ICallback.

Definition at line 112 of file UIList.cs.

113 {
114 if (onClick != null)
115 {
116 onClick((T1)obj, (T2)button);
117 }
118 }
Action< T1, T2 > onClick
Definition: UIList.cs:56

References UIList.Callback< T1, T2 >.onClick.

◆ OnList()

void UIList.Callback< T1, T2 >.OnList ( SortMode  mode)
inline

Implements UIList.ICallback.

Definition at line 120 of file UIList.cs.

121 {
122 if (onList != null)
123 {
124 onList(mode);
125 }
126 }
Action< SortMode > onList
Definition: UIList.cs:60

References UIList.Callback< T1, T2 >.onList.

◆ OnRedraw()

void UIList.Callback< T1, T2 >.OnRedraw ( object  obj,
Component  c,
int  index 
)
inline

Implements UIList.ICallback.

Definition at line 128 of file UIList.cs.

129 {
130 if (onRedraw != null)
131 {
132 onRedraw((T1)obj, (T2)c, index);
133 }
134 }
Action< T1, T2, int > onRedraw
Definition: UIList.cs:58

References UIList.Callback< T1, T2 >.onRedraw.

◆ OnRefresh()

void UIList.Callback< T1, T2 >.OnRefresh ( )
inline

Implements UIList.ICallback.

Definition at line 141 of file UIList.cs.

142 {
143 if (onRefresh != null)
144 {
145 onRefresh();
146 }
147 }
Action onRefresh
Definition: UIList.cs:64

References UIList.Callback< T1, T2 >.onRefresh.

◆ OnSort()

int UIList.Callback< T1, T2 >.OnSort ( object  obj,
SortMode  mode 
)
inline

Implements UIList.ICallback.

Definition at line 136 of file UIList.cs.

137 {
138 return onSort((T1)obj, mode);
139 }
Func< T1, SortMode, int > onSort
Definition: UIList.cs:62

References UIList.Callback< T1, T2 >.onSort.

◆ SetList()

void UIList.Callback< T1, T2 >.SetList ( UIList  _list)
inline

Implements UIList.ICallback.

Definition at line 74 of file UIList.cs.

75 {
76 list = _list;
77 }

References UIList.Callback< T1, T2 >.list.

Member Data Documentation

◆ list

◆ mold

◆ onClick

Action<T1, T2> UIList.Callback< T1, T2 >.onClick

Definition at line 56 of file UIList.cs.

Referenced by UIList.Callback< T1, T2 >.OnClick().

◆ onInstantiate

Action<T1, T2> UIList.Callback< T1, T2 >.onInstantiate

Definition at line 54 of file UIList.cs.

Referenced by UIList.Callback< T1, T2 >.Instantiate().

◆ onList

Action<SortMode> UIList.Callback< T1, T2 >.onList

Definition at line 60 of file UIList.cs.

Referenced by UIList.Callback< T1, T2 >.OnList().

◆ onRedraw

Action<T1, T2, int> UIList.Callback< T1, T2 >.onRedraw

Definition at line 58 of file UIList.cs.

Referenced by UIList.Callback< T1, T2 >.OnRedraw().

◆ onRefresh

Action UIList.Callback< T1, T2 >.onRefresh

Definition at line 64 of file UIList.cs.

Referenced by UIList.Callback< T1, T2 >.OnRefresh().

◆ onSort

Func<T1, SortMode, int> UIList.Callback< T1, T2 >.onSort

Definition at line 62 of file UIList.cs.

Referenced by UIList.Callback< T1, T2 >.OnSort().

Property Documentation

◆ useOnClick

bool UIList.Callback< T1, T2 >.useOnClick
get

Implements UIList.ICallback.

Definition at line 72 of file UIList.cs.

◆ useSort

bool UIList.Callback< T1, T2 >.useSort
get

Implements UIList.ICallback.

Definition at line 70 of file UIList.cs.


The documentation for this class was generated from the following file: