/*           INFINITY CODE          */
/*     https://infinity-code.com    */

using System;
using UnityEditor;
using UnityEngine;

namespace InfinityCode.TreeTools.Editors
{
    public class About : EditorWindow
    {
        public const string version = "1.1.0.1";

        private string years = DateTime.Now.Year.ToString();

        [MenuItem(MenuItems.MENU_PATH + "About", false, MenuOrder.ABOUT)]
        public static void OpenWindow()
        {
            About window = GetWindow<About>(true, "About", true);
            window.minSize = new Vector2(200, 100);
            window.maxSize = new Vector2(200, 100);
        }

        public void OnGUI()
        {
            GUIStyle titleStyle = new GUIStyle(EditorStyles.boldLabel);
            titleStyle.alignment = TextAnchor.MiddleCenter;

            GUIStyle textStyle = new GUIStyle(EditorStyles.label);
            textStyle.alignment = TextAnchor.MiddleCenter;

            GUILayout.Label("Tree Tool", titleStyle);
            GUILayout.Label("version " + version, textStyle);
            GUILayout.Label("created by Infinity Code", textStyle);
            GUILayout.Label(years, textStyle);
        }
    }
}