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
GUIItemFilter.cs
Go to the documentation of this file.
1using System;
3using Controller;
6using Terraria;
10
11// Token: 0x0200014F RID: 335
12public class GUIItemFilter
13{
14 // Token: 0x06000929 RID: 2345 RVA: 0x00027DFC File Offset: 0x00025FFC
19
20 // Token: 0x0600092A RID: 2346 RVA: 0x00027E18 File Offset: 0x00026018
25
26 // Token: 0x0600092B RID: 2347 RVA: 0x00027E30 File Offset: 0x00026030
28 {
29 this.ActiveCategory = category;
30 }
31
32 // Token: 0x0600092C RID: 2348 RVA: 0x00027E44 File Offset: 0x00026044
33 public void SetSearchTerm(string term)
34 {
35 this.SearchTerm = term;
36 bool flag = string.IsNullOrEmpty(term);
37 }
38
39 // Token: 0x0600092D RID: 2349 RVA: 0x00027E70 File Offset: 0x00026070
40 public bool Matches(int itemId)
41 {
42 bool flag = this.miscFilterInitialised;
43 int num;
44 if (!flag)
45 {
46 if (!flag)
47 {
48 }
49 num = 1;
51 }
52 if (num == 0)
53 {
54 }
55 if (num == 0)
56 {
57 }
59 long value = 0.m_value;
61 }
62
63 // Token: 0x0600092E RID: 2350 RVA: 0x00027EB0 File Offset: 0x000260B0
64 public void CloseExpandedFilter()
65 {
66 if (this.editingSearch)
67 {
69 return;
70 }
71 }
72
73 // Token: 0x0600092F RID: 2351 RVA: 0x00027ED0 File Offset: 0x000260D0
79
80 // Token: 0x06000930 RID: 2352 RVA: 0x00027F04 File Offset: 0x00026104
81 private void Close()
82 {
84 }
85
86 // Token: 0x06000931 RID: 2353 RVA: 0x00027F18 File Offset: 0x00026118
87 public void DrawFilter()
88 {
90 if (this.Expanded)
91 {
92 return;
93 }
94 this.DrawSearch();
95 if (this.Expanded)
96 {
98 if (this.pickingInterceptor == null)
99 {
102 if (guiinputRegionExclusive != null)
103 {
104 }
105 }
109 string textValue = Language.GetTextValue("Mobile.FilterItemsClose");
110 string textValue2 = Language.GetTextValue("Mobile.FilterItemsClose");
112 return;
113 }
116 if (this._cat == GUIPageIcons.Category.Crafting)
117 {
118 return;
119 }
120 string textValue3 = Language.GetTextValue("Mobile.FilterItems");
122 }
123
124 // Token: 0x06000932 RID: 2354 RVA: 0x000282D4 File Offset: 0x000264D4
125 private void DrawSearch()
126 {
128 int num = 320;
129 string textValue = Language.GetTextValue("Mobile.Search");
130 if (num == 0)
131 {
132 }
133 bool flag = this.editingSearch;
135 int num2;
136 bool flag2;
138 {
139 if (!this.editingSearch)
140 {
141 string searchTerm = this.SearchTerm;
142 this.editDisplaySearch = searchTerm;
143 return;
144 }
145 }
146 else
147 {
148 num2 = 1;
149 int num3 = 1;
150 flag2 = this.editingSearch;
151 if (!flag2)
152 {
154 if (!flag2)
155 {
156 }
157 Main.clrInput();
158 string text = this.editSearch;
160 return;
161 }
162 }
163 if (!flag2)
164 {
165 }
166 if (num != 0)
167 {
168 return;
169 }
170 string text2 = this.editSearch;
171 int num4 = 312;
172 int num5 = 320;
173 long num6 = 0L;
174 if (num4 == 0)
175 {
176 }
177 int num7 = 1;
178 long num8 = 0L;
179 long num9 = 0L;
181 string inputText = Main.GetInputText(text2, rectangle, (int)num6, num2 != 0, num8 != 0L, num7 != 0, num9 != 0L);
182 this.editSearch = inputText;
183 if (num5 != 0)
184 {
185 string text3 = this.editSearchStart;
187 if (text3 == null)
188 {
189 }
191 return;
192 }
193 if (num5 == 0)
194 {
195 }
197 string text4 = this.editSearch;
198 this.SetSearchTerm(text4);
199 string text5 = this.editSearch;
201 string text6 = this.editDisplaySearch;
203 Vector2 vector = spriteFont.MeasureString(text6);
205 Vector2 vector2 = spriteFont2.MeasureString("|");
206 string text7 = this.editDisplaySearch;
207 int num10 = 1;
208 string text8 = text7.Substring(num10);
210 string text9 = this.editDisplaySearch;
212 Vector2 vector3 = spriteFont3.MeasureString(text9);
213 string text10 = this.editDisplaySearch;
214 }
215
216 // Token: 0x06000933 RID: 2355 RVA: 0x00028494 File Offset: 0x00026694
218 {
219 /*
220An exception occurred when decompiling this method (06000933)
221
222ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Boolean GUIItemFilter::IsOver(Microsoft.Xna.Framework.Vector2)
223
224 ---> System.Exception: Basic block has to end with unconditional control flow.
225{
226 Block_2:
227 stloc:Rectangle(var_8_3E, callgetter:Rectangle(ControlAnchor::get_PageGroupRegion))
228 stloc:Rectangle(var_10_48, callgetter:Rectangle(ControlAnchor::get_PageContentRegion))
229 call:void(GUIPageIconGrouping::LoadPageAnchor, ldloc:GUIPageIconGrouping(var_6_30))
230 stloc:!0(var_11_56, callgetter:!0(PageControllerLayoutDefinition`1::get_Instance))
231 callsetter:Rectangle(ControlAnchor::set_PageGroupRegion, ldloc:Rectangle(var_8_3E))
232 callsetter:Rectangle(ControlAnchor::set_PageContentRegion, ldloc:Rectangle(var_10_48))
233}
234
235 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
236 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
237 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
238 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
239 --- End of inner exception stack trace ---
240 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
241 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
242*/;
243 }
244
245 // Token: 0x06000934 RID: 2356 RVA: 0x00028508 File Offset: 0x00026708
246 // Note: this type is marked as 'beforefieldinit'.
248 {
249 if (("CreativePowers.TabAll" == null || "CreativePowers.TabAll" != null) && ("CreativePowers.TabWeapons" == null || "CreativePowers.TabWeapons" != null) && ("CreativePowers.TabArmor" == null || "CreativePowers.TabArmor" != null) && ("CreativePowers.TabVanity" == null || "CreativePowers.TabVanity" != null) && ("CreativePowers.TabBlocks" == null || "CreativePowers.TabBlocks" != null) && ("CreativePowers.TabFurniture" == null || "CreativePowers.TabFurniture" != null) && ("CreativePowers.TabAccessories" == null || "CreativePowers.TabAccessories" != null) && ("CreativePowers.TabAccessoriesMisc" == null || "CreativePowers.TabAccessoriesMisc" != null) && ("CreativePowers.TabConsumables" == null || "CreativePowers.TabConsumables" != null) && ("CreativePowers.TabTools" == null || "CreativePowers.TabTools" != null) && ("CreativePowers.TabMaterials" == null || "CreativePowers.TabMaterials" != null) && ("CreativePowers.TabMisc" == null || "CreativePowers.TabMisc" != null))
250 {
251 return;
252 }
253 throw new ArrayTypeMismatchException();
254 }
255
256 // Token: 0x040008A6 RID: 2214
258
259 // Token: 0x040008A7 RID: 2215
260 private static string[] categoryName;
261
262 // Token: 0x040008A8 RID: 2216
264
265 // Token: 0x040008A9 RID: 2217
266 public string SearchTerm;
267
268 // Token: 0x040008AA RID: 2218
269 public bool Expanded;
270
271 // Token: 0x040008AB RID: 2219
272 public bool editingSearch;
273
274 // Token: 0x040008AC RID: 2220
275 public string editSearch;
276
277 // Token: 0x040008AD RID: 2221
278 public string editSearchStart;
279
280 // Token: 0x040008AE RID: 2222
281 public string editDisplaySearch;
282
283 // Token: 0x040008AF RID: 2223
285
286 // Token: 0x040008B0 RID: 2224
288
289 // Token: 0x040008B1 RID: 2225
291
292 // Token: 0x040008B2 RID: 2226
293 private bool disableReset;
294
295 // Token: 0x040008B3 RID: 2227
297
298 // Token: 0x040008B4 RID: 2228
299 private float collapseScale;
300
301 // Token: 0x040008B5 RID: 2229
302 private float allScale;
303
304 // Token: 0x040008B6 RID: 2230
305 private float weaponScale;
306
307 // Token: 0x040008B7 RID: 2231
308 private float armorScale;
309
310 // Token: 0x040008B8 RID: 2232
311 private float vanityScale;
312
313 // Token: 0x040008B9 RID: 2233
314 private float buildingBlockScale;
315
316 // Token: 0x040008BA RID: 2234
317 private float furnitureScale;
318
319 // Token: 0x040008BB RID: 2235
320 private float gameplayItemsScale;
321
322 // Token: 0x040008BC RID: 2236
323 private float accessoriesScale;
324
325 // Token: 0x040008BD RID: 2237
326 private float equipmentScale;
327
328 // Token: 0x040008BE RID: 2238
329 private float consumablesScale;
330
331 // Token: 0x040008BF RID: 2239
332 private float toolsScale;
333
334 // Token: 0x040008C0 RID: 2240
335 private float materialsScale;
336
337 // Token: 0x040008C1 RID: 2241
339
340 // Token: 0x040008C2 RID: 2242
342
343 // Token: 0x040008C3 RID: 2243
345
346 // Token: 0x040008C4 RID: 2244
347 private static float BeginSearchScale;
348
349 // Token: 0x02000150 RID: 336
350 public enum CategoryFilter
351 {
352 // Token: 0x040008C6 RID: 2246
353 All,
354 // Token: 0x040008C7 RID: 2247
355 Weapon,
356 // Token: 0x040008C8 RID: 2248
357 Armor,
358 // Token: 0x040008C9 RID: 2249
359 Vanity,
360 // Token: 0x040008CA RID: 2250
362 // Token: 0x040008CB RID: 2251
363 Furniture,
364 // Token: 0x040008CC RID: 2252
366 // Token: 0x040008CD RID: 2253
367 Equipment,
368 // Token: 0x040008CE RID: 2254
370 // Token: 0x040008CF RID: 2255
371 Tools,
372 // Token: 0x040008D0 RID: 2256
373 Materials,
374 // Token: 0x040008D1 RID: 2257
376 // Token: 0x040008D2 RID: 2258
377 Count
378 }
379}
class f__AnonymousType0<< Count > j__TPar
static float BeginSearchScale
GUIControllerItemFilter _controller
static List< IItemEntryFilter > everythingButMisc
string editSearchStart
static string[] categoryName
bool IsOver(Vector2 cursorPosition)
static GUIItemFilter()
void Reset(bool expandedOnTouch=false)
static IItemEntryFilter[] CategoryFilters
bool Matches(int itemId)
void SetFilterCategory(GUIItemFilter.CategoryFilter category)
GUIItemFilter(GUIPageIcons.Category cat)
void LoadCategoryButtonIcon(TransactionButton_Layout button)
string editDisplaySearch
GUIPageIcons.Category _cat
float buildingBlockScale
GUIControllerItem previousNavigationItem
GUIItemFilter.CategoryFilter ActiveCategory
GUIInputRegionExclusive pickingInterceptor
bool miscFilterInitialised
void CloseExpandedFilter()
float gameplayItemsScale
ISearchFilter< Item > searchFilter
void SetSearchTerm(string term)
static string GetTextValue(string key)
Definition Language.cs:54
static string GetInputText(string oldString, Rectangle region, int maxCharacters=-1, bool password=false, bool retainText=false, bool multiline=false, bool filterText=true)
Definition Main.cs:8537
static void CloseKeyboard()
Definition Main.cs:8523
static void clrInput()
Definition Main.cs:8459
static bool ControllerModeLocked