public void Render() { if (chainesAreDirty) { chainesAreDirty = false; ReconstructMessageChains(); } if (messageActors.Count > 0) { foreach (MessageLine line in messageLines) { line.RenderLine(); } foreach (MessageActorWidget actor in messageActors) { actor.Render(); } foreach (MessageLine line in messageLines) { line.RenderMessages(ShowMessages); } } else { CodeControlEditorStyles.SetLabelStyle(CodeControlEditorStyles.LabelStyle.WarningMessage); GUI.color = CodeControlEditorStyles.NoContentColor; GUI.Label(new Rect(18, 15, 300, 100), "No Messages Sent."); CodeControlEditorStyles.ResetLabelStyle(); } }
private void OnGUI() { InitIfNeeded(); DeltaTime = (float)(EditorApplication.timeSinceStartup - previousTimeSinceStartup); previousTimeSinceStartup = EditorApplication.timeSinceStartup; Stopwatch updateWatch = Stopwatch.StartNew(); UpdateWindowRects(); MousePosition = Event.current.mousePosition; UpdateIsHoveringMiniMap(); HandlePanning(); foreach (IWindowRenderer windowRenderer in windowRenderers) { windowRenderer.Update(); } updateWatch.Stop(); Stopwatch renderWatch = Stopwatch.StartNew(); DrawTopBar(); GUI.DrawTexture(WindowRect, backgroundTexture); ButtonWidget.Tooltip = ""; BeginWindows(); GUI.color = new Color(0.0f, 0.0f, 0.0f, 0.0f); GUI.Window(0, WindowRect, RenderRelationsWindow, ""); GUI.color = Color.white; EndWindows(); if (!String.IsNullOrEmpty(ButtonWidget.Tooltip) && !IsHoveringMiniMap) { GUI.TextArea(new Rect(MousePosition.x + 15, MousePosition.y + 10, 80, 16), ButtonWidget.Tooltip); } renderWatch.Stop(); CodeControlEditorStyles.ResetLabelStyle(); if (ShowPeformance) { GUI.Label(new Rect(10, position.height - 40, position.width - 10, 30), "Update: " + updateWatch.ElapsedMilliseconds.ToString() + " ms"); GUI.Label(new Rect(10, position.height - 25, position.width - 10, 30), "Render: " + renderWatch.ElapsedMilliseconds.ToString() + " ms"); } }
public void Render() { if (rootNodes.Count > 0) { foreach (ModelTypeWidgetNode rootNode in rootNodes) { rootNode.Render(); } } else { CodeControlEditorStyles.SetLabelStyle(CodeControlEditorStyles.LabelStyle.WarningMessage); GUI.color = CodeControlEditorStyles.NoContentColor; GUI.Label(new Rect(18, 15, 300, 100), "No Models Found."); CodeControlEditorStyles.ResetLabelStyle(); } }
public void Render() { if (modelRelationsWidgets.Count > 0) { CodeControlEditorStyles.SetLabelStyle(CodeControlEditorStyles.LabelStyle.ModelRelationsTitle); GUI.Label(new Rect(CodeControlMonitorWindow.WindowOffset.x, CodeControlMonitorWindow.WindowOffset.y, ModelRelationsWidget.Width, 30), "Actor"); GUI.Label(new Rect(CodeControlMonitorWindow.WindowOffset.x + ModelRelationsWidget.WidgetMarginHor, CodeControlMonitorWindow.WindowOffset.y, ModelRelationsWidget.Width, 30), "Model"); GUI.Label(new Rect(CodeControlMonitorWindow.WindowOffset.x + 2.0f * ModelRelationsWidget.WidgetMarginHor, CodeControlMonitorWindow.WindowOffset.y, ModelRelationsWidget.Width, 30), "Handler"); CodeControlEditorStyles.ResetLabelStyle(); foreach (ModelRelationsWidget widget in modelRelationsWidgets) { widget.Render(); } } else { CodeControlEditorStyles.SetLabelStyle(CodeControlEditorStyles.LabelStyle.WarningMessage); GUI.color = CodeControlEditorStyles.NoContentColor; GUI.Label(new Rect(18, 15, 300, 100), "No Model Changes Notified."); CodeControlEditorStyles.ResetLabelStyle(); } }
public void Render() { Vector2 start = TypeWidget.Position - .25f * ModelTypeWidget.Width * Vector2.right + .5f * ModelTypeWidget.Height * Vector2.up; foreach (ModelTypeWidgetNode node in nodes) { Vector2 end = node.TypeWidget.Position - .5f * ModelTypeWidget.Width * Vector2.right; Vector2 mid = new Vector2(start.x, end.y); RenderingHelper.RenderLineInMonitorWindow(start, mid, Color.white, 1); RenderingHelper.RenderLineInMonitorWindow(mid, end, Color.white, 1); start = new Vector2(TypeWidget.Position.x - .25f * ModelTypeWidget.Width, node.TypeWidget.Position.y); } TypeWidget.Render(); foreach (ModelTypeWidgetNode node in nodes) { Vector2 aggregationCountPosition = node.TypeWidget.Position - .70f * ModelTypeWidget.Width * Vector2.right + CodeControlMonitorWindow.WindowOffset; CodeControlEditorStyles.SetLabelStyle(CodeControlEditorStyles.LabelStyle.AggregationCountType); GUI.Label(new Rect(aggregationCountPosition.x - 100, aggregationCountPosition.y - 8, 100, 30), node.AggregationCountType); CodeControlEditorStyles.ResetLabelStyle(); node.Render(); } }