コード例 #1
0
        public void RemoveItem(ILayoutable item)
        {
            int  index = 0;
            bool found = false;

            for (int x = 0; x < _items.Count; x++)
            {
                index = x;
                found = _items[x].Key == item;
                if (found)
                {
                    break;
                }
            }

            if (!found)
            {
                return; // Nothing to remove
            }
            _items.RemoveAt(index);

            // Only detach it if the item is still attached to this
            if (item.Parent == _backgroundSprite)
            {
                item.Detach();
                item.OnSizeChangeHandler = null;
            }
        }
コード例 #2
0
        public void RemoveItem(ILayoutable item)
        {
            if (!_items.ContainsKey(item))
            {
                return;
            }

            _items.Remove(item);

            // Only detach it if the item is still attached to this
            if (item.Parent == _backgroundSprite)
            {
                item.Detach();
                item.OnSizeChangeHandler = null;
            }
        }
コード例 #3
0
ファイル: GridLayout.cs プロジェクト: KallDrexx/FrbUi
        public void RemoveItem(ILayoutable item)
        {
            if (!_items.Contains(item))
                return;

            _items.Remove(item);

            // Only detach it if the item is still attached to this
            if (item.Parent == _backgroundSprite)
            {
                item.Detach();
                item.OnSizeChangeHandler = null;
            }
        }