private void DrawClasses() { float footer = 0; footer += UITestToolWindowFooter.HEIGHT + EditorUIConstants.LAYOUT_PADDING; if (PlayModeTestRunner.IsRunning) { footer += PROGRESS_BAR_HEIGHT + EditorUIConstants.LAYOUT_PADDING; } bool needToRepaint = twoSectionDrawer.Draw( position, GUILayoutUtility.GetLastRect().max.y, footer, EditorStyles.helpBox, () => { var isDirty = rootNode.View.Draw(); if (isDirty) { SetSerializedTestsDirty(); } }, GUIStyle.none, DrawLowerSection); CheckAssetIsDirty(); if (needToRepaint) { Repaint(); } }
void OnGUI() { if (!switchedByHotKey && controller.IsRecording && Event.current != null && Event.current.type == EventType.KeyDown && Event.current.alt && (Event.current.command || Event.current.command) && Event.current.keyCode == KeyCode.C) { controller.ChagneAssertation(); Repaint(); } if (controller.IsAssertationMode) { GUI.backgroundColor = new Color(199f / 255, 255f / 255, 213f / 255); } DrawHeader(); if (EditorApplication.isPaused && controller.IsRecording) { GUILayout.Space(5); string text = string.Join("\n", new string[] { "Can't record when editor pause enabled!", "Use 'Pause mode' button instead." }); EditorGUILayout.HelpBox(text, MessageType.Warning); } if (twoSectionDrawer.Draw( position, GUILayoutUtility.GetLastRect().max.y, UITestToolWindowFooter.HEIGHT, GUIStyle.none, DrawListOfUserAction, GUIStyle.none, DrawBottomPanel)) { Repaint(); } footer.Draw(position); }