using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;

namespace ToadieTechnika.GGJ2018Game
{
    [CustomEditor(typeof(PanelsController))]
    public class TransitionPanelButton : Editor
    {
        public override void OnInspectorGUI()
        {
            if (GUILayout.Button("Reset Panels"))
            {
                PanelsController _GetPanelsController = FindObjectOfType<PanelsController>();
                _GetPanelsController.ResetPanels();
            }

            DrawDefaultInspector();
        }
    }

    [CustomEditor(typeof(LevelCard))]
    public class LevelCardSingleCard : Editor
    {
        public override void OnInspectorGUI()
        {
            if (GUILayout.Button("Normalize Level Card"))
            {
                LevelCard _GetLevelCard = FindObjectOfType<LevelCard>();
                _GetLevelCard.ResetLevelCard();
                _GetLevelCard.gameObject.SetActive(false);
            }

            DrawDefaultInspector();
        }
    }

    [CustomEditor(typeof(LevelCardsController))]
    public class LevelCardParentButton : Editor
    {
        public override void OnInspectorGUI()
        {
            if (GUILayout.Button("Catch Levels"))
            {
                LevelCardsController _GetLevelsController = FindObjectOfType<LevelCardsController>();
                _GetLevelsController.CatchLevelCards();
            }

            DrawDefaultInspector();
        }
    }
}