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

Public Member Functions

void ApplySkin ()
 
void ApplySkin ()
 

Public Attributes

bool useSkinSize = true
 
ImageType imageType
 
FrameType frameType
 
BaseSkinRoot skinRoot
 
Vector2 sizeFix
 
Image frame
 

Protected Member Functions

override void Awake ()
 
override void OnPopulateMesh (VertexHelper vh)
 

Detailed Description

Definition at line 4 of file UIImage.cs.

Member Function Documentation

◆ ApplySkin()

void UIImage.ApplySkin ( )
inline

Implements IUISkin.

Definition at line 24 of file UIImage.cs.

25 {
26 if (!Application.isPlaying)
27 {
28 return;
29 }
31 baseSkinRoot.ApplySkin(this);
32 if (imageType == ImageType.Line)
33 {
34 color = baseSkinRoot.Colors.colorLine;
35 }
36 if (frameType != 0)
37 {
38 if (!frame)
39 {
40 frame = Util.Instantiate<Image>("UI/Element/Other/BGFrame", this);
41 frame.transform.SetParent(base.transform.parent, worldPositionStays: false);
42 frame.transform.SetSiblingIndex(base.transform.GetSiblingIndex());
43 }
44 SkinRootStatic skinRootStatic = baseSkinRoot as SkinRootStatic;
45 if ((bool)skinRootStatic && skinRootStatic.useFrame)
46 {
47 frame.sprite = skinRootStatic.assets.frame1.sprite;
48 if (useSkinSize)
49 {
50 frame.Rect().sizeDelta = skinRootStatic.assets.frame1.size;
51 }
52 frame.SetActive(enable: true);
53 }
54 else
55 {
56 frame.SetActive(enable: false);
57 }
58 }
59 else if ((bool)frame)
60 {
61 frame.SetActive(enable: false);
62 }
63 }
ImageType
Definition: ImageType.cs:2
virtual void ApplySkin(UIImage t)
Definition: BaseSkinRoot.cs:16
virtual SkinColorProfile Colors
Definition: BaseSkinRoot.cs:7
SkinRootStatic currentSkin
Definition: SkinManager.cs:53
static SkinManager Instance
Definition: SkinManager.cs:78
FrameType frameType
Definition: UIImage.cs:10
bool useSkinSize
Definition: UIImage.cs:6
BaseSkinRoot skinRoot
Definition: UIImage.cs:12
Image frame
Definition: UIImage.cs:16
ImageType imageType
Definition: UIImage.cs:8
Definition: Util.cs:10
static Transform Instantiate(string path, Component parent=null)
Definition: Util.cs:67

References BaseSkinRoot.ApplySkin(), SkinRootStatic.assets, SkinColorProfile.colorLine, BaseSkinRoot.Colors, SkinManager.currentSkin, frame, SkinRootStatic.Assets.frame1, frameType, imageType, SkinManager.Instance, SkinRootStatic.BG.size, skinRoot, SkinRootStatic.BG.sprite, SkinRootStatic.useFrame, useSkinSize, and Util.

Referenced by Awake(), and UITooltip.SetData().

◆ Awake()

override void UIImage.Awake ( )
inlineprotected

Definition at line 18 of file UIImage.cs.

19 {
20 ApplySkin();
21 base.Awake();
22 }
void ApplySkin()
Definition: UIImage.cs:24

References ApplySkin().

◆ OnPopulateMesh()

override void UIImage.OnPopulateMesh ( VertexHelper  vh)
inlineprotected

Definition at line 65 of file UIImage.cs.

66 {
67 if (color.a == 0f || !base.sprite)
68 {
69 vh.Clear();
70 }
71 else
72 {
73 base.OnPopulateMesh(vh);
74 }
75 }

Member Data Documentation

◆ frame

Image UIImage.frame

Definition at line 16 of file UIImage.cs.

Referenced by ApplySkin(), and Window.ApplySkin().

◆ frameType

FrameType UIImage.frameType

Definition at line 10 of file UIImage.cs.

Referenced by ApplySkin().

◆ imageType

ImageType UIImage.imageType

Definition at line 8 of file UIImage.cs.

Referenced by ApplySkin(), SkinRoot.ApplySkin(), and SkinRootStatic.ApplySkin().

◆ sizeFix

Vector2 UIImage.sizeFix

Definition at line 14 of file UIImage.cs.

◆ skinRoot

BaseSkinRoot UIImage.skinRoot

Definition at line 12 of file UIImage.cs.

Referenced by ApplySkin().

◆ useSkinSize

bool UIImage.useSkinSize = true

Definition at line 6 of file UIImage.cs.

Referenced by ApplySkin(), and SkinRootStatic.ApplySkin().


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