8 public static void SetDirty()
10 LayerEquip.dirty =
true;
14 public override void OnInit()
16 this.windows[0].layer =
this;
17 if (!Window.dictData.ContainsKey(
this.windows[0].idWindow) && !
ELayer.ui.widgets.GetWidget(
"BottomBar"))
19 RectTransform rectTransform = this.windows[0].Rect();
20 this.windows[0].Rect().anchoredPosition =
new Vector2(rectTransform.anchoredPosition.x, 45f);
23 LayerEquip.Instance =
this;
30 this.RefreshEquipment(this.listMain,
false);
31 this.RefreshEquipment(this.listEtc,
true);
32 this.RefreshToolBelt(
false);
33 this.windows[0].RebuildLayout(
true);
34 LayerEquip.dirty =
true;
40 LayerEquip.dirty =
false;
41 this.listMain.Redraw();
42 this.listEtc.Redraw();
46 public void RefreshToolBelt(
bool rebuildLayout =
false)
51 public void RefreshEquipment(UIList list,
bool etc =
false)
54 BaseList list2 = list;
58 b.SetBodySlot(a,
new InvOwnerEquip(this.chara, a,
null, CurrencyType.None));
62 b.SetBodySlot(a,
new InvOwnerEquip(this.chara, a,
null, CurrencyType.None));
64 callback.onSort = ((
BodySlot a, UIList.SortMode b) => -a.element.sort);
65 callback.onList = delegate(UIList.SortMode m)
67 foreach (
BodySlot bodySlot
in this.chara.body.slots)
69 if (bodySlot.elementId != 44)
71 if (bodySlot.elementId == 36 || bodySlot.elementId == 31 || bodySlot.elementId == 37 || bodySlot.elementId == 45)
86 list2.callbacks = callback;
87 list.sortMode = UIList.SortMode.ByNumber;
95 public static bool dirty;
98 public UIList listMain;
101 public UIList listEtc;