Callback when the popup window is closed.
// Change to private protected once available in C#. internal void CloseContent() { if (m_WindowContent != null) { m_WindowContent.OnClose(); } }
internal new static void Show(Rect activatorRect, PopupWindowContent windowContent, PopupLocation[] locationPriorityOrder) { if (windowContent == null) { throw new System.ArgumentNullException(nameof(windowContent)); } if (s_PopupWindowWithoutFocus != null) { s_PopupWindowWithoutFocus.CloseContent(); } if (ShouldShowWindow(activatorRect)) { if (s_PopupWindowWithoutFocus == null) { s_PopupWindowWithoutFocus = CreateInstance <PopupWindowWithoutFocus>(); } s_PopupWindowWithoutFocus.Init(activatorRect, windowContent, locationPriorityOrder, ShowMode.PopupMenu, false); } else { windowContent.OnClose(); } }
void OnDisable() { s_LastClosedTime = EditorApplication.timeSinceStartup; if (m_WindowContent != null) { m_WindowContent.OnClose(); } s_PopupWindowWithoutFocus = null; }
protected virtual void OnDisable() { AssemblyReloadEvents.beforeAssemblyReload -= CloseWindow; s_LastClosedTime = EditorApplication.timeSinceStartup; if (m_WindowContent != null) { m_WindowContent.OnClose(); } }