private void DoPopup(string id, ref ImGuiEx.FilePickerDefinition fpd, Action onDone) { bool popupOpen = true; ImGui.SetNextWindowContentSize(NVector2.One * 400); if (ImGui.BeginPopupModal(id, ref popupOpen, ImGuiWindowFlags.NoResize)) { if (ImGuiEx.DoFilePicker(ref fpd)) { onDone?.Invoke(); } ImGui.EndPopup(); } }