using TreeEditor;
using UnityEngine;
using UnityEngine.UI;

namespace InterfaceOff
{
    public class WindowComponents : MonoBehaviour
    {
        [field: SerializeField] public Image WindowImage { get; private set; }
        [field: SerializeField] public RectTransform Transform { get; private set; }

        public Rect Rect => new
        (
            Transform.position.x - Transform.rect.width / 2,
            Transform.position.y - Transform.rect.height / 2,
            Transform.rect.width,
            Transform.rect.height
        );
    }
}