Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
ButtonCategory.cs
Go to the documentation of this file.
1using System;
2using UnityEngine;
3using UnityEngine.UI;
4
5public class ButtonCategory : UIButton
6{
8
10
11 public Sprite spriteFold;
12
13 public Sprite spriteUnfold;
14
15 public Toggle toggle;
16
17 public bool isFolded;
18
19 public int uid;
20
21 public void SetFold(bool show, bool folded)
22 {
23 buttonFold.SetActive(show);
24 buttonFold.icon.sprite = (folded ? spriteFold : spriteUnfold);
25 isFolded = folded;
26 }
27
28 public void SetFold(bool show, bool folded, Action<UIList> action)
29 {
30 isFolded = folded;
31 buttonFold.SetActive(show);
32 buttonFold.icon.sprite = (folded ? spriteFold : spriteUnfold);
33 if (!show)
34 {
35 return;
36 }
37 buttonFold.onClick.AddListener(delegate
38 {
39 SetFold(show: true, GetComponentInParent<UIList>().OnClickFolder(this, delegate(UIList l)
40 {
41 action(l);
42 }));
43 });
44 if (!folded)
45 {
46 GetComponentInParent<UIList>().OnClickFolder(this, delegate(UIList l)
47 {
48 action(l);
49 }, refresh: false);
50 }
51 }
52}
UIButton buttonFold
void SetFold(bool show, bool folded, Action< UIList > action)
UIButton buttonToggle
void SetFold(bool show, bool folded)
void Toggle()
Definition: UIButton.cs:322
Definition: UIList.cs:9