Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
ButtonCategory Class Reference
Inheritance diagram for ButtonCategory:
UIButton IUISkin

Public Member Functions

void SetFold (bool show, bool folded)
 
void SetFold (bool show, bool folded, Action< UIList > action)
 
- Public Member Functions inherited from UIButton
virtual bool CanMiddleClick ()
 
virtual void OnMiddleClick (bool forceClick)
 
void SetItem (Item i)
 
virtual void RefreshItem ()
 
virtual void OnHover ()
 
void Toggle ()
 
void ToggleCheck ()
 
void SetCheck (bool check)
 
void SetToggle (bool isOn, Action< bool > onToggle=null)
 
void SetToggleWithScore (bool isOn, Action< bool > onToggle, int? score)
 
void SetTooltip (Action< UITooltip > onShowTooltip=null, bool enable=true)
 
void SetTooltip (string id, Action< UITooltip > onShowTooltip=null, bool enable=true)
 
void SetTooltipLang (string lang=null)
 
virtual void ShowTooltip ()
 
void ShowTooltipForced (bool ignoreWhenRightClick=true)
 
override void OnPointerDown (PointerEventData eventData)
 
override void OnPointerClick (PointerEventData eventData)
 
override void OnPointerUp (PointerEventData eventData)
 
void OnPointerUpOnDrag (PointerEventData eventData)
 
void _OnPress ()
 
void OnPress ()
 
void AddHighlight (Func< bool > killCondition)
 
void DoHighlightTransition (bool instant=false)
 
void DoNormalTransition (bool instant=true)
 
override Selectable FindSelectableOnDown ()
 
override Selectable FindSelectableOnUp ()
 
override Selectable FindSelectableOnLeft ()
 
override Selectable FindSelectableOnRight ()
 
void SetNavigation (UIButton up, UIButton down=null, UIButton left=null, UIButton right=null)
 
override bool IsActive ()
 
void SetInteractableWithAlpha (bool enable)
 
virtual void ApplySkin ()
 
void ApplySkin ()
 

Public Attributes

UIButton buttonFold
 
UIButton buttonToggle
 
Sprite spriteFold
 
Sprite spriteUnfold
 
Toggle toggle
 
bool isFolded
 
int uid
 
- Public Attributes inherited from UIButton
UIText mainText
 
UIText subText
 
UIText subText2
 
UIText keyText
 
Image icon
 
Image imageCheck
 
Graphic[] targetGraphics
 
float scaleIcon = 1f
 
float slideX
 
float navigationFix
 
bool isChecked
 
bool instantClick = true
 
UISelectableGroup group
 
TooltipData tooltip
 
SoundData soundClick
 
SoundData soundHighlight
 
Transform animeTarget
 
Anime animeClick
 
Anime animeHold
 
ButtonType buttonType
 
BaseSkinRoot skinRoot
 
Action onDoubleClick
 
Action onRightClick
 
Action< int > onInputWheel
 
object refObj
 
int refInt
 
string refStr
 
bool animating
 
bool selected
 
Vector3 originalIconScale = Vector3.one
 
UIButton highlightTarget
 
Item item
 

Additional Inherited Members

- Static Public Member Functions inherited from UIButton
static void UpdateButtons ()
 
static void TryHihlight ()
 
static void TryShowTip (Transform root=null, bool highlight=true, bool ignoreWhenRightClick=true)
 
static void TryShowTip< T > (Transform root=null, bool highlight=true, bool ignoreWhenRightClick=true)
 
- Static Public Attributes inherited from UIButton
static bool DoSlide
 
static bool locked
 
static UIButton lastButton
 
static UIButton lastHovered
 
static UIButton currentHighlight
 
static UIButton currentPressedButton
 
static float lastClicked
 
static float doubleClickTime = 0.4f
 
static Vector2 buttonPos
 
static Action onPressed
 
static List< UIButtonbuttons = new List<UIButton>()
 
static Action actionTooltip
 
- Protected Member Functions inherited from UIButton
override void Awake ()
 
override void OnEnable ()
 
override void DoStateTransition (SelectionState state, bool instant)
 
- Properties inherited from UIButton
List< Graphic > Graphics [get]
 
virtual bool CanDragLeftButton [get]
 

Detailed Description

Definition at line 5 of file ButtonCategory.cs.

Member Function Documentation

◆ SetFold() [1/2]

void ButtonCategory.SetFold ( bool  show,
bool  folded 
)
inline

Definition at line 21 of file ButtonCategory.cs.

22 {
23 buttonFold.SetActive(show);
24 buttonFold.icon.sprite = (folded ? spriteFold : spriteUnfold);
25 isFolded = folded;
26 }
UIButton buttonFold

References buttonFold, isFolded, spriteFold, and spriteUnfold.

Referenced by UIDistribution.Refresh(), LayerResource.RefreshCategory(), UIBook.RefreshTopics(), LayerDistribution.SetContainer(), and SetFold().

◆ SetFold() [2/2]

void ButtonCategory.SetFold ( bool  show,
bool  folded,
Action< UIList action 
)
inline

Definition at line 28 of file ButtonCategory.cs.

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 }
void SetFold(bool show, bool folded)
Definition: UIList.cs:9

References buttonFold, isFolded, SetFold(), spriteFold, and spriteUnfold.

Member Data Documentation

◆ buttonFold

UIButton ButtonCategory.buttonFold

◆ buttonToggle

UIButton ButtonCategory.buttonToggle

Definition at line 9 of file ButtonCategory.cs.

Referenced by UIDistribution.Refresh().

◆ isFolded

bool ButtonCategory.isFolded

Definition at line 17 of file ButtonCategory.cs.

Referenced by SetFold().

◆ spriteFold

Sprite ButtonCategory.spriteFold

Definition at line 11 of file ButtonCategory.cs.

Referenced by SetFold().

◆ spriteUnfold

Sprite ButtonCategory.spriteUnfold

Definition at line 13 of file ButtonCategory.cs.

Referenced by SetFold().

◆ toggle

Toggle ButtonCategory.toggle

Definition at line 15 of file ButtonCategory.cs.

Referenced by LayerResource.RefreshCategory().

◆ uid

int ButtonCategory.uid

Definition at line 19 of file ButtonCategory.cs.

Referenced by UIDistribution.Refresh().


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