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
GUIHairWindow.cs
Go to the documentation of this file.
1
using
System
;
2
using
Controller
;
3
using
Cpp2IlInjected
;
4
using
Microsoft.Xna.Framework
;
5
using
Microsoft.Xna.Framework.Graphics
;
6
using
Terraria
;
7
using
UnityEngine
;
8
9
// Token: 0x02000143 RID: 323
10
public
class
GUIHairWindow
11
{
12
// Token: 0x060008B0 RID: 2224 RVA: 0x000242BC File Offset: 0x000224BC
13
public
void
LoadRegion
()
14
{
15
Rectangle
rectangle
;
16
ControlAnchor
.
SetGridItemRegion
(
rectangle
);
17
}
18
19
// Token: 0x060008B1 RID: 2225 RVA: 0x000242D0 File Offset: 0x000224D0
20
public
void
Draw
()
21
{
22
Main
.
FlushBatches
();
23
int
num = 1;
24
bool
flag =
Main.npcChatText
!=
""
;
25
if
(num == 0)
26
{
27
}
28
int
myPlayer =
Main
.
myPlayer
;
29
if
(num == 0)
30
{
31
}
32
if
(
Main
.
npcShop
!= 0)
33
{
34
if
(num == 0)
35
{
36
}
37
Main
.
CancelHairWindow
();
38
return
;
39
}
40
if
(num == 0)
41
{
42
}
43
int
myPlayer2
=
Main
.
myPlayer
;
44
if
(num == 0)
45
{
46
}
47
bool
inGuideCraftMenu
=
Main
.
InGuideCraftMenu
;
48
GUIControllerHairStylist
controller
= this.
_controller
;
49
this.
_controller
.
Activate
();
50
int
num2
= 154;
51
this.unlockedMaxHair
=
num2
;
52
if
(num2 == 0)
53
{
54
}
55
int
num3
= this.
unlockedMaxHair
;
56
this.unlockedMaxHair
=
num3
;
57
if
(num3 == 0)
58
{
59
}
60
int
num4
= this.
unlockedMaxHair
;
61
this.unlockedMaxHair
=
num4
;
62
if
(num4 == 0)
63
{
64
}
65
int
myPlayer3
=
Main
.
myPlayer
;
66
Rectangle
rectangle
;
67
ControlAnchor
.
SetGridItemRegion
(
rectangle
);
68
bool
drawSliders
;
69
if
(!this.
DrawSliders
)
70
{
71
this.
DrawHairGrid
();
72
drawSliders = this.
DrawSliders
;
73
if
(!drawSliders)
74
{
75
goto
IL_00DA
;
76
}
77
}
78
this.
DrawHSLSlider
();
79
IL_00DA
:
80
if
(!drawSliders)
81
{
82
}
83
Main
.
FlushBatches
();
84
this.
DrawPlayer
();
85
Main
.
FlushBatches
();
86
this.
DrawCategoryButtons
();
87
this.
DrawButtons
();
88
}
89
90
// Token: 0x060008B2 RID: 2226 RVA: 0x000243E0 File Offset: 0x000225E0
91
private
void
DrawCategoryButtons
()
92
{
93
int
num = 1;
94
if
(num == 0)
95
{
96
}
97
bool
mouseLeft =
Main
.
mouseLeft
;
98
if
(num == 0)
99
{
100
}
101
bool
mouseLeftRelease =
Main
.
mouseLeftRelease
;
102
int
num2
= 17096;
103
this.TimeSinceItemChange
= (float)
num2
;
104
bool
drawSliders
= this.
DrawSliders
;
105
GUIControllerHairStylist
controller
= this.
_controller
;
106
int
num3
= 2;
107
this.DrawSliders
=
drawSliders
;
108
controller.selectedControl
= (
GUIControllerHairStylist
.
Controls
)
num3
;
109
controller
.
Activate
();
110
if
(
num3
== 0)
111
{
112
}
113
if
(
num3
== 0)
114
{
115
}
116
Microsoft.Xna.Framework.Graphics.Color
selColor =
Main
.
selColor
;
117
bool
drawSliders2
= this.
DrawSliders
;
118
GUITransactionButton.InputState
inputState
;
119
if
(
inputState
==
GUITransactionButton
.
InputState
.Clicked)
120
{
121
}
122
if
(!
drawSliders2
)
123
{
124
}
125
if
(!
drawSliders2
)
126
{
127
}
128
Microsoft.Xna.Framework.Graphics.Color
selColor2
=
Main
.
selColor
;
129
bool
drawSliders3
= this.
DrawSliders
;
130
GUITransactionButton.InputState
inputState2
;
131
if
(
inputState2
==
GUITransactionButton
.
InputState
.Clicked)
132
{
133
int
num4
= 1;
134
this.DrawSliders
=
num4
!= 0;
135
}
136
bool
drawSliders4
= this.
DrawSliders
;
137
if
(drawSliders4)
138
{
139
if
(!
drawSliders4
)
140
{
141
}
142
return
;
143
}
144
if
(!
drawSliders4
)
145
{
146
}
147
float
timeSinceItemChange
= this.
TimeSinceItemChange
;
148
float
deltaTime =
Time
.
deltaTime
;
149
}
150
151
// Token: 0x060008B3 RID: 2227 RVA: 0x000244D8 File Offset: 0x000226D8
152
private
void
DrawCancelButton
()
153
{
154
GUITransactionButton.InputState
inputState
;
155
if
(
inputState
!=
GUITransactionButton
.
InputState
.Clicked)
156
{
157
return
;
158
}
159
Main
.
CancelHairWindow
();
160
}
161
162
// Token: 0x060008B4 RID: 2228 RVA: 0x000244F0 File Offset: 0x000226F0
163
private
void
DrawSelectedHair
(
Microsoft
.
Xna
.
Framework
.
Vector2
position,
float
scale)
164
{
165
if
(!
true
)
166
{
167
}
168
int
myPlayer =
Main
.
myPlayer
;
169
int
myPlayer2
=
Main
.
myPlayer
;
170
int
myPlayer3
=
Main
.
myPlayer
;
171
Microsoft.Xna.Framework.Graphics.Color
selColor =
Main
.
selColor
;
172
}
173
174
// Token: 0x060008B5 RID: 2229 RVA: 0x00024560 File Offset: 0x00022760
175
public
int
GetPrice
()
176
{
177
if
(!
true
)
178
{
179
}
180
int
oldHairStyle =
Main
.
oldHairStyle
;
181
return
Main
.
myPlayer
;
182
}
183
184
// Token: 0x060008B6 RID: 2230 RVA: 0x000245B0 File Offset: 0x000227B0
185
public
void
DrawPlayerUI
(
Player
player,
Microsoft
.
Xna
.
Framework
.
Vector2
origin,
Microsoft
.
Xna
.
Framework
.
Vector2
size)
186
{
187
}
188
189
// Token: 0x060008B7 RID: 2231 RVA: 0x000245C0 File Offset: 0x000227C0
190
private
void
DrawPlayer
()
191
{
192
Player
player = this.
clonePlayer
;
193
if
(player ==
null
)
194
{
195
}
196
int
myPlayer =
Main
.
myPlayer
;
197
Player
player2
= this.
clonePlayer
;
198
Player
player3
= this.
clonePlayer
;
199
player3.hair
= player;
200
player3.skinColor
= player;
201
this.clonePlayer.hairColor
= player;
202
this.clonePlayer.eyeColor
= player;
203
this.clonePlayer.shirtColor
= player;
204
this.clonePlayer.underShirtColor
= player;
205
this.clonePlayer.pantsColor
= player;
206
Player
player4
= this.
clonePlayer
;
207
player4.shoeColor
= player;
208
Player
player5
= this.
clonePlayer
;
209
Item
[] armor =
player5
.armor;
210
player5.skinVariant
=
player4
;
211
long
entityId = armor.
entityId
;
212
Item
blankItem = this.
_blankItem
;
213
if
(blankItem ==
null
|| blankItem !=
null
)
214
{
215
Player
player6
= this.
clonePlayer
;
216
Item
[]
armor2
=
player6
.armor;
217
player6
.PlayerFrame();
218
Main.gameMenu
=
true
;
219
Player
player7
= this.
clonePlayer
;
220
float
x = this.
CharacterDrawOffset
.X;
221
float
y = this.
CharacterDrawOffset
.Y;
222
if
(player ==
null
)
223
{
224
}
225
Main.gameMenu
=
false
;
226
return
;
227
}
228
throw
new
ArrayTypeMismatchException
();
229
}
230
231
// Token: 0x060008B8 RID: 2232 RVA: 0x000246D4 File Offset: 0x000228D4
232
public
void
DrawBuyButton
()
233
{
234
int
myPlayer =
Main
.
myPlayer
;
235
int
myPlayer2
=
Main
.
myPlayer
;
236
int
num = 16992;
237
if
(num == 0)
238
{
239
}
240
GUITransactionButton.InputState
inputState
;
241
if
(
inputState
==
GUITransactionButton
.
InputState
.Clicked)
242
{
243
if
(num == 0)
244
{
245
}
246
Main
.
BuyHairWindow
();
247
}
248
bool
anyControllerConnected
=
ControllerActionManager
.
AnyControllerConnected
;
249
int
num2
= 200;
250
if
(
num2
== 0)
251
{
252
}
253
Main
.
FlushBatches
();
254
if
(
num2
== 0)
255
{
256
}
257
Main
.
FlushBatches
();
258
}
259
260
// Token: 0x060008B9 RID: 2233 RVA: 0x00024738 File Offset: 0x00022938
261
public
bool
IsOverPanel
(
Microsoft
.
Xna
.
Framework
.
Vector2
cursorPosition
)
262
{
263
bool
anyControllerConnected
=
ControllerActionManager
.
AnyControllerConnected
;
264
return
true
;
265
}
266
267
// Token: 0x060008BA RID: 2234 RVA: 0x00024754 File Offset: 0x00022954
268
private
void
DrawButtons
()
269
{
270
Main
.
FlushBatches
();
271
this.
DrawBuyButton
();
272
Main
.
FlushBatches
();
273
this.
DrawCancelButton
();
274
}
275
276
// Token: 0x060008BB RID: 2235 RVA: 0x00024780 File Offset: 0x00022980
277
private
void
DrawHairGrid
()
278
{
279
int
num = 1;
280
this.hairOver
= num;
281
int
num2
= this.
unlockedMaxHair
;
282
}
283
284
// Token: 0x060008BC RID: 2236 RVA: 0x000021DB File Offset: 0x000003DB
285
public
float
HairScale
(
int
index
)
286
{
287
throw
new
AnalysisFailedException
(
"CPP2IL failed to recover any usable IL for this method."
);
288
}
289
290
// Token: 0x060008BD RID: 2237 RVA: 0x000247A0 File Offset: 0x000229A0
291
public
void
HairOver
(
int
index
)
292
{
293
int
num = 1;
294
this.hairOver
=
index
;
295
if
(num == 0)
296
{
297
}
298
bool
mouseLeft =
Main
.
mouseLeft
;
299
if
(num == 0)
300
{
301
}
302
bool
mouseLeftRelease =
Main
.
mouseLeftRelease
;
303
int
offset
= this.
Offset
;
304
float
actionButtonScale
= this.
ActionButtonScale
;
305
if
(offset == 0)
306
{
307
}
308
int
myPlayer =
Main
.
myPlayer
;
309
int
offset2
= this.
Offset
;
310
}
311
312
// Token: 0x060008BE RID: 2238 RVA: 0x00024814 File Offset: 0x00022A14
313
public
void
HairDraw
(
ItemGrid_Layout
gridLayout
,
int
index
,
Microsoft
.
Xna
.
Framework
.
Vector2
position,
float
scale)
314
{
315
int
offset
= this.
Offset
;
316
float
actionButtonScale
= this.
ActionButtonScale
;
317
if
(offset == 0)
318
{
319
}
320
if
(this.
hairOver
== 0)
321
{
322
}
323
}
324
325
// Token: 0x060008BF RID: 2239 RVA: 0x00024928 File Offset: 0x00022B28
326
private
void
DrawHSLSlider
()
327
{
328
bool
mouseLeft =
Main
.
mouseLeft
;
329
bool
mouseLeftRelease =
Main
.
mouseLeftRelease
;
330
}
331
332
// Token: 0x060008C0 RID: 2240 RVA: 0x00024C10 File Offset: 0x00022E10
333
public
GUIHairWindow
()
334
{
335
}
336
337
// Token: 0x0400077B RID: 1915
338
private
int
Offset
;
339
340
// Token: 0x0400077C RID: 1916
341
private
int
unlockedMaxHair
;
342
343
// Token: 0x0400077D RID: 1917
344
private
float
ActionButtonScale
= (float)16256;
345
346
// Token: 0x0400077E RID: 1918
347
public
bool
DrawSliders
;
348
349
// Token: 0x0400077F RID: 1919
350
private
GUIControllerHairStylist
_controller
;
351
352
// Token: 0x04000780 RID: 1920
353
private
float
TimeSinceItemChange
= (float)17096;
354
355
// Token: 0x04000781 RID: 1921
356
private
float
closeScale
;
357
358
// Token: 0x04000782 RID: 1922
359
private
Item
_blankItem
;
360
361
// Token: 0x04000783 RID: 1923
362
private
Player
clonePlayer
;
363
364
// Token: 0x04000784 RID: 1924
365
private
Microsoft.Xna.Framework.Vector2
CharacterDrawOffset
= 17096;
366
367
// Token: 0x04000785 RID: 1925
368
private
float
hairButtonScale
;
369
370
// Token: 0x04000786 RID: 1926
371
private
float
colourButtonScale
;
372
373
// Token: 0x04000787 RID: 1927
374
private
float
TitleScale
;
375
376
// Token: 0x04000788 RID: 1928
377
public
float
hairScrollOffset
;
378
379
// Token: 0x04000789 RID: 1929
380
private
float
hairScrollMomentum
;
381
382
// Token: 0x0400078A RID: 1930
383
private
int
hairScrollDragging
;
384
385
// Token: 0x0400078B RID: 1931
386
private
Microsoft.Xna.Framework.Vector2
hairDragOffset
;
387
388
// Token: 0x0400078C RID: 1932
389
private
int
hairOver
;
390
391
// Token: 0x0400078D RID: 1933
392
private
GUISlider.DragState
hueDragState
;
393
394
// Token: 0x0400078E RID: 1934
395
private
GUISlider.DragState
satDragState
;
396
397
// Token: 0x0400078F RID: 1935
398
private
GUISlider.DragState
lightDragState
;
399
}
j__TPar
class f__AnonymousType0<< Count > j__TPar
Definition
--f__AnonymousType0.cs:8
ControlAnchor.SetGridItemRegion
static void SetGridItemRegion(Rectangle region)
Definition
ControlAnchor.cs:261
ControlAnchor
Definition
ControlAnchor.cs:7
Controller.ControllerActionManager.AnyControllerConnected
static bool AnyControllerConnected
Definition
ControllerActionManager.cs:135
Controller.ControllerActionManager
Definition
ControllerActionManager.cs:10
Cpp2IlInjected.AnalysisFailedException
Definition
AnalysisFailedException.cs:7
GUIControllerHairStylist.Activate
void Activate()
Definition
GUIControllerHairStylist.cs:14
GUIControllerHairStylist.Controls
Controls
Definition
GUIControllerHairStylist.cs:125
GUIControllerHairStylist
Definition
GUIControllerHairStylist.cs:7
GUIHairWindow.closeScale
float closeScale
Definition
GUIHairWindow.cs:356
GUIHairWindow.hueDragState
GUISlider.DragState hueDragState
Definition
GUIHairWindow.cs:392
GUIHairWindow.HairOver
void HairOver(int index)
Definition
GUIHairWindow.cs:291
GUIHairWindow.Offset
int Offset
Definition
GUIHairWindow.cs:338
GUIHairWindow.TitleScale
float TitleScale
Definition
GUIHairWindow.cs:374
GUIHairWindow.GetPrice
int GetPrice()
Definition
GUIHairWindow.cs:175
GUIHairWindow.hairScrollOffset
float hairScrollOffset
Definition
GUIHairWindow.cs:377
GUIHairWindow.DrawPlayerUI
void DrawPlayerUI(Player player, Microsoft.Xna.Framework.Vector2 origin, Microsoft.Xna.Framework.Vector2 size)
Definition
GUIHairWindow.cs:185
GUIHairWindow.satDragState
GUISlider.DragState satDragState
Definition
GUIHairWindow.cs:395
GUIHairWindow.DrawSelectedHair
void DrawSelectedHair(Microsoft.Xna.Framework.Vector2 position, float scale)
Definition
GUIHairWindow.cs:163
GUIHairWindow.IsOverPanel
bool IsOverPanel(Microsoft.Xna.Framework.Vector2 cursorPosition)
Definition
GUIHairWindow.cs:261
GUIHairWindow.DrawSliders
bool DrawSliders
Definition
GUIHairWindow.cs:347
GUIHairWindow.HairScale
float HairScale(int index)
Definition
GUIHairWindow.cs:285
GUIHairWindow.clonePlayer
Player clonePlayer
Definition
GUIHairWindow.cs:362
GUIHairWindow.colourButtonScale
float colourButtonScale
Definition
GUIHairWindow.cs:371
GUIHairWindow.DrawCategoryButtons
void DrawCategoryButtons()
Definition
GUIHairWindow.cs:91
GUIHairWindow._controller
GUIControllerHairStylist _controller
Definition
GUIHairWindow.cs:350
GUIHairWindow.DrawButtons
void DrawButtons()
Definition
GUIHairWindow.cs:268
GUIHairWindow.lightDragState
GUISlider.DragState lightDragState
Definition
GUIHairWindow.cs:398
GUIHairWindow.CharacterDrawOffset
Microsoft.Xna.Framework.Vector2 CharacterDrawOffset
Definition
GUIHairWindow.cs:365
GUIHairWindow.hairDragOffset
Microsoft.Xna.Framework.Vector2 hairDragOffset
Definition
GUIHairWindow.cs:386
GUIHairWindow.hairOver
int hairOver
Definition
GUIHairWindow.cs:389
GUIHairWindow.DrawHairGrid
void DrawHairGrid()
Definition
GUIHairWindow.cs:277
GUIHairWindow.hairScrollDragging
int hairScrollDragging
Definition
GUIHairWindow.cs:383
GUIHairWindow.ActionButtonScale
float ActionButtonScale
Definition
GUIHairWindow.cs:344
GUIHairWindow.DrawCancelButton
void DrawCancelButton()
Definition
GUIHairWindow.cs:152
GUIHairWindow.GUIHairWindow
GUIHairWindow()
Definition
GUIHairWindow.cs:333
GUIHairWindow.Draw
void Draw()
Definition
GUIHairWindow.cs:20
GUIHairWindow.DrawBuyButton
void DrawBuyButton()
Definition
GUIHairWindow.cs:232
GUIHairWindow.LoadRegion
void LoadRegion()
Definition
GUIHairWindow.cs:13
GUIHairWindow.TimeSinceItemChange
float TimeSinceItemChange
Definition
GUIHairWindow.cs:353
GUIHairWindow.unlockedMaxHair
int unlockedMaxHair
Definition
GUIHairWindow.cs:341
GUIHairWindow._blankItem
Item _blankItem
Definition
GUIHairWindow.cs:359
GUIHairWindow.DrawPlayer
void DrawPlayer()
Definition
GUIHairWindow.cs:190
GUIHairWindow.hairButtonScale
float hairButtonScale
Definition
GUIHairWindow.cs:368
GUIHairWindow.HairDraw
void HairDraw(ItemGrid_Layout gridLayout, int index, Microsoft.Xna.Framework.Vector2 position, float scale)
Definition
GUIHairWindow.cs:313
GUIHairWindow.hairScrollMomentum
float hairScrollMomentum
Definition
GUIHairWindow.cs:380
GUIHairWindow.DrawHSLSlider
void DrawHSLSlider()
Definition
GUIHairWindow.cs:326
GUIHairWindow
Definition
GUIHairWindow.cs:11
GUISlider.DragState
Definition
GUISlider.cs:169
GUITransactionButton.InputState
InputState
Definition
GUITransactionButton.cs:534
GUITransactionButton
Definition
GUITransactionButton.cs:11
ItemGrid_Layout
Definition
ItemGrid_Layout.cs:7
System.ArrayTypeMismatchException
Definition
ArrayTypeMismatchException.cs:9
Terraria.Entity.entityId
long entityId
Definition
Entity.cs:457
Terraria.Item
Definition
Item.cs:21
Terraria.Main.FlushBatches
static void FlushBatches()
Definition
Main.cs:5092
Terraria.Main.myPlayer
static int myPlayer
Definition
Main.cs:2337
Terraria.Main.mouseLeftRelease
static bool mouseLeftRelease
Definition
Main.cs:2029
Terraria.Main.CancelHairWindow
static void CancelHairWindow()
Definition
Main.cs:12319
Terraria.Main.selColor
static Microsoft.Xna.Framework.Graphics.Color selColor
Definition
Main.cs:3623
Terraria.Main.npcShop
static int npcShop
Definition
Main.cs:2547
Terraria.Main.InGuideCraftMenu
static bool InGuideCraftMenu
Definition
Main.cs:2645
Terraria.Main.oldHairStyle
static int oldHairStyle
Definition
Main.cs:3455
Terraria.Main.BuyHairWindow
static void BuyHairWindow()
Definition
Main.cs:12340
Terraria.Main.mouseLeft
static bool mouseLeft
Definition
Main.cs:671
Terraria.Main
Definition
Main.cs:67
Terraria.Player
Definition
Player.cs:33
UnityEngine.Time.deltaTime
static float deltaTime
Definition
Time.cs:14
UnityEngine.Time
Definition
Time.cs:10
Controller
Definition
Axis.cs:4
Cpp2IlInjected
Definition
AnalysisFailedException.cs:4
Microsoft.Xna.Framework.Graphics
Definition
Blend.cs:4
Microsoft.Xna.Framework
Definition
AudioChannels.cs:4
Microsoft.Xna
Definition
AudioChannels.cs:4
Microsoft
Definition
AudioChannels.cs:4
System.ExceptionArgument.index
@ index
System.ExceptionArgument.offset
@ offset
System
Definition
__ComObject.cs:4
Terraria
Definition
Achievement.cs:10
UnityEngine
Definition
_AndroidJNIHelper.cs:6
Microsoft.Xna.Framework.Graphics.Color
Definition
Color.cs:12
Microsoft.Xna.Framework.Rectangle
Definition
Rectangle.cs:9
Microsoft.Xna.Framework.Vector2
Definition
Vector2.cs:10
source
GUIHairWindow.cs
Generated by
1.10.0