예제 #1
0
        public void AddElement(InterfaceObject element)
        {
            _elements.Add(element);
            _container.AddChild(element.container);

            if (activated)
            {
                element.OnActivate();
            }
        }
예제 #2
0
        public void AddElement(InterfaceObject element)
        {
            if (visible)
            {
                element.OnActivate();
            }

            element._parent = this;

            _elements.Add(element);
            _container.AddChild(element.container);
        }
예제 #3
0
        public void RemoveElement(InterfaceObject element)
        {
            int index = _elements.IndexOf(element);

            if (index < 0)
            {
                return;
            }

            if (activated)
            {
                element.OnDeactivate();
            }

            _elements.RemoveAt(index);
            _container.RemoveChild(element.container);
        }