Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
UIList.cs
Go to the documentation of this file.
1using System;
2using System.Collections;
3using System.Collections.Generic;
4using System.Linq;
5using UnityEngine;
6using UnityEngine.UI;
7
8public class UIList : BaseList
9{
10 public class RefObject
11 {
12 public object obj;
13 }
14
15 public enum BGType
16 {
17 none,
18 stripe,
19 line,
20 dot,
22 grid,
23 thin
24 }
25
26 public enum SortMode
27 {
28 ByNone,
30 ByValue,
32 ByEquip,
33 ByJob,
34 ByRace,
35 ByLevel,
37 ByPrice,
39 ByName,
40 ByID,
42 ByWorkk,
43 ByFeat
44 }
45
46 public enum ItemHeight
47 {
50 }
51
52 public class Callback<T1, T2> : ICallback where T2 : Component
53 {
54 public Action<T1, T2> onInstantiate;
55
56 public Action<T1, T2> onClick;
57
58 public Action<T1, T2, int> onRedraw;
59
60 public Action<SortMode> onList;
61
62 public Func<T1, SortMode, int> onSort;
63
64 public Action onRefresh;
65
66 public T2 mold;
67
68 public UIList list;
69
70 public bool useSort => onSort != null;
71
72 public bool useOnClick => onClick != null;
73
74 public void SetList(UIList _list)
75 {
76 list = _list;
77 }
78
79 public void CreateMold()
80 {
81 if (!mold)
82 {
83 mold = list.GetMold<T2>();
84 }
85 }
86
87 public Component GetMold()
88 {
89 return mold;
90 }
91
92 public Component Instantiate(object obj, Transform parent)
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 }
111
112 public void OnClick(object obj, Component button)
113 {
114 if (onClick != null)
115 {
116 onClick((T1)obj, (T2)button);
117 }
118 }
119
120 public void OnList(SortMode mode)
121 {
122 if (onList != null)
123 {
124 onList(mode);
125 }
126 }
127
128 public void OnRedraw(object obj, Component c, int index)
129 {
130 if (onRedraw != null)
131 {
132 onRedraw((T1)obj, (T2)c, index);
133 }
134 }
135
136 public int OnSort(object obj, SortMode mode)
137 {
138 return onSort((T1)obj, mode);
139 }
140
141 public void OnRefresh()
142 {
143 if (onRefresh != null)
144 {
145 onRefresh();
146 }
147 }
148
149 public Component GetComponent(Transform t)
150 {
151 return t.GetComponent<T2>();
152 }
153 }
154
155 public interface ICallback
156 {
157 bool useSort { get; }
158
159 bool useOnClick { get; }
160
161 Component GetComponent(Transform t);
162
163 void SetList(UIList list);
164
166
167 Component Instantiate(object obj, Transform parent);
168
169 Component GetMold();
170
171 void OnClick(object obj, Component button);
172
173 void OnRedraw(object obj, Component button, int index);
174
175 void OnList(SortMode mode);
176
177 int OnSort(object obj, SortMode mode);
178
179 void OnRefresh();
180 }
181
182 public struct ButtonPair
183 {
184 public Component component;
185
186 public object obj;
187 }
188
189 public string langNoItem;
190
191 public int rows;
192
194
196
197 public bool fillEmpty;
198
199 public bool buildLayout;
200
202
204
206
207 public LayoutGroup _layoutItems;
208
209 public Transform moldItem;
210
211 public bool selectFirst;
212
213 public bool invokeSelected;
214
215 public bool enableGroup = true;
216
218
219 public bool usePage;
220
221 public bool usePool;
222
223 public bool disableInstaClick = true;
224
225 public bool ignoreNullObj = true;
226
228
229 public int heightFix;
230
231 [NonSerialized]
232 public int page;
233
234 [NonSerialized]
235 public int maxPage;
236
237 [NonSerialized]
238 public int itemsPerPage;
239
240 [NonSerialized]
241 public List<object> items = new List<object>();
242
243 [NonSerialized]
244 public List<ButtonPair> buttons = new List<ButtonPair>();
245
246 [NonSerialized]
247 public string idMold;
248
249 public Action SETab = delegate
250 {
251 };
252
253 public const int HeightDefault = 34;
254
255 private bool initialized;
256
257 private bool reset;
258
260
262
263 public Dictionary<UIButton, UIList> children = new Dictionary<UIButton, UIList>();
264
265 public static string[] strNumber = new string[26]
266 {
267 "a", "b", "c", "d", "e", "f", "g", "h", "i", "j",
268 "k", "l", "m", "n", "o", "p", "q", "r", "s", "t",
269 "u", "v", "w", "x", "y", "z"
270 };
271
272 private int highlightIndex;
273
274 public LayoutGroup layoutItems => _layoutItems ?? (_layoutItems = GetComponent<LayoutGroup>());
275
276 public GridLayoutGroup gridLayout => layoutItems as GridLayoutGroup;
277
278 public override int ItemCount => items.Count;
279
280 public override int RowCount => items.Count;
281
283 {
284 get
285 {
286 if (!parent)
287 {
288 return this;
289 }
290 return parent.Root;
291 }
292 }
293
294 public void AddCollection(ICollection collection)
295 {
296 foreach (object item in collection)
297 {
298 Add(item);
299 }
300 }
301
302 public override void Add(object item)
303 {
304 if (item != null || !ignoreNullObj)
305 {
306 items.Add(item);
307 }
308 }
309
310 public int GetIndexOf(object item)
311 {
312 return items.IndexOf(item);
313 }
314
315 public ButtonPair GetPair(object item)
316 {
317 foreach (ButtonPair button in buttons)
318 {
319 if (button.obj == item)
320 {
321 return button;
322 }
323 }
324 return buttons[0];
325 }
326
327 public T GetPair<T>(object item) where T : Component
328 {
329 return GetPair(item).component as T;
330 }
331
332 public void AddDynamic(object item)
333 {
334 }
335
336 public void RemoveDynamic(object item)
337 {
338 BaseCore.Instance.StopEventSystem(GetPair(item).component, delegate
339 {
340 items.Remove(item);
341 ButtonPair item2 = buttons.First((ButtonPair a) => a.obj == item);
342 buttons.IndexOf(item2);
343 buttons.Remove(item2);
344 UnityEngine.Object.DestroyImmediate(item2.component.gameObject);
345 AfterRefresh();
346 });
347 }
348
349 public override void Clear()
350 {
351 items.Clear();
352 reset = true;
353 }
354
356 {
357 UIList uIList = Util.Instantiate(moldList, layoutItems);
358 uIList.transform.SetSiblingIndex(button.transform.GetSiblingIndex() + 1);
359 uIList.callbacks = callbacks;
360 uIList.parent = this;
361 children.Add(button, uIList);
362 return uIList;
363 }
364
365 public bool OnClickFolder(UIButton b, Action<UIList> onFold, bool refresh = true)
366 {
367 if (children.ContainsKey(b))
368 {
369 RemoveChild(b);
370 return true;
371 }
372 UIList uIList = CreateChild(b);
373 onFold(uIList);
374 uIList.Refresh();
375 if (refresh)
376 {
377 GetComponentInParent<ScrollRect>().RebuildLayout(recursive: true);
378 }
379 return false;
380 }
381
382 private void RemoveChild(UIButton button)
383 {
384 children[button].KillChildren();
385 children.Remove(button);
387 GetComponentInParent<ScrollRect>().RebuildLayout(recursive: true);
388 }
389
390 private void KillChildren()
391 {
392 foreach (UIList value in children.Values)
393 {
394 value.KillChildren();
395 }
396 UnityEngine.Object.DestroyImmediate(base.gameObject);
397 }
398
400 {
401 this.RebuildLayout();
402 if ((bool)parent)
403 {
404 parent.RebuildLayout();
405 }
406 else
407 {
408 base.transform.parent.RebuildLayout();
409 }
410 }
411
412 private void OnSelect(UIList activeList)
413 {
414 foreach (UIList value in children.Values)
415 {
416 value.OnSelect(activeList);
417 }
418 if (this != activeList)
419 {
420 group.Select(-1);
421 }
422 }
423
424 public virtual void Refresh(bool highlightLast = false)
425 {
426 if (!layoutItems)
427 {
428 return;
429 }
431 if (skinType != 0)
432 {
433 SkinManager.tempSkin = SkinManager.CurrentSkin.GetSkin(skinType);
434 }
435 highlightIndex = -1;
436 if (highlightLast)
437 {
438 UIButton componentOf = InputModuleEX.GetComponentOf<UIButton>();
439 if ((bool)componentOf)
440 {
441 Component component = componentOf.transform.parent.GetComponent<UIItem>();
442 if (component == null)
443 {
444 component = componentOf;
445 }
446 for (int i = 0; i < buttons.Count; i++)
447 {
448 if (buttons[i].component == component)
449 {
450 highlightIndex = i;
451 break;
452 }
453 }
454 }
455 }
456 callbacks.SetList(this);
457 if (!enableGroup && (bool)group)
458 {
459 UnityEngine.Object.DestroyImmediate(group);
460 }
461 if (!usePage)
462 {
463 maxPage = 9999999;
464 }
465 callbacks.CreateMold();
466 if (itemHeight == ItemHeight.Default)
467 {
468 RectTransform rectTransform = callbacks.GetMold().Rect();
469 rectTransform.sizeDelta = new Vector2(rectTransform.sizeDelta.x, 34 + heightFix);
470 }
471 if (!initialized || reset)
472 {
473 if (sortMode != 0)
474 {
475 Sort();
476 }
477 if (!initialized)
478 {
479 if ((bool)paginationTop && (bool)paginationTop.button1)
480 {
481 paginationTop.button1.onClick.AddListener(PrevPage);
482 paginationTop.button2.onClick.AddListener(NextPage);
483 }
484 if ((bool)paginationBottom && (bool)paginationBottom.button1)
485 {
486 paginationBottom.button1.onClick.AddListener(PrevPage);
487 paginationBottom.button2.onClick.AddListener(NextPage);
488 }
489 _ = (bool)bar;
490 }
491 initialized = true;
492 reset = false;
493 }
494 children.Clear();
495 buttons.Clear();
496 GridLayoutGroup gridLayoutGroup = layoutItems as GridLayoutGroup;
497 BuildLayout();
498 if (usePage)
499 {
500 if ((bool)gridLayoutGroup)
501 {
502 itemsPerPage = gridLayoutGroup.constraintCount;
503 }
504 else
505 {
507 }
508 this.Rect().RebuildLayout();
509 this.Rect().ForceUpdateRectTransforms();
510 Canvas.ForceUpdateCanvases();
511 float y = RectTransformUtility.PixelAdjustRect(this.Rect(), GetComponentInParent<Canvas>()).size.y;
512 float y2 = callbacks.GetMold().Rect().sizeDelta.y;
513 Debug.Log(y2);
514 Debug.Log(y);
515 itemsPerPage = (int)(y / y2);
516 }
517 else
518 {
519 itemsPerPage = 99999;
520 }
522 maxPage = (items.Count - 1) / itemsPerPage + 1;
523 if (usePage)
524 {
525 while (page > 0 && page * itemsPerPage >= items.Count)
526 {
527 page--;
528 }
529 }
530 for (int j = 0; j < itemsPerPage; j++)
531 {
532 int num = page * itemsPerPage + j;
533 if (num >= items.Count)
534 {
535 if (fillEmpty)
536 {
537 new GameObject().AddComponent<RectTransform>().SetParent(layoutItems.transform, worldPositionStays: false);
538 }
539 continue;
540 }
541 object item = items[num];
542 Component comp = callbacks.Instantiate(item, layoutItems.transform);
543 callbacks.OnRedraw(item, comp, j);
544 ButtonPair buttonPair = default(ButtonPair);
545 buttonPair.obj = item;
546 buttonPair.component = comp;
547 ButtonPair item2 = buttonPair;
548 UIButton uIButton = comp as UIButton;
549 if (!uIButton)
550 {
551 UIItem uIItem = comp as UIItem;
552 if ((bool)uIItem)
553 {
554 uIButton = uIItem.button1;
555 }
556 }
557 if ((bool)uIButton)
558 {
559 if (numbering && (bool)uIButton.keyText)
560 {
561 uIButton.keyText.text = strNumber[j % strNumber.Length];
562 }
563 uIButton.onClick.AddListener(delegate
564 {
565 Root.OnSelect(this);
566 callbacks.OnClick(item, comp);
567 });
568 if (highlightIndex == j)
569 {
570 uIButton.DoHighlightTransition();
571 }
572 }
573 buttons.Add(item2);
574 }
575 AfterRefresh();
576 if ((bool)group)
577 {
579 }
581 {
582 UIButton componentInChildren = layoutItems.GetComponentInChildren<UIButton>();
583 if ((bool)componentInChildren)
584 {
585 componentInChildren.onClick.Invoke();
586 }
587 }
588 isBuilt = true;
589 SkinManager.tempSkin = tempSkin;
590 }
591
592 private void AfterRefresh()
593 {
595 if ((bool)paginationTop)
596 {
597 paginationTop.text1.text = page + 1 + " / " + maxPage;
598 }
599 if ((bool)paginationBottom)
600 {
601 paginationBottom.text1.text = page + 1 + " / " + maxPage;
602 }
604 OnRefresh();
605 layoutItems.RebuildLayout();
607 }
608
609 protected virtual void OnRefresh()
610 {
611 }
612
613 public void NextPage()
614 {
615 SetPage(page + 1);
616 }
617
618 public void PrevPage()
619 {
620 SetPage(page - 1);
621 }
622
623 public void SetPage(int i)
624 {
625 if (i < 0)
626 {
627 i = maxPage - 1;
628 }
629 else if (i >= maxPage)
630 {
631 i = 0;
632 }
633 page = i;
634 Refresh();
635 }
636
637 public void OnMove(object o, object select = null)
638 {
639 List();
640 Select(select ?? o);
641 SE.Click();
642 }
643
644 public void Select(int index = 0, bool invoke = false)
645 {
646 if (buttons.Count < 0)
647 {
648 return;
649 }
650 ButtonPair buttonPair = buttons[Mathf.Clamp(index, 0, buttons.Count - 1)];
651 UIButton uIButton = buttonPair.component as UIButton;
652 if (!uIButton)
653 {
654 uIButton = (buttonPair.component as UIItem)?.button1;
655 }
656 if ((bool)uIButton)
657 {
658 if (invoke)
659 {
660 uIButton.onClick.Invoke();
661 }
662 if ((bool)uIButton.group)
663 {
664 uIButton.group.Select(uIButton);
665 }
666 else
667 {
668 uIButton.DoHighlightTransition();
669 }
670 }
671 }
672
673 public void Select(object obj, bool invoke = false)
674 {
675 for (int i = 0; i < items.Count; i++)
676 {
677 if (obj == items[i])
678 {
679 Select(i, invoke);
680 break;
681 }
682 }
683 }
684
685 public void Select<T>(Func<T, bool> func, bool invoke = false)
686 {
687 for (int i = 0; i < items.Count; i++)
688 {
689 if (func((T)items[i]))
690 {
691 Select(i, invoke);
692 break;
693 }
694 }
695 }
696
697 public void Sort()
698 {
699 if (callbacks.useSort)
700 {
701 items.Sort((object a, object b) => callbacks.OnSort(b, sortMode) - callbacks.OnSort(a, sortMode));
702 }
703 }
704
705 public void ChangeSort(SortMode m)
706 {
707 sortMode = m;
708 Sort();
709 Refresh();
710 }
711
712 public override void NextSort()
713 {
714 ChangeSort(sorts.NextItem(sortMode));
715 }
716
717 public override void List()
718 {
719 List(sortMode);
720 }
721
722 public override void List(SortMode sort)
723 {
724 List(sort);
725 }
726
727 public void List(bool refreshHighlight = false)
728 {
729 List(sortMode, refreshHighlight);
730 }
731
732 public void List(SortMode m, bool refreshHighlight = false)
733 {
734 sortMode = m;
735 Clear();
736 callbacks.OnList(sortMode);
737 Refresh(refreshHighlight);
738 }
739
740 public override void Redraw()
741 {
742 if (onBeforeRedraw != null)
743 {
745 }
746 int num = 0;
747 foreach (ButtonPair button in buttons)
748 {
749 callbacks.OnRedraw(button.obj, button.component, num);
750 num++;
751 }
752 if (onAfterRedraw != null)
753 {
755 }
756 }
757
758 public void BuildLayout()
759 {
760 GridLayoutGroup gridLayoutGroup = layoutItems as GridLayoutGroup;
761 if ((bool)gridLayoutGroup && buildLayout)
762 {
763 RectTransform rectTransform = layoutItems.Rect();
764 RectTransform rectTransform2 = layoutItems.Rect();
765 Vector2 vector2 = (layoutItems.Rect().anchorMax = new Vector2(0f, 1f));
766 Vector2 pivot = (rectTransform2.anchorMin = vector2);
767 rectTransform.pivot = pivot;
768 rectTransform.sizeDelta = new Vector2(rectTransform.sizeDelta.x, (float)rows * gridLayoutGroup.cellSize.y);
769 }
770 }
771
772 public T GetMold<T>() where T : Component
773 {
774 if ((bool)moldItem)
775 {
776 T component = moldItem.GetComponent<T>();
777 if ((bool)component)
778 {
779 layoutItems.DestroyChildren();
780 return component;
781 }
782 }
783 return layoutItems.CreateMold<T>(idMold);
784 }
785
786 public void OnDestroy()
787 {
789 if ((bool)transNoItem)
790 {
791 UnityEngine.Object.DestroyImmediate(transNoItem.gameObject);
792 }
793 }
794
795 public void ClearChildren()
796 {
797 if (usePool)
798 {
799 foreach (ButtonPair button in buttons)
800 {
802 }
803 }
804 layoutItems.DestroyChildren();
805 }
806}
list. Refresh()
static BaseCore Instance
Definition: BaseCore.cs:11
virtual void StopEventSystem(float duration=0.2f)
Definition: BaseCore.cs:72
Transform transNoItem
Definition: BaseList.cs:25
void RefreshNoItem()
Definition: BaseList.cs:69
bool isBuilt
Definition: BaseList.cs:36
UIList.SortMode[] sorts
Definition: BaseList.cs:15
UIList.ICallback callbacks
Definition: BaseList.cs:13
bool numbering
Definition: BaseList.cs:23
Action onAfterRedraw
Definition: BaseList.cs:19
SkinType skinType
Definition: BaseList.cs:27
Action onBeforeRedraw
Definition: BaseList.cs:17
UIList.SortMode sortMode
Definition: BaseList.cs:33
void RefreshBGGrid()
Definition: BaseList.cs:89
static bool TryDespawn(Component c)
Definition: PoolManager.cs:143
static Transform Spawn(string id, string path, Transform parent)
Definition: PoolManager.cs:86
static SkinRootStatic CurrentSkin
Definition: SkinManager.cs:82
static SkinRootStatic tempSkin
Definition: SkinManager.cs:63
SkinRootStatic GetSkin(SkinType type)
void DoHighlightTransition(bool instant=false)
Definition: UIButton.cs:526
UIText keyText
Definition: UIButton.cs:108
UISelectableGroup group
Definition: UIButton.cs:126
Definition: UIItem.cs:5
UIButton button1
Definition: UIItem.cs:18
UIButton button2
Definition: UIItem.cs:20
bool useOnClick
Definition: UIList.cs:72
Action< T1, T2, int > onRedraw
Definition: UIList.cs:58
Action< T1, T2 > onInstantiate
Definition: UIList.cs:54
int OnSort(object obj, SortMode mode)
Definition: UIList.cs:136
void OnList(SortMode mode)
Definition: UIList.cs:120
void OnRefresh()
Definition: UIList.cs:141
Component GetComponent(Transform t)
Definition: UIList.cs:149
Component GetMold()
Definition: UIList.cs:87
Action onRefresh
Definition: UIList.cs:64
Func< T1, SortMode, int > onSort
Definition: UIList.cs:62
void OnClick(object obj, Component button)
Definition: UIList.cs:112
Component Instantiate(object obj, Transform parent)
Definition: UIList.cs:92
void SetList(UIList _list)
Definition: UIList.cs:74
void OnRedraw(object obj, Component c, int index)
Definition: UIList.cs:128
Action< SortMode > onList
Definition: UIList.cs:60
Action< T1, T2 > onClick
Definition: UIList.cs:56
UIList list
Definition: UIList.cs:68
void CreateMold()
Definition: UIList.cs:79
bool useSort
Definition: UIList.cs:70
object obj
Definition: UIList.cs:12
Definition: UIList.cs:9
T GetMold< T >()
Definition: UIList.cs:772
void BuildLayout()
Definition: UIList.cs:758
void Select< T >(Func< T, bool > func, bool invoke=false)
Definition: UIList.cs:685
bool disableInstaClick
Definition: UIList.cs:223
int maxPage
Definition: UIList.cs:235
ItemHeight itemHeight
Definition: UIList.cs:227
LayoutGroup layoutItems
Definition: UIList.cs:274
UIList CreateChild(UIButton button)
Definition: UIList.cs:355
List< ButtonPair > buttons
Definition: UIList.cs:244
void NextPage()
Definition: UIList.cs:613
override void List(SortMode sort)
Definition: UIList.cs:722
void OnSelect(UIList activeList)
Definition: UIList.cs:412
void List(bool refreshHighlight=false)
Definition: UIList.cs:727
void OnDestroy()
Definition: UIList.cs:786
UISelectableGroup group
Definition: UIList.cs:205
string langNoItem
Definition: UIList.cs:189
int GetIndexOf(object item)
Definition: UIList.cs:310
override int ItemCount
Definition: UIList.cs:278
bool OnClickFolder(UIButton b, Action< UIList > onFold, bool refresh=true)
Definition: UIList.cs:365
bool ignoreNullObj
Definition: UIList.cs:225
virtual void OnRefresh()
Definition: UIList.cs:609
string idMold
Definition: UIList.cs:247
GridLayoutGroup gridLayout
Definition: UIList.cs:276
List< object > items
Definition: UIList.cs:241
override void Clear()
Definition: UIList.cs:349
override void NextSort()
Definition: UIList.cs:712
bool invokeSelected
Definition: UIList.cs:213
UIItem paginationTop
Definition: UIList.cs:201
UIListTopbar bar
Definition: UIList.cs:195
ItemHeight
Definition: UIList.cs:47
int itemsPerPage
Definition: UIList.cs:238
bool selectFirst
Definition: UIList.cs:211
BGType
Definition: UIList.cs:16
bool usePool
Definition: UIList.cs:221
const int HeightDefault
Definition: UIList.cs:253
void Select(object obj, bool invoke=false)
Definition: UIList.cs:673
Dictionary< UIButton, UIList > children
Definition: UIList.cs:263
void RemoveDynamic(object item)
Definition: UIList.cs:336
void ClearChildren()
Definition: UIList.cs:795
void Select(int index=0, bool invoke=false)
Definition: UIList.cs:644
int rows
Definition: UIList.cs:191
override int RowCount
Definition: UIList.cs:280
bool fillEmpty
Definition: UIList.cs:197
void OnMove(object o, object select=null)
Definition: UIList.cs:637
void KillChildren()
Definition: UIList.cs:390
UIList parent
Definition: UIList.cs:261
void RebuildLayoutInParent()
Definition: UIList.cs:399
bool usePage
Definition: UIList.cs:219
int highlightIndex
Definition: UIList.cs:272
void SetPage(int i)
Definition: UIList.cs:623
bool onlyDirectChildrenButtonForGroup
Definition: UIList.cs:217
bool reset
Definition: UIList.cs:257
UISelectableGroup menu
Definition: UIList.cs:193
SortMode
Definition: UIList.cs:27
void RemoveChild(UIButton button)
Definition: UIList.cs:382
LayoutGroup _layoutItems
Definition: UIList.cs:207
override void Add(object item)
Definition: UIList.cs:302
bool initialized
Definition: UIList.cs:255
static string[] strNumber
Definition: UIList.cs:265
UIList moldList
Definition: UIList.cs:259
bool enableGroup
Definition: UIList.cs:215
T GetPair< T >(object item)
Definition: UIList.cs:327
UIItem paginationBottom
Definition: UIList.cs:203
void List(SortMode m, bool refreshHighlight=false)
Definition: UIList.cs:732
ButtonPair GetPair(object item)
Definition: UIList.cs:315
Action SETab
Definition: UIList.cs:249
Transform moldItem
Definition: UIList.cs:209
bool buildLayout
Definition: UIList.cs:199
void AddCollection(ICollection collection)
Definition: UIList.cs:294
virtual void Refresh(bool highlightLast=false)
Definition: UIList.cs:424
void AddDynamic(object item)
Definition: UIList.cs:332
void PrevPage()
Definition: UIList.cs:618
void ChangeSort(SortMode m)
Definition: UIList.cs:705
void Sort()
Definition: UIList.cs:697
override void Redraw()
Definition: UIList.cs:740
int page
Definition: UIList.cs:232
override void List()
Definition: UIList.cs:717
void AfterRefresh()
Definition: UIList.cs:592
int heightFix
Definition: UIList.cs:229
UIList Root
Definition: UIList.cs:283
void Select(UIButton button, bool check=true)
virtual void Init(int index=0, UnityAction< int > action=null, bool directChildren=false)
void OnList(SortMode mode)
int OnSort(object obj, SortMode mode)
bool useOnClick
Definition: UIList.cs:159
Component GetMold()
void SetList(UIList list)
void OnRedraw(object obj, Component button, int index)
Component GetComponent(Transform t)
void OnClick(object obj, Component button)
Component Instantiate(object obj, Transform parent)
Component component
Definition: UIList.cs:184