public void Draw(SpriteBatch sb, DrawComponents drawComponents, bool selected)
 {
     if (selected)
     {
         sb.Draw(Pixel.White, Bounds, Color.LightGray);
     }
     else if (MouseManager.IsHovering(Bounds))
     {
         sb.Draw(Pixel.White, Bounds, Color.LightBlue);
     }
     Label.Color = selected ? Color.Red : Color.White;
     Label.Draw(sb, drawComponents);
 }
Example #2
0
            public void Draw(SpriteBatch sb, DrawComponents drawComponents, bool selected, bool imageList)
            {
                if (imageList)
                {
                    if (selected)
                    {
                        sb.Draw(Pixel.White, Bounds, Color.LightGray);
                    }
                    else if (MouseManager.IsHovering(Bounds))
                    {
                        sb.Draw(Pixel.White, Bounds, Color.LightBlue);
                    }
                    Label.Color = selected ? Color.Red : Color.White;
                    ImageBox.Draw(sb, drawComponents);
                    Label.Draw(sb, drawComponents);
                }
                else
                {
                    if (selected)
                    {
                        sb.Draw(Pixel.White, Bounds, Color.LightGray);
                    }
                    else if (MouseManager.IsHovering(Bounds))
                    {
                        sb.Draw(Pixel.White, Bounds, Color.LightBlue);
                    }

                    var color =
                        selected
                            ? Color.Red
                            : MouseManager.IsHovering(Bounds)
                                ? Color.LightBlue
                                : Color.White;
                    ImageBox.Color = color;
                    ImageBox.Draw(sb, drawComponents);
                }
            }