MCPcopy Create free account
hub / github.com/aiekick/ImGuiFileDialog / NewFrame

Method NewFrame

ImGuiFileDialog.cpp:2775–2798  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2773}
2774
2775void 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
2800void IGFD::FileDialogInternal::EndFrame() {
2801 // directory change

Callers 1

m_NewFrameMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected