terraria-cpp2il-methodrecon v1.4.4.9
Terraria mobile dump, with reconstructed method body. Dump with CallAnalysis: https://infinitynichto.github.io/terraria-cpp2il
Loading...
Searching...
No Matches
UIIconTextButton.cs
Go to the documentation of this file.
1using System;
5using Terraria.UI;
6
8{
9 // Token: 0x02000AB8 RID: 2744
11 {
12 // Token: 0x060050DB RID: 20699 RVA: 0x0027E9BC File Offset: 0x0027CBBC
13 public UIIconTextButton(LocalizedText title, Color textColor, string iconTexturePath, float textSize = 1f, float titleAlignmentX = 0.5f, float titleWidthReduction = 10f)
14 {
15 int num = 13107;
16 this._opacity = (float)num;
18 if (num == 0)
19 {
20 }
21 base..ctor();
22 if (num == 0)
23 {
24 }
26 int num2 = 16904;
28 if (num2 == 0)
29 {
30 }
32 if (num2 == 0)
33 {
34 }
35 }
36
37 // Token: 0x060050DC RID: 20700 RVA: 0x0027EA4C File Offset: 0x0027CC4C
38 public void SetText(LocalizedText text, float textSize, Color color)
39 {
40 UIText title = this._title;
41 if (title != null)
42 {
43 title.Remove();
44 }
47 if (iconTexture != null)
48 {
49 int num = Utils.Width(iconTexture);
50 UIText title2 = this._title;
52 float height = title2._dimensions.Height;
54 return;
55 }
56 }
57
58 // Token: 0x060050DD RID: 20701 RVA: 0x0027EABC File Offset: 0x0027CCBC
59 protected override void DrawSelf(SpriteBatch spriteBatch)
60 {
61 if (!this._hovered)
62 {
63 return;
64 }
65 if (this._soundedHover)
66 {
67 return;
68 }
69 float y = this._dimensions.Y;
70 float x = this._dimensions.X;
71 float height = this._dimensions.Height;
72 float width = this._dimensions.Width;
73 this._soundedHover = true;
75 Color color = this._color;
76 float opacity = this._opacity;
77 float fadeFromBlack = this.FadeFromBlack;
79 if (iconTexture != null)
80 {
81 if (iconTexture == null)
82 {
83 }
84 float whiteLerp = this._whiteLerp;
86 if (32640 == 0)
87 {
88 }
89 int num = Utils.Width(iconTexture2);
90 int num2 = Utils.Height(this._iconTexture);
91 }
92 }
93
94 // Token: 0x060050DE RID: 20702 RVA: 0x0027EB70 File Offset: 0x0027CD70
95 public override void LeftMouseDown(UIMouseEvent evt)
96 {
97 base.LeftMouseDown(evt);
98 }
99
100 // Token: 0x060050DF RID: 20703 RVA: 0x0027EB84 File Offset: 0x0027CD84
101 public override void MouseOver(UIMouseEvent evt)
102 {
103 base.MouseOver(evt);
104 if (!true)
105 {
106 }
107 float whiteLerp = this._whiteLerp;
108 Color color;
109 this._color = color;
110 this._opacity = (float)13107;
111 this._hovered = true;
112 }
113
114 // Token: 0x060050E0 RID: 20704 RVA: 0x0027EBBC File Offset: 0x0027CDBC
115 public override void MouseOut(UIMouseEvent evt)
116 {
117 base.MouseOut(evt);
118 if (!true)
119 {
120 }
121 float fadeFromBlack = this.FadeFromBlack;
122 Color color;
123 this._color = color;
124 this._opacity = (float)16256;
125 }
126
127 // Token: 0x060050E1 RID: 20705 RVA: 0x0027EBEC File Offset: 0x0027CDEC
128 public void SetColor(Color color, float opacity)
129 {
130 this._color = color;
131 }
132
133 // Token: 0x060050E2 RID: 20706 RVA: 0x0027EC00 File Offset: 0x0027CE00
134 public void SetHoverColor(Color color)
135 {
136 this._hoverColor = color;
137 }
138
139 // Token: 0x04008997 RID: 35223
141
142 // Token: 0x04008998 RID: 35224
144
145 // Token: 0x04008999 RID: 35225
147
148 // Token: 0x0400899A RID: 35226
149 private Color _color;
150
151 // Token: 0x0400899B RID: 35227
153
154 // Token: 0x0400899C RID: 35228
155 public float FadeFromBlack;
156
157 // Token: 0x0400899D RID: 35229
158 private float _whiteLerp;
159
160 // Token: 0x0400899E RID: 35230
161 private float _opacity;
162
163 // Token: 0x0400899F RID: 35231
164 private bool _hovered;
165
166 // Token: 0x040089A0 RID: 35232
167 private bool _soundedHover;
168
169 // Token: 0x040089A1 RID: 35233
170 private UIText _title;
171 }
172}
class f__AnonymousType0<< Count > j__TPar
UIIconTextButton(LocalizedText title, Color textColor, string iconTexturePath, float textSize=1f, float titleAlignmentX=0.5f, float titleWidthReduction=10f)
void SetText(LocalizedText text, float textSize, Color color)
override void DrawSelf(SpriteBatch spriteBatch)
CalculatedStyle _dimensions
static int Height(this Asset< Texture2D > asset)
Definition Utils.cs:701
static int Width(this Asset< Texture2D > asset)
Definition Utils.cs:696
static StyleDimension FromPixels(float pixels)