static void DoGUI()
        {
            foreach (IDoGUIWindow window in s_windows)
            {
                window?.DoGUIWindow();
            }

            var evt = Event.current;

            if ((evt.type == EventType.KeyUp) &&
                (evt.keyCode == RapidGUIBehaviour.Instance.closeFocusedWindowKey) &&
                (GUIUtility.keyboardControl == 0)
                )
            {
                if (s_windows.Contains(s_focusedWindow))
                {
                    s_focusedWindow.CloseWindow();
                    s_focusedWindow = null;
                }
            }


            if (Event.current.type == EventType.Repaint)
            {
                s_windows.Clear();
            }
        }
        static void DoGUI()
        {
            Windows.ToList().ForEach(l => l?.DoGUIWindow());

            var evt = Event.current;

            if ((evt.type == EventType.KeyUp) &&
                (evt.keyCode == RapidGUIBehaviour.Instance.closeFocusedWindowKey) &&
                (GUIUtility.keyboardControl == 0)
                )
            {
                if (Windows.Contains(focusedWindow))
                {
                    focusedWindow.CloseWindow();
                    focusedWindow = null;
                }
            }


            if (Event.current.type == EventType.Repaint)
            {
                Windows.Clear();
            }
        }
 public static void SetFocusedWindow(IDoGUIWindow window)
 {
     focusedWindow = window;
 }
 public static void Remove(IDoGUIWindow window) => Windows.Remove(window);
 public static void Add(IDoGUIWindow window) => Windows.Add(window);