Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
UIMouseInfo.cs
Go to the documentation of this file.
1using UnityEngine;
2using UnityEngine.UI;
3
4public class UIMouseInfo : MonoBehaviour
5{
6 public UIText text;
7
9
10 public Image imageRange;
11
12 public string willShow;
13
14 private void OnEnable()
15 {
16 textCost.SetActive(enable: false);
18 }
19
20 private void LateUpdate()
21 {
23 }
24
25 public void RefreshPosition()
26 {
27 base.transform.position = Input.mousePosition;
29 {
30 if (willShow != null)
31 {
32 text.text = willShow;
33 willShow = null;
34 }
35 if (text.text.IsEmpty())
36 {
37 this.SetActive(enable: false);
38 }
39 }
40 }
41
42 public void SetText(string t = "")
43 {
45 {
46 text.text = t;
47 willShow = null;
48 this.SetActive(!t.IsEmpty());
49 }
50 else
51 {
52 willShow = t;
53 }
54 }
55}
static int ignoreCount
Definition: CursorSystem.cs:26
UIText textCost
Definition: UIMouseInfo.cs:8
void LateUpdate()
Definition: UIMouseInfo.cs:20
string willShow
Definition: UIMouseInfo.cs:12
void RefreshPosition()
Definition: UIMouseInfo.cs:25
Image imageRange
Definition: UIMouseInfo.cs:10
UIText text
Definition: UIMouseInfo.cs:6
void OnEnable()
Definition: UIMouseInfo.cs:14
void SetText(string t="")
Definition: UIMouseInfo.cs:42
Definition: UIText.cs:6