| 2555 | |
| 2556 | int frameCount = 2; |
| 2557 | void EditorInterface::Draw() |
| 2558 | { |
| 2559 | Init(); |
| 2560 | |
| 2561 | if (isCreatingNewProject && !_NewProjectWindow->HasCreatedProject()) |
| 2562 | { |
| 2563 | _NewProjectWindow->Draw(); |
| 2564 | } |
| 2565 | |
| 2566 | if (isLoadingProjectQueue) |
| 2567 | { |
| 2568 | _WelcomeWindow->LoadQueuedProject(); |
| 2569 | |
| 2570 | auto project = Engine::GetProject(); |
| 2571 | if (project) |
| 2572 | { |
| 2573 | auto& sceneToLoad = project->DefaultScene; |
| 2574 | if (!sceneToLoad) |
| 2575 | { |
| 2576 | sceneToLoad = CreateRef<Scene>(); |
| 2577 | } |
| 2578 | |
| 2579 | OpenSceneWindow(sceneToLoad); |
| 2580 | |
| 2581 | isLoadingProjectQueue = false; |
| 2582 | |
| 2583 | |
| 2584 | frameCount = 0; |
| 2585 | } |
| 2586 | else |
| 2587 | { |
| 2588 | isLoadingProjectQueue = false; |
| 2589 | } |
| 2590 | |
| 2591 | return; |
| 2592 | } |
| 2593 | |
| 2594 | |
| 2595 | if (_WelcomeWindow->IsProjectQueued() && frameCount > 0) |
| 2596 | { |
| 2597 | // draw splash |
| 2598 | LoadingSplash::Get().Draw(_WelcomeWindow->queuedProjectPath); |
| 2599 | |
| 2600 | frameCount--; |
| 2601 | if (frameCount == 0) |
| 2602 | { |
| 2603 | isLoadingProjectQueue = true; |
| 2604 | } |
| 2605 | |
| 2606 | return; |
| 2607 | } |
| 2608 | |
| 2609 | if (!Engine::GetProject()) |
| 2610 | { |
| 2611 | _WelcomeWindow->Draw(); |
| 2612 | return; |
| 2613 | } |
| 2614 | else |
nothing calls this directly
no test coverage detected