Example #1
0
        public void RemoveSubUI(SubUIItemDrawer drawer)
        {
            int idx = _subUIItemDrawers.IndexOf(drawer);

            Debug.Assert(idx != -1);

            RemoveSubUI(idx);
        }
Example #2
0
        public void AddSubUIAfter(SubUIItemDrawer drawer)
        {
            int idx = _subUIItemDrawers.IndexOf(drawer);

            Debug.Assert(idx != -1);

            AddSubUIAfter(idx);
        }
Example #3
0
        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);
        }
Example #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);
                }
            }
        }