public void DoSettings(Rect canvas) { if (Event.current.type == EventType.Layout) { return; } Panel_Settings.Draw(canvas, true); }
public override void DoWindowContents(Rect inRect) { // Handle Window Resizing HandleWindowDrag(inRect); var rect = inRect.ContractedBy(18f); // Adjust by our (removed) margin var profilersRect = rect; if (GUIController.CurrentProfiler == null) { Panel_Tabs.Draw(profilersRect, GUIController.Tabs); rect.AdjustHorizonallyBy(Panel_Tabs.width); if (GUIController.CurrentCategory == Category.Settings) { Panel_Settings.Draw(rect); return; } Panel_TopRow.Draw(rect.TopPartPixels(TOP_ROW_HEIGHT)); rect.AdjustVerticallyBy(TOP_ROW_HEIGHT); Panel_Logs.DrawLogs(rect); return; } profilersRect.height -= GraphHeight + DRAGGABLE_RECT_DIM; Panel_Tabs.Draw(profilersRect, GUIController.Tabs); rect.AdjustHorizonallyBy(Panel_Tabs.width); Panel_TopRow.Draw(rect.TopPartPixels(TOP_ROW_HEIGHT)); rect.AdjustVerticallyBy(TOP_ROW_HEIGHT); // If there is a current profiler, we need to adjust the height of the logs rect.height -= GraphHeight + DRAGGABLE_RECT_DIM; Panel_Logs.DrawLogs(rect); // Move our rect down to just below the Logs rect.x -= Panel_Tabs.width; rect.width += Panel_Tabs.width; rect.y = rect.yMax; rect.height = GraphHeight + DRAGGABLE_RECT_DIM; var barRect = rect.TopPartPixels(DRAGGABLE_RECT_DIM); HandleGraphDrag(inRect, rect, barRect); rect.AdjustVerticallyBy(DRAGGABLE_RECT_DIM); Panel_BottomRow.Draw(rect, inRect); }