UnityEditor.HostView.EndOffsetArea C# (CSharp) Method

EndOffsetArea() public static method

public static EndOffsetArea ( ) : void
return void
        public static void EndOffsetArea()
        {
            if (Event.current.type != EventType.Used)
            {
                GUILayoutUtility.EndLayoutGroup();
                GUI.EndGroup();
            }
        }

Usage Example

示例#1
0
 public void InvokeOnGUI(Rect onGUIPosition)
 {
     if (Unsupported.IsDeveloperMode() && this.actualView != null && Event.current.type == EventType.KeyUp && Event.current.keyCode == KeyCode.F5)
     {
         this.Reload(this.actualView);
     }
     else
     {
         base.DoWindowDecorationStart();
         GUIStyle gUIStyle = "dockareaoverlay";
         if (this.actualView is GameView)
         {
             GUI.Box(onGUIPosition, GUIContent.none, gUIStyle);
         }
         HostView.BeginOffsetArea(new Rect(onGUIPosition.x + 2f, onGUIPosition.y + 17f, onGUIPosition.width - 4f, onGUIPosition.height - 17f - 2f), GUIContent.none, "TabWindowBackground");
         EditorGUIUtility.ResetGUIState();
         bool flag = false;
         try
         {
             this.Invoke("OnGUI");
         }
         catch (TargetInvocationException ex)
         {
             if (ex.InnerException is ExitGUIException)
             {
                 flag = true;
             }
             throw;
         }
         finally
         {
             if (!flag)
             {
                 if (this.actualView != null && this.actualView.m_FadeoutTime != 0f && Event.current != null && Event.current.type == EventType.Repaint)
                 {
                     this.actualView.DrawNotification();
                 }
                 HostView.EndOffsetArea();
                 EditorGUIUtility.ResetGUIState();
                 base.DoWindowDecorationEnd();
                 if (Event.current.type == EventType.Repaint)
                 {
                     gUIStyle.Draw(onGUIPosition, GUIContent.none, 0);
                 }
             }
         }
     }
 }
All Usage Examples Of UnityEditor.HostView::EndOffsetArea