public void HideClickButtonList()
        {
            bool hide = true;

            if (ClickButtonList.IntersectingMouse())
            {
                hide = false;
            }
            for (int i = 0; i < ClickButtonList.Count; i++)
            {
                if (ClickButtonList[i].ClickButtonList.IntersectingMouse() ||
                    ClickButtonList[i].HoverButtonList.IntersectingMouse())
                {
                    hide = false;
                    break;
                }
            }
            if (!DrawEnabled)
            {
                hide = true;
            }
            if (hide)
            {
                ClickButtonList.Hide();
            }
        }
 public virtual void Draw(SpriteBatch sb)
 {
     if (DrawEnabled)
     {
         ClickButtonList.Draw(sb);
         HoverButtonList.Draw(sb);
     }
 }
 public virtual void OnRightClicked()
 {
     rightPressing_ = false;
     ClickButtonList.Show();
     HoverButtonList.Hide();
     if (RightClicked != null)
     {
         RightClicked(this);
     }
 }
 public virtual void OnClicked()
 {
     pressing_ = false;
     ClickButtonList.Hide();
     HoverButtonList.Hide();
     if (Clicked != null)
     {
         Clicked(this);
     }
 }
 public virtual void Update()
 {
     if (!eventsPolled_ && !reset_ && (hovering_ || pressing_ || rightPressing_))
     {
         OnResetState();
     }
     if (Mouse.GetState().LeftButton == ButtonState.Pressed && ClickButtonList.Showing && !ClickButtonList.IntersectingMouse() ||
         Mouse.GetState().RightButton == ButtonState.Pressed && ClickButtonList.Showing && !ClickButtonList.IntersectingMouse())
     {
         HideClickButtonList();
     }
     HideHoverButtonList();
     if (newPos != Position)
     {
         ClickButtonList.UpdatePosition(Position);
         HoverButtonList.UpdatePosition(Position);
     }
     newPos        = Position;
     eventsPolled_ = false;
 }