Exemple #1
0
        public void RemoveControl(ControlItemDrawer drawer)
        {
            int idx = _ctrlItemDrawers.IndexOf(drawer);

            Debug.Assert(idx != -1);

            RemoveControl(idx);
        }
Exemple #2
0
        public void AddControlAfter(ControlItemDrawer drawer)
        {
            int idx = _ctrlItemDrawers.IndexOf(drawer);

            Debug.Assert(idx != -1);

            AddControlAfter(idx);
        }
Exemple #3
0
        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);
        }
Exemple #4
0
        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);
                }
            }
        }