OnClose() public method

Callback when the popup window is closed.

public OnClose ( ) : void
return void
示例#1
0
 // 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();
            }
        }
示例#3
0
 void OnDisable()
 {
     s_LastClosedTime = EditorApplication.timeSinceStartup;
     if (m_WindowContent != null)
     {
         m_WindowContent.OnClose();
     }
     s_PopupWindowWithoutFocus = null;
 }
示例#4
0
        protected virtual void OnDisable()
        {
            AssemblyReloadEvents.beforeAssemblyReload -= CloseWindow;

            s_LastClosedTime = EditorApplication.timeSinceStartup;
            if (m_WindowContent != null)
            {
                m_WindowContent.OnClose();
            }
        }