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

Public Member Functions

void Set (Func< bool > _killCondition)
 

Public Attributes

Func< bool > killCondition
 
UIButton button
 
Sprite sprite
 

Private Member Functions

void Update ()
 

Detailed Description

Definition at line 4 of file UIButtonHighlighter.cs.

Member Function Documentation

◆ Set()

void UIButtonHighlighter.Set ( Func< bool >  _killCondition)
inline

Definition at line 12 of file UIButtonHighlighter.cs.

13 {
14 killCondition = _killCondition;
15 button = GetComponent<UIButton>();
16 sprite = button.image.sprite;
17 button.image.sprite = button.spriteState.highlightedSprite;
18 }
Func< bool > killCondition

References button, killCondition, and sprite.

◆ Update()

void UIButtonHighlighter.Update ( )
inlineprivate

Definition at line 20 of file UIButtonHighlighter.cs.

21 {
22 if (killCondition())
23 {
24 button.image.sprite = sprite;
25 UnityEngine.Object.Destroy(this);
26 }
27 }

References killCondition, and sprite.

Member Data Documentation

◆ button

UIButton UIButtonHighlighter.button

Definition at line 8 of file UIButtonHighlighter.cs.

Referenced by Set().

◆ killCondition

Func<bool> UIButtonHighlighter.killCondition

Definition at line 6 of file UIButtonHighlighter.cs.

Referenced by Set(), and Update().

◆ sprite

Sprite UIButtonHighlighter.sprite

Definition at line 10 of file UIButtonHighlighter.cs.

Referenced by Set(), and Update().


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