UnityEditor.PopupWindowWithoutFocus.ShouldShowWindow C# (CSharp) Method

ShouldShowWindow() private static method

private static ShouldShowWindow ( Rect activatorRect ) : bool
activatorRect UnityEngine.Rect
return bool
        private static bool ShouldShowWindow(Rect activatorRect)
        {
            if (((EditorApplication.timeSinceStartup - s_LastClosedTime) >= 0.2) || (activatorRect != s_LastActivatorRect))
            {
                s_LastActivatorRect = activatorRect;
                return true;
            }
            return false;
        }

Usage Example

 internal static void Show(Rect activatorRect, PopupWindowContent windowContent, PopupLocationHelper.PopupLocation[] locationPriorityOrder)
 {
     if (PopupWindowWithoutFocus.ShouldShowWindow(activatorRect))
     {
         if (PopupWindowWithoutFocus.s_PopupWindowWithoutFocus == null)
         {
             PopupWindowWithoutFocus.s_PopupWindowWithoutFocus = ScriptableObject.CreateInstance <PopupWindowWithoutFocus>();
         }
         PopupWindowWithoutFocus.s_PopupWindowWithoutFocus.Init(activatorRect, windowContent, locationPriorityOrder);
     }
 }