public void addElement(JElement element)
 {
     Elements.Add(element);
     if (Layout != null)
     {
         Layout.ReSize();
     }
 }
        public bool Overlaping(JElement element, Vector2i mousePosition)
        {
            if (element.Position.X < mousePosition.X && element.Position.X + element.Size.X > mousePosition.X &&
                element.Position.Y < mousePosition.Y && element.Position.Y + element.Size.Y > mousePosition.Y)
            {
                return(true);
            }

            return(false);
        }
 public bool addElement(JElement element, int layoutinfo)
 {
     if (Layout != null)
     {
         Elements[layoutinfo] = element;
         Layout.ReSize();
         return(true);
     }
     return(false);
 }
 public bool removeElement(JElement element)
 {
     if (Elements.Contains(element))
     {
         Elements.Remove(element);
         if (Layout != null)
         {
             Layout.ReSize();
         }
         return(true);
     }
     return(false);
 }