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
GUIHotbar.cs
Go to the documentation of this file.
1using System;
2using Controller;
5using Terraria;
6using Terraria.UI;
7
8// Token: 0x02000148 RID: 328
9public class GUIHotbar
10{
11 // Token: 0x060008DD RID: 2269 RVA: 0x00025910 File Offset: 0x00023B10
12 public GUIHotbar()
13 {
14 }
15
16 // Token: 0x060008DE RID: 2270 RVA: 0x0002592C File Offset: 0x00023B2C
17 public float ItemScale(int index)
18 {
19 /*
20An exception occurred when decompiling this method (060008DE)
21
22ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Single GUIHotbar::ItemScale(System.Int32)
23
24 ---> System.Exception: Basic block has to end with unconditional control flow.
25{
26 IL_00B6:
27 stloc:float32(var_27_C3, ldfld:float32(Hotbar_Layout::ScaleSpeed, callgetter:Hotbar_Layout(Hotbar_Layout::get_Instance)))
28 stfld:int32(int32::m_value, ldloc:int32[exp:int32&](index), ldloc:float32[exp:int32](var_27_C3))
29}
30
31 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
32 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
33 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
34 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
35 --- End of inner exception stack trace ---
36 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
37 at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1683
38*/;
39 }
40
41 // Token: 0x060008DF RID: 2271 RVA: 0x00025A08 File Offset: 0x00023C08
42 public void ItemOver(int index)
43 {
44 int num = 1;
46 if (num == 0)
47 {
48 }
50 if (num == 0)
51 {
52 }
53 bool mouseLeft = Main.mouseLeft;
54 if (num == 0)
55 {
56 }
57 bool mouseLeftRelease = Main.mouseLeftRelease;
58 if (num == 0)
59 {
60 }
61 int myPlayer = Main.myPlayer;
62 }
63
64 // Token: 0x060008E0 RID: 2272 RVA: 0x00025A6C File Offset: 0x00023C6C
65 public void ItemDraw(ItemGrid_Layout gridLayout, int index, Vector2 position, float scale)
66 {
67 bool flag = this.menuTogglePressed;
68 if (flag)
69 {
70 int selectedItem = this.hotbarController.GetSelectedItem();
71 if (!flag)
72 {
73 }
74 int myPlayer = Main.myPlayer;
75 if (!flag)
76 {
77 if (!flag)
78 {
79 }
84 }
85 }
86 int num = 17174;
87 int num2 = 17046;
88 if (num == 0)
89 {
90 }
91 if (num2 == 0)
92 {
93 }
94 if (num == 0)
95 {
96 }
97 if (num == 0)
98 {
99 }
100 if (num == 0)
101 {
102 }
103 int myPlayer6 = Main.myPlayer;
104 if (num == 0)
105 {
106 }
107 int myPlayer7 = Main.myPlayer;
108 if (num == 0)
109 {
110 }
111 int myPlayer8 = Main.myPlayer;
112 if (num == 0)
113 {
114 }
115 int myPlayer9 = Main.myPlayer;
116 if (num2 == 0)
117 {
118 }
119 }
120
121 // Token: 0x060008E1 RID: 2273 RVA: 0x00025B3C File Offset: 0x00023D3C
123 {
125 bool[] keyState = controllerDevice._KeyState;
126 long num = 0L;
127 this.SetItem((int)num);
128 int num2 = 1;
129 this.SetItem(num2);
130 int num3 = 2;
131 this.SetItem(num3);
132 int num4 = 3;
133 this.SetItem(num4);
134 int num5 = 4;
135 this.SetItem(num5);
136 int num6 = 5;
137 this.SetItem(num6);
138 int num7 = 6;
139 this.SetItem(num7);
140 int num8 = 7;
141 this.SetItem(num8);
142 int num9 = 8;
143 this.SetItem(num9);
144 int num10 = 9;
145 this.SetItem(num10);
146 int myPlayer = Main.myPlayer;
147 int myPlayer2 = Main.myPlayer;
148 int myPlayer3 = Main.myPlayer;
149 int myPlayer4 = Main.myPlayer;
150 }
151
152 // Token: 0x060008E2 RID: 2274 RVA: 0x00025BF4 File Offset: 0x00023DF4
153 private void UpdateHotbarScroll()
154 {
155 float scrollAmount = this.ScrollAmount;
156 float mouseScrollDelta = XNAUnityRunner.GetMouseScrollDelta(false);
157 this.PreviousItem();
158 }
159
160 // Token: 0x060008E3 RID: 2275 RVA: 0x00025C28 File Offset: 0x00023E28
162 {
164 bool[] keyState = controllerDevice._KeyState;
165 this.NextItem();
166 }
167
168 // Token: 0x060008E4 RID: 2276 RVA: 0x00025CC4 File Offset: 0x00023EC4
170 {
171 int num = 1;
172 if (num == 0)
173 {
174 }
175 int myPlayer = Main.myPlayer;
176 if (num == 0)
177 {
178 }
179 int myPlayer2 = Main.myPlayer;
180 if (num == 0)
181 {
182 }
183 int myPlayer3 = Main.myPlayer;
184 if (10 == 0)
185 {
186 }
192 if (instance == null)
193 {
194 }
196 return rectangle;
197 }
198
199 // Token: 0x060008E5 RID: 2277 RVA: 0x00025D24 File Offset: 0x00023F24
213
214 // Token: 0x060008E6 RID: 2278 RVA: 0x00025E3C File Offset: 0x0002403C
215 public void DrawHotbarItem(SpriteBatch spriteBatch, ItemGrid_Layout layout, Item[] inv, int slot, Vector2 position, Color lightColor, float scale)
216 {
217 if (!true)
218 {
219 }
220 int myPlayer = Main.myPlayer;
221 int myPlayer2 = Main.myPlayer;
222 int num = this.cursorOver;
223 Cursor cursor;
224 if (cursor != null)
225 {
226 }
227 bool flag = this.menuTogglePressed;
228 if (flag)
229 {
230 if (!flag)
231 {
232 }
233 return;
234 }
235 }
236
237 // Token: 0x060008E7 RID: 2279 RVA: 0x00026030 File Offset: 0x00024230
238 public void SetItem(int item)
239 {
240 int num = 1;
241 if (num == 0)
242 {
243 }
244 int myPlayer = Main.myPlayer;
245 if (num == 0)
246 {
247 int myPlayer2 = Main.myPlayer;
248 int myPlayer3 = Main.myPlayer;
249 }
250 }
251
252 // Token: 0x060008E8 RID: 2280 RVA: 0x00026064 File Offset: 0x00024264
253 public void NextItem()
254 {
255 int num = 1;
256 if (num == 0)
257 {
258 }
259 int myPlayer = Main.myPlayer;
260 if (num == 0)
261 {
262 int myPlayer2 = Main.myPlayer;
263 return;
264 }
265 }
266
267 // Token: 0x060008E9 RID: 2281 RVA: 0x00026128 File Offset: 0x00024328
269 {
270 }
271
272 // Token: 0x060008EA RID: 2282 RVA: 0x00026140 File Offset: 0x00024340
273 public void PreviousItem()
274 {
275 int num = 1;
276 if (num == 0)
277 {
278 }
279 int myPlayer = Main.myPlayer;
280 if (num == 0)
281 {
282 int myPlayer2 = Main.myPlayer;
283 return;
284 }
285 }
286
287 // Token: 0x040007B5 RID: 1973
288 private int cursorOver = 1;
289
290 // Token: 0x040007B6 RID: 1974
291 private float TimeSinceItemChange;
292
293 // Token: 0x040007B7 RID: 1975
294 private string LastItem;
295
296 // Token: 0x040007B8 RID: 1976
297 public bool menuTogglePressed;
298
299 // Token: 0x040007B9 RID: 1977
300 public bool hotbarActive;
301
302 // Token: 0x040007BA RID: 1978
304
305 // Token: 0x040007BB RID: 1979
307
308 // Token: 0x040007BC RID: 1980
309 private float ScrollAmount;
310
311 // Token: 0x040007BD RID: 1981
313
314 // Token: 0x040007BE RID: 1982
316
317 // Token: 0x040007BF RID: 1983
319}
class f__AnonymousType0<< Count > j__TPar
void DrawHotbarItem(SpriteBatch spriteBatch, ItemGrid_Layout layout, Item[] inv, int slot, Vector2 position, Color lightColor, float scale)
Definition GUIHotbar.cs:215
float ItemScale(int index)
Definition GUIHotbar.cs:17
GUIItemGrid.DrawItemHandler itemDraw
Definition GUIHotbar.cs:318
DateTime NavigationTick
Definition GUIHotbar.cs:306
void Draw()
Definition GUIHotbar.cs:200
float ScrollAmount
Definition GUIHotbar.cs:309
void PreviousItem()
Definition GUIHotbar.cs:273
void UpdateHotbarNavigation()
Definition GUIHotbar.cs:161
void NextItem()
Definition GUIHotbar.cs:253
void ItemDraw(ItemGrid_Layout gridLayout, int index, Vector2 position, float scale)
Definition GUIHotbar.cs:65
bool hotbarActive
Definition GUIHotbar.cs:300
void RefreshInvCursorPosition(int itemOver)
Definition GUIHotbar.cs:268
string LastItem
Definition GUIHotbar.cs:294
void UpdateHotbarScroll()
Definition GUIHotbar.cs:153
bool menuTogglePressed
Definition GUIHotbar.cs:297
void ItemOver(int index)
Definition GUIHotbar.cs:42
void SetItem(int item)
Definition GUIHotbar.cs:238
int cursorOver
Definition GUIHotbar.cs:288
GUIItemGrid.CursorOver itemOver
Definition GUIHotbar.cs:315
GUIControllerHotbarRadial hotbarController
Definition GUIHotbar.cs:303
GUIItemGrid.GetItemScaleHandler itemScale
Definition GUIHotbar.cs:312
void UpdateHotbarKeybinds()
Definition GUIHotbar.cs:122
Rectangle GetRegion()
Definition GUIHotbar.cs:169
float TimeSinceItemChange
Definition GUIHotbar.cs:291
static Hotbar_Layout Instance
static InterfaceProfile_Layout Active
static int myPlayer
Definition Main.cs:2337
static bool mouseLeftRelease
Definition Main.cs:2029
static bool mouseLeft
Definition Main.cs:671
static void UpdateTooltipContext(int context, int slot)
Definition ItemSlot.cs:972
static float GetMouseScrollDelta(bool ignoreEditor=false)