OnClose() public méthode

Callback when the popup window is closed.

public OnClose ( ) : void
Résultat void
 // 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();
            }
        }
Exemple #3
0
 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();
            }
        }