using GraphicsManager.Enums;
using GraphicsManager.Objects;
using GraphicsManager.Objects.Core;

namespace Luski.GUI.MainScreen.UI;

public class FullScreenMedia : UserControl
{
    public Rectangle IMG;

    public FullScreenMedia(Texture t)
    {
        base.Size = Globals.ms.ClientSize;
        IMG = new(t)
        {
            Size = t.RawSize!.Value,
            Location = new((base.Size.X - t.RawSize!.Value.X) / 2, (base.Size.Y - t.RawSize!.Value.Y) / 2, 0),
            Anchor = ObjectAnchor.All
        };
        BackgroundColor = new(0, 0, 0, 130);
        Controls.Add(IMG);
        IMG.ForceDistanceUpdate(this);
        Anchor = ObjectAnchor.All;
    }
    
    public static FullScreenMedia GetDisplay(Texture t)
    {
        return new FullScreenMedia(t);
    }
}