public void RemoveControl(ControlItemDrawer drawer) { int idx = _ctrlItemDrawers.IndexOf(drawer); Debug.Assert(idx != -1); RemoveControl(idx); }
public void AddControlAfter(ControlItemDrawer drawer) { int idx = _ctrlItemDrawers.IndexOf(drawer); Debug.Assert(idx != -1); AddControlAfter(idx); }
private void AddControlAfter(int idx) { CtrlItemData itemData = new CtrlItemData(); _ctrlItemDatas.Insert(idx + 1, itemData); ControlItemDrawer drawer = new ControlItemDrawer(this, itemData); _ctrlItemDrawers.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); } } }