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.
1using System;
2using Controller;
6using Terraria;
7using UnityEngine;
8
9// Token: 0x02000143 RID: 323
10public class GUIHairWindow
11{
12 // Token: 0x060008B0 RID: 2224 RVA: 0x000242BC File Offset: 0x000224BC
18
19 // Token: 0x060008B1 RID: 2225 RVA: 0x000242D0 File Offset: 0x000224D0
20 public void Draw()
21 {
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 }
38 return;
39 }
40 if (num == 0)
41 {
42 }
44 if (num == 0)
45 {
46 }
49 this._controller.Activate();
50 int num2 = 154;
52 if (num2 == 0)
53 {
54 }
55 int num3 = this.unlockedMaxHair;
57 if (num3 == 0)
58 {
59 }
60 int num4 = this.unlockedMaxHair;
62 if (num4 == 0)
63 {
64 }
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 }
84 this.DrawPlayer();
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;
104 bool drawSliders = this.DrawSliders;
106 int num3 = 2;
110 if (num3 == 0)
111 {
112 }
113 if (num3 == 0)
114 {
115 }
117 bool drawSliders2 = this.DrawSliders;
120 {
121 }
122 if (!drawSliders2)
123 {
124 }
125 if (!drawSliders2)
126 {
127 }
129 bool drawSliders3 = this.DrawSliders;
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 }
148 float deltaTime = Time.deltaTime;
149 }
150
151 // Token: 0x060008B3 RID: 2227 RVA: 0x000244D8 File Offset: 0x000226D8
152 private void DrawCancelButton()
153 {
156 {
157 return;
158 }
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;
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
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;
199 player3.hair = player;
200 player3.skinColor = player;
207 player4.shoeColor = player;
209 Item[] armor = player5.armor;
211 long entityId = armor.entityId;
212 Item blankItem = this._blankItem;
213 if (blankItem == null || blankItem != null)
214 {
216 Item[] armor2 = player6.armor;
217 player6.PlayerFrame();
218 Main.gameMenu = true;
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 }
242 {
243 if (num == 0)
244 {
245 }
247 }
249 int num2 = 200;
250 if (num2 == 0)
251 {
252 }
254 if (num2 == 0)
255 {
256 }
258 }
259
260 // Token: 0x060008B9 RID: 2233 RVA: 0x00024738 File Offset: 0x00022938
266
267 // Token: 0x060008BA RID: 2234 RVA: 0x00024754 File Offset: 0x00022954
268 private void DrawButtons()
269 {
271 this.DrawBuyButton();
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;
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;
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;
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
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
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
360
361 // Token: 0x04000783 RID: 1923
363
364 // Token: 0x04000784 RID: 1924
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
384
385 // Token: 0x0400078B RID: 1931
387
388 // Token: 0x0400078C RID: 1932
389 private int hairOver;
390
391 // Token: 0x0400078D RID: 1933
393
394 // Token: 0x0400078E RID: 1934
396
397 // Token: 0x0400078F RID: 1935
399}
class f__AnonymousType0<< Count > j__TPar
static void SetGridItemRegion(Rectangle region)
GUISlider.DragState hueDragState
void HairOver(int index)
void DrawPlayerUI(Player player, Microsoft.Xna.Framework.Vector2 origin, Microsoft.Xna.Framework.Vector2 size)
GUISlider.DragState satDragState
void DrawSelectedHair(Microsoft.Xna.Framework.Vector2 position, float scale)
bool IsOverPanel(Microsoft.Xna.Framework.Vector2 cursorPosition)
float HairScale(int index)
float colourButtonScale
void DrawCategoryButtons()
GUIControllerHairStylist _controller
GUISlider.DragState lightDragState
Microsoft.Xna.Framework.Vector2 CharacterDrawOffset
Microsoft.Xna.Framework.Vector2 hairDragOffset
float ActionButtonScale
void DrawCancelButton()
float TimeSinceItemChange
void HairDraw(ItemGrid_Layout gridLayout, int index, Microsoft.Xna.Framework.Vector2 position, float scale)
float hairScrollMomentum
static void FlushBatches()
Definition Main.cs:5092
static int myPlayer
Definition Main.cs:2337
static bool mouseLeftRelease
Definition Main.cs:2029
static void CancelHairWindow()
Definition Main.cs:12319
static Microsoft.Xna.Framework.Graphics.Color selColor
Definition Main.cs:3623
static int npcShop
Definition Main.cs:2547
static bool InGuideCraftMenu
Definition Main.cs:2645
static int oldHairStyle
Definition Main.cs:3455
static void BuyHairWindow()
Definition Main.cs:12340
static bool mouseLeft
Definition Main.cs:671
static float deltaTime
Definition Time.cs:14