public static void PanelBecameActive(Panel panel)
 {
     if (IsPanelRegistered(panel))
     {
         OnPanelBecameActive?.Invoke(panel);
     }
 }
            public static void PanelCreated(Panel panel)
            {
                if (!IsPanelRegistered(panel))
                {
                    panels.Add(panel);

                    panel.Internal.ChangeCloseButtonVisibility(onPanelClosed != null);

                    OnPanelCreated?.Invoke(panel);

                    if (panel.gameObject.activeInHierarchy)
                    {
                        OnPanelBecameActive?.Invoke(panel);
                    }
                    else
                    {
                        OnPanelBecameInactive?.Invoke(panel);
                    }
                }
            }