Ejemplo n.º 1
0
        /// <summary>
        /// Removes a child component from this panel if already added.
        /// </summary>
        /// <param name="comp">A 2D component to be removed</param>
        /// <returns>Whether removal succeeded</returns>
        public virtual bool RemoveChild(G2DComponent comp)
        {
            bool removed = children.Remove(comp);

            if (removed)
            {
                comp.Parent = null;
                comp.RemoveKeyInput();
                comp.RemoveMouseInput();

                InvokeComponentRemovedEvent(this, comp);
            }

            return(removed);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Removes a 2D UI component from the rendering process.
 /// </summary>
 /// <param name="comp2d"></param>
 public void Remove2DComponent(G2DComponent comp2d)
 {
     comp2Ds.Remove(comp2d);
     comp2d.RemoveKeyInput();
     comp2d.RemoveMouseInput();
 }
Ejemplo n.º 3
0
        /// <summary>
        /// Removes a child component from this panel if already added.
        /// </summary>
        /// <param name="comp">A 2D component to be removed</param>
        /// <returns>Whether removal succeeded</returns>
        public virtual bool RemoveChild(G2DComponent comp)
        {
            bool removed = children.Remove(comp);
            if (removed)
            {
                comp.Parent = null;
                comp.RemoveKeyInput();
                comp.RemoveMouseInput();

                InvokeComponentRemovedEvent(this, comp);
            }

            return removed;
        }