Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
UIButtonList.cs
Go to the documentation of this file.
1using System;
2using UnityEngine;
3
4public class UIButtonList : UIListEx<UIButton>
5{
6 public override void OnInstantiate(RefObjectEx o, UIButton t)
7 {
8 t.mainText.text = o.text;
9 }
10
11 public void AddButton(object obj, string text, Action onClick, Action<UIButton> onInstantiate = null)
12 {
13 Add(new RefObjectEx
14 {
15 obj = obj,
16 text = text,
17 onClick = onClick,
18 onInstantiate = onInstantiate
19 });
20 }
21
22 public new void Select(object obj, bool invoke = false)
23 {
24 for (int i = 0; i < items.Count; i++)
25 {
26 RefObject refObject = (RefObject)items[i];
27 if (obj.Equals(refObject.obj))
28 {
29 base.Select(i, invoke);
30 return;
31 }
32 }
33 Debug.Log(obj?.ToString() + obj.GetType());
34 }
35}
list. Add(item3)
void AddButton(object obj, string text, Action onClick, Action< UIButton > onInstantiate=null)
Definition: UIButtonList.cs:11
override void OnInstantiate(RefObjectEx o, UIButton t)
Definition: UIButtonList.cs:6
new void Select(object obj, bool invoke=false)
Definition: UIButtonList.cs:22