| 2773 | } |
| 2774 | |
| 2775 | void IGFD::FileDialogInternal::NewFrame() { |
| 2776 | canWeContinue = true; // reset flag for possibily validate the dialog |
| 2777 | isOk = false; // reset dialog result |
| 2778 | fileManager.devicesClicked = false; |
| 2779 | fileManager.pathClicked = false; |
| 2780 | |
| 2781 | needToExitDialog = false; |
| 2782 | |
| 2783 | #ifdef USE_DIALOG_EXIT_WITH_KEY |
| 2784 | if (ImGui::IsKeyPressed(IGFD_EXIT_KEY)) { |
| 2785 | // we do that here with the data's defined at the last frame |
| 2786 | // because escape key can quit input activation and at the end of the frame all flag will be false |
| 2787 | // so we will detect nothing |
| 2788 | if (!(fileManager.inputPathActivated || searchManager.searchInputIsActive || fileInputIsActive || fileListViewIsActive)) { |
| 2789 | needToExitDialog = true; // need to quit dialog |
| 2790 | } |
| 2791 | } else |
| 2792 | #endif |
| 2793 | { |
| 2794 | searchManager.searchInputIsActive = false; |
| 2795 | fileInputIsActive = false; |
| 2796 | fileListViewIsActive = false; |
| 2797 | } |
| 2798 | } |
| 2799 | |
| 2800 | void IGFD::FileDialogInternal::EndFrame() { |
| 2801 | // directory change |