public void DrawPanel(Rect rect, IPanel panel) { if (action != ImGuiAction.Build || panel == null) { return; } panels.Add(new DrawCommand <IPanel>(rect, panel, 0)); panel.CalculateState(rect.Width, pixelsPerUnit); }