public void CloseWindow(Window window) {
     if(window == null) return;
     for(int i = windows.Count - 1; i >= 0; i--) {
         if(windows[i] == null) {
             windows.RemoveAt(i); // remove null entry
             continue;
         }
         if(windows[i] != window) continue;
         DestroyWindow(windows[i]);
         windows.RemoveAt(i);
         break;
     }
     UpdateFader();
     FocusTopWindow();
 }
 private void DestroyWindow(Window window) {
     if(window == null) return;
     Object.Destroy(window.gameObject);
 }
 public void Focus(Window window) {
     if(window == null) return;
     window.TakeInputFocus();
     DefocusOtherWindows(window.id);
 }