9 public static void SetDirty()
11 WidgetEquip.dirty =
true;
15 public override void OnActivate()
17 this.chara =
EMono.pc;
18 WidgetEquip.Instance =
this;
23 base.AddLayer(
LayerInventory.CreateContainer(thing),
this.transLayer);
32 this.RefreshEquipment(this.listMain,
false);
33 this.RefreshEquipment(this.listEtc,
true);
34 WidgetEquip.dirty =
true;
35 this.RebuildLayout(
true);
39 public void CheckDirty()
48 public static void Redraw()
59 WidgetEquip.dirty =
false;
60 this.listMain.Redraw();
61 this.listEtc.Redraw();
65 public void RefreshEquipment(UIList list,
bool etc =
false)
68 BaseList list2 = list;
72 b.SetBodySlot(a,
new InvOwnerEquip(this.chara, a,
null, CurrencyType.None));
76 b.SetBodySlot(a,
new InvOwnerEquip(this.chara, a,
null, CurrencyType.None));
78 callback.onSort = ((
BodySlot a, UIList.SortMode b) => -a.element.sort);
79 callback.onList = delegate(UIList.SortMode m)
82 foreach (
BodySlot bodySlot
in this.chara.body.slots)
84 if (bodySlot.elementId != 44)
86 if (bodySlot.elementId == 36 || bodySlot.elementId == 31 || bodySlot.elementId == 45)
101 if (list == this.listMain)
103 this.grid.constraintCount = num / 12 + 1;
106 list2.callbacks = callback;
107 list.onAfterRedraw = delegate()
111 list.sortMode = UIList.SortMode.ByNumber;
116 public override bool CanShowContextMenu()
119 return (!componentOf || componentOf.card ==
null) && base.CanShowContextMenu();
126 public static bool dirty;
129 public static Thing dragEquip;
132 public UIList listMain;
135 public UIList listEtc;
141 public RectTransform transLayer;
144 public GridLayoutGroup grid;