Elin Modding Docs Doc
Loading...
Searching...
No Matches
DropdownRecipe.cs
1using System;
2using UnityEngine;
3
4// Token: 0x020004F8 RID: 1272
5public class DropdownRecipe : UIDropdown
6{
7 // Token: 0x060021F0 RID: 8688 RVA: 0x000BC284 File Offset: 0x000BA484
8 public void RefreshLabel()
9 {
10 this.textLabel.SetText(this.GetLabel(this.ingredient.thing, this.recipe.source.colorIng == this.recipe.ingredients.IndexOf(this.ingredient)));
11 }
12
13 // Token: 0x060021F1 RID: 8689 RVA: 0x000BC2D8 File Offset: 0x000BA4D8
14 public string GetLabel(Thing t, bool showColor)
15 {
16 if (t == null)
17 {
18 return string.Concat(new string[]
19 {
20 " <color=",
21 DropdownRecipe.colorCost.ToHex(),
22 ">",
23 "noMaterial".lang(),
24 "</color>"
25 });
26 }
27 HitSummary summary = Core.Instance.screen.tileSelector.summary;
28 int num = t.Num;
29 return string.Concat(new string[]
30 {
31 showColor ? ("<color=" + t.material.matColor.ToHex() + ">■</color> ") : "",
32 t.NameSimple,
33 " (",
34 num.ToString(),
35 ")"
36 }) + ((summary.countValid == 0) ? "" : string.Concat(new string[]
37 {
38 " <color=",
39 DropdownRecipe.colorCost.ToHex(),
40 "> -",
41 (this.ingredient.req * summary.countValid).ToString(),
42 "</color>"
43 }));
44 }
45
46 // Token: 0x0400117F RID: 4479
47 public static Color colorCost;
48
49 // Token: 0x04001180 RID: 4480
50 public static Color colorPredict;
51
52 // Token: 0x04001181 RID: 4481
53 public Recipe recipe;
54
55 // Token: 0x04001182 RID: 4482
56 public UIText textLabel;
57
58 // Token: 0x04001183 RID: 4483
59 public UIText orgLabel;
60
61 // Token: 0x04001184 RID: 4484
62 public Recipe.Ingredient ingredient;
63}
Definition Thing.cs:10