public void RemoveSubUI(SubUIItemDrawer drawer) { int idx = _subUIItemDrawers.IndexOf(drawer); Debug.Assert(idx != -1); RemoveSubUI(idx); }
public void AddSubUIAfter(SubUIItemDrawer drawer) { int idx = _subUIItemDrawers.IndexOf(drawer); Debug.Assert(idx != -1); AddSubUIAfter(idx); }
private void AddSubUIAfter(int idx) { SubUIItemData itemData = new SubUIItemData(); _subUIItemDatas.Insert(idx + 1, itemData); SubUIItemDrawer drawer = new SubUIItemDrawer(this, itemData); _subUIItemDrawers.Insert(idx + 1, drawer); }
private void CheckDrawers() { if (_ctrlItemDrawers == null) { _ctrlItemDrawers = new List <ControlItemDrawer>(100); foreach (var item in _ctrlItemDatas) { ControlItemDrawer drawer = new ControlItemDrawer(this, item); _ctrlItemDrawers.Add(drawer); } } if (_subUIItemDrawers == null) { _subUIItemDrawers = new List <SubUIItemDrawer>(100); foreach (var item in _subUIItemDatas) { SubUIItemDrawer drawer = new SubUIItemDrawer(this, item); _subUIItemDrawers.Add(drawer); } } }