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

Public Types

enum  FollowType { None , Button , Mouse , Pivot }
 

Public Member Functions

void SetData (TooltipData _data)
 

Public Attributes

TooltipData data
 
UIText textMain
 
UIText textSub
 
UINote note
 
Image imageMain
 
Image imageSub
 
Image icon
 
Vector3 offset
 
FollowType followType
 
bool follow
 
bool delayHide
 
bool altSkin
 
Vector2 orgPivot
 
CanvasGroup cg
 
Func< bool > hideFunc
 
LayoutElement layout
 

Private Member Functions

void Awake ()
 

Detailed Description

Definition at line 5 of file UITooltip.cs.

Member Enumeration Documentation

◆ FollowType

Enumerator
None 
Button 
Mouse 
Pivot 

Definition at line 7 of file UITooltip.cs.

Member Function Documentation

◆ Awake()

void UITooltip.Awake ( )
inlineprivate

Definition at line 47 of file UITooltip.cs.

48 {
49 orgPivot = this.Rect().pivot;
50 }
Vector2 orgPivot
Definition: UITooltip.cs:39

References orgPivot.

◆ SetData()

void UITooltip.SetData ( TooltipData  _data)
inline

Definition at line 52 of file UITooltip.cs.

53 {
54 bool flag = data != _data;
55 data = _data;
56 if ((bool)note)
57 {
58 this.Rect().sizeDelta = new Vector2(500f, 0f);
59 if (altSkin && flag)
60 {
61 SkinManager.tempSkin = SkinManager.CurrentSkin.colors.skinTooltip;
62 }
63 }
64 if ((bool)layout)
65 {
66 layout.enabled = true;
67 }
68 if ((bool)textMain)
69 {
70 textMain.text = (data.lang.IsEmpty() ? data.text : Lang.Get(data.lang));
71 }
72 if (data.onShowTooltip != null)
73 {
74 data.onShowTooltip(this);
75 }
76 if ((bool)icon)
77 {
78 icon.SetActive(data.icon);
79 }
80 UIImage[] componentsInChildren = GetComponentsInChildren<UIImage>(includeInactive: true);
81 for (int i = 0; i < componentsInChildren.Length; i++)
82 {
83 componentsInChildren[i].ApplySkin();
84 }
85 this.RebuildLayout(recursive: true);
86 }
Definition: Lang.cs:6
static string Get(string id)
Definition: Lang.cs:91
static SkinRootStatic CurrentSkin
Definition: SkinManager.cs:82
SkinRootStatic skinTooltip
SkinColors colors
string lang
Definition: TooltipData.cs:15
Action< UITooltip > onShowTooltip
Definition: TooltipData.cs:19
void ApplySkin()
Definition: UIImage.cs:24
TooltipData data
Definition: UITooltip.cs:15
UINote note
Definition: UITooltip.cs:21
LayoutElement layout
Definition: UITooltip.cs:45
bool altSkin
Definition: UITooltip.cs:37
UIText textMain
Definition: UITooltip.cs:17
Image icon
Definition: UITooltip.cs:27

References altSkin, UIImage.ApplySkin(), SkinRootStatic.colors, SkinManager.CurrentSkin, data, Lang.Get(), TooltipData.icon, icon, TooltipData.lang, layout, note, TooltipData.onShowTooltip, SkinRootStatic.SkinColors.skinTooltip, and textMain.

Referenced by TooltipManager.ShowTooltip().

Member Data Documentation

◆ altSkin

bool UITooltip.altSkin

Definition at line 37 of file UITooltip.cs.

Referenced by SetData().

◆ cg

CanvasGroup UITooltip.cg

Definition at line 41 of file UITooltip.cs.

Referenced by TooltipManager.Update().

◆ data

TooltipData UITooltip.data

Definition at line 15 of file UITooltip.cs.

Referenced by TooltipManager.ResetTooltips(), and SetData().

◆ delayHide

bool UITooltip.delayHide

Definition at line 35 of file UITooltip.cs.

◆ follow

bool UITooltip.follow

Definition at line 33 of file UITooltip.cs.

◆ followType

FollowType UITooltip.followType

Definition at line 31 of file UITooltip.cs.

◆ hideFunc

Func<bool> UITooltip.hideFunc

Definition at line 43 of file UITooltip.cs.

Referenced by TooltipManager.Update().

◆ icon

Image UITooltip.icon

Definition at line 27 of file UITooltip.cs.

Referenced by SetData().

◆ imageMain

Image UITooltip.imageMain

Definition at line 23 of file UITooltip.cs.

◆ imageSub

Image UITooltip.imageSub

Definition at line 25 of file UITooltip.cs.

◆ layout

LayoutElement UITooltip.layout

Definition at line 45 of file UITooltip.cs.

Referenced by SetData().

◆ note

◆ offset

Vector3 UITooltip.offset

Definition at line 29 of file UITooltip.cs.

◆ orgPivot

Vector2 UITooltip.orgPivot

Definition at line 39 of file UITooltip.cs.

Referenced by Awake().

◆ textMain

UIText UITooltip.textMain

Definition at line 17 of file UITooltip.cs.

Referenced by UIQueue.OnAdd(), and SetData().

◆ textSub

UIText UITooltip.textSub

Definition at line 19 of file UITooltip.cs.


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