Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
UIHighlight.cs
Go to the documentation of this file.
1using System.Collections.Generic;
2using UnityEngine;
3using UnityEngine.UI;
4
5public class UIHighlight : MonoBehaviour, IUISkin
6{
7 public class Highlight
8 {
9 public Component compo;
10
11 public Highlight(Component compo)
12 {
13 this.compo = compo;
14 }
15
16 public void Kill()
17 {
18 if ((bool)compo && (bool)compo.gameObject)
19 {
20 Object.Destroy(compo.gameObject);
21 }
22 }
23 }
24
25 public Image imageHighlight;
26
27 protected List<Highlight> list = new List<Highlight>();
28
29 private void Awake()
30 {
31 ApplySkin();
32 }
33
34 public void Add(Component target)
35 {
36 Image image = Object.Instantiate(imageHighlight);
37 image.transform.SetParent(target.transform, worldPositionStays: false);
38 list.Add(new Highlight(image));
39 }
40
41 public void Clear()
42 {
43 for (int num = list.Count - 1; num >= 0; num--)
44 {
45 list[num].Kill();
46 }
47 list.Clear();
48 }
49
50 public void ApplySkin()
51 {
52 }
53}
Highlight(Component compo)
Definition: UIHighlight.cs:11
List< Highlight > list
Definition: UIHighlight.cs:27
void Awake()
Definition: UIHighlight.cs:29
void Clear()
Definition: UIHighlight.cs:41
Image imageHighlight
Definition: UIHighlight.cs:25
void Add(Component target)
Definition: UIHighlight.cs:34
void ApplySkin()
Definition: UIHighlight.cs:50