Elin Modding Docs Doc
Loading...
Searching...
No Matches
ButtonResourceTrack.cs
1using System;
2using UnityEngine;
3
4// Token: 0x02000635 RID: 1589
5public class ButtonResourceTrack : UIButton
6{
7 // Token: 0x17000CAB RID: 3243
8 // (get) Token: 0x06002C97 RID: 11415 RVA: 0x000FA1B4 File Offset: 0x000F83B4
9 public UIResourceTrack track
10 {
11 get
12 {
13 return UIResourceTrack.Instance;
14 }
15 }
16
17 // Token: 0x06002C98 RID: 11416 RVA: 0x000FA1BC File Offset: 0x000F83BC
18 public void SetProp(string id)
19 {
20 Debug.Log(id);
21 this.prop = EClass._map.Stocked.cardMap.GetOrCreate(id, null);
22 CardRow cardRow = EClass.sources.cards.map[id];
23 this.tooltip.text = cardRow.GetName();
24 this.tooltip.enable = true;
25 cardRow.SetImage(this.icon, null, 0, true, 0, 0);
26 this.onRightClick = delegate()
27 {
28 EClass.player.trackedCards.Remove(id);
29 this.track._Refresh();
30 SE.Trash();
31 };
32 this.Refresh();
33 }
34
35 // Token: 0x06002C99 RID: 11417 RVA: 0x000FA26C File Offset: 0x000F846C
36 public void SetCat(string id)
37 {
38 this.cat = EClass._map.Stocked.categoryMap[id];
39 this.tooltip.text = this.cat.source.GetName();
40 this.tooltip.enable = true;
41 this.onRightClick = delegate()
42 {
43 EClass.player.trackedCategories.Remove(id);
44 this.track._Refresh();
45 SE.Trash();
46 };
47 this.Refresh();
48 }
49
50 // Token: 0x06002C9A RID: 11418 RVA: 0x000FA2EC File Offset: 0x000F84EC
51 public void Refresh()
52 {
53 if (this.cat != null)
54 {
55 this.subText.SetText(this.cat.sum.ToString() ?? "");
56 return;
57 }
58 int num = (this.prop != null) ? this.prop.num : 0;
59 this.subText.SetText(num.ToString() ?? "");
60 }
61
62 // Token: 0x040018FF RID: 6399
63 public PropSet prop;
64
65 // Token: 0x04001900 RID: 6400
66 public PropSetCategory cat;
67}