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

Public Member Functions

override void ModifyMesh (VertexHelper vh)
 

Protected Member Functions

 Bevel ()
 
void ApplyShadowZeroAlloc (List< UIVertex > verts, Color32 color, int start, int end, float x, float y)
 

Properties

Color highlightColor [get, set]
 
Color shadowColor [get, set]
 
Vector2 bevelDirectionAndDepth [get, set]
 
bool useGraphicAlpha [get, set]
 

Private Attributes

Color m_HighlightColor = new Color(1f, 1f, 1f, 1f)
 
Color m_ShadowColor = new Color(0f, 0f, 0f, 1f)
 
Vector2 m_BevelDirectionAndDepth = new Vector2(1f, 1f)
 
bool m_UseGraphicAlpha = true
 
List< UIVertex > m_Verts = new List<UIVertex>()
 

Detailed Description

Definition at line 7 of file Bevel.cs.

Constructor & Destructor Documentation

◆ Bevel()

Bevel.Bevel ( )
inlineprotected

Definition at line 90 of file Bevel.cs.

91 {
92 }

Member Function Documentation

◆ ApplyShadowZeroAlloc()

void Bevel.ApplyShadowZeroAlloc ( List< UIVertex >  verts,
Color32  color,
int  start,
int  end,
float  x,
float  y 
)
inlineprotected

Definition at line 94 of file Bevel.cs.

95 {
96 for (int i = start; i < end; i++)
97 {
98 UIVertex uIVertex = verts[i];
99 verts.Add(uIVertex);
100 Vector3 position = uIVertex.position;
101 position.x += x;
102 position.y += y;
103 uIVertex.position = position;
104 Color32 color2 = color;
105 if (useGraphicAlpha)
106 {
107 color2.a = (byte)(color2.a * verts[i].color.a / 255);
108 }
109 uIVertex.color = color2;
110 verts[i] = uIVertex;
111 }
112 }
bool useGraphicAlpha
Definition: Bevel.cs:75

References useGraphicAlpha.

Referenced by ModifyMesh().

◆ ModifyMesh()

override void Bevel.ModifyMesh ( VertexHelper  vh)
inline

Definition at line 114 of file Bevel.cs.

115 {
116 if (!IsActive())
117 {
118 return;
119 }
120 vh.GetUIVertexStream(m_Verts);
121 int count = m_Verts.Count;
122 int num = 0;
123 num = 0;
124 int count2 = m_Verts.Count;
126 num = count2;
127 int count3 = m_Verts.Count;
129 num = count3;
130 int count4 = m_Verts.Count;
132 num = count4;
133 int count5 = m_Verts.Count;
135 num = count5;
136 _ = m_Verts.Count;
138 if (GetComponent<Text>().material.shader == Shader.Find("Text Effects/Fancy Text"))
139 {
140 for (int i = 0; i < m_Verts.Count - count; i++)
141 {
142 UIVertex value = m_Verts[i];
143 value.uv1 = new Vector2(0f, 0f);
144 m_Verts[i] = value;
145 }
146 }
147 vh.Clear();
148 vh.AddUIVertexTriangleStream(m_Verts);
149 }
Color shadowColor
Definition: Bevel.cs:40
Vector2 bevelDirectionAndDepth
Definition: Bevel.cs:56
List< UIVertex > m_Verts
Definition: Bevel.cs:21
Color highlightColor
Definition: Bevel.cs:24
void ApplyShadowZeroAlloc(List< UIVertex > verts, Color32 color, int start, int end, float x, float y)
Definition: Bevel.cs:94

References ApplyShadowZeroAlloc(), bevelDirectionAndDepth, highlightColor, m_Verts, material, and shadowColor.

Member Data Documentation

◆ m_BevelDirectionAndDepth

Vector2 Bevel.m_BevelDirectionAndDepth = new Vector2(1f, 1f)
private

Definition at line 16 of file Bevel.cs.

◆ m_HighlightColor

Color Bevel.m_HighlightColor = new Color(1f, 1f, 1f, 1f)
private

Definition at line 10 of file Bevel.cs.

◆ m_ShadowColor

Color Bevel.m_ShadowColor = new Color(0f, 0f, 0f, 1f)
private

Definition at line 13 of file Bevel.cs.

◆ m_UseGraphicAlpha

bool Bevel.m_UseGraphicAlpha = true
private

Definition at line 19 of file Bevel.cs.

◆ m_Verts

List<UIVertex> Bevel.m_Verts = new List<UIVertex>()
private

Definition at line 21 of file Bevel.cs.

Referenced by ModifyMesh().

Property Documentation

◆ bevelDirectionAndDepth

Vector2 Bevel.bevelDirectionAndDepth
getset

Definition at line 55 of file Bevel.cs.

56 {
57 get
58 {
60 }
61 set
62 {
63 if (!(m_BevelDirectionAndDepth == value))
64 {
66 if (base.graphic != null)
67 {
68 base.graphic.SetVerticesDirty();
69 }
70 }
71 }
72 }
Vector2 m_BevelDirectionAndDepth
Definition: Bevel.cs:16

Referenced by ModifyMesh().

◆ highlightColor

Color Bevel.highlightColor
getset

Definition at line 23 of file Bevel.cs.

24 {
25 get
26 {
27 return m_HighlightColor;
28 }
29 set
30 {
31 m_HighlightColor = value;
32 if (base.graphic != null)
33 {
34 base.graphic.SetVerticesDirty();
35 }
36 }
37 }
Color m_HighlightColor
Definition: Bevel.cs:10

Referenced by ModifyMesh().

◆ shadowColor

Color Bevel.shadowColor
getset

Definition at line 39 of file Bevel.cs.

40 {
41 get
42 {
43 return m_ShadowColor;
44 }
45 set
46 {
47 m_ShadowColor = value;
48 if (base.graphic != null)
49 {
50 base.graphic.SetVerticesDirty();
51 }
52 }
53 }
Color m_ShadowColor
Definition: Bevel.cs:13

Referenced by ModifyMesh().

◆ useGraphicAlpha

bool Bevel.useGraphicAlpha
getset

Definition at line 74 of file Bevel.cs.

75 {
76 get
77 {
78 return m_UseGraphicAlpha;
79 }
80 set
81 {
82 m_UseGraphicAlpha = value;
83 if (base.graphic != null)
84 {
85 base.graphic.SetVerticesDirty();
86 }
87 }
88 }
bool m_UseGraphicAlpha
Definition: Bevel.cs:19

Referenced by ApplyShadowZeroAlloc().


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