using UnityEngine;

namespace InterfaceOff
{
    public class BasicWindow : WindowBase
    {
        public override void OnWindowInstantiation()
        {
            /* Adds a random advert to the display */
            Advert advert = AdvertRegistry.GetRandomAdvert();
            Components.WindowImage.sprite = advert.Image;
            Components.InfoText.text = advert.Name;
            Components.WindowImage.color = new Color(1, 1, 1, 1);
        }

        public override void OnWindowCloseButtonClicked()
        {
            Destroy(gameObject);
        }
    }
}