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

Method m_DrawOkButton

ImGuiFileDialog.cpp:4064–4079  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4062}
4063
4064bool IGFD::FileDialog::m_DrawOkButton() {
4065 auto& fdFile = m_FileDialogInternal.fileManager;
4066 if ((m_FileDialogInternal.canWeContinue && strlen(fdFile.fileNameBuffer)) || //
4067 (m_FileDialogInternal.getDialogConfig().flags & ImGuiFileDialogFlags_OptionalFileName)) { // optional
4068 if (IMGUI_BUTTON(okButtonString "##validationdialog", ImVec2(okButtonWidth, 0.0f)) || m_FileDialogInternal.isOk) {
4069 m_FileDialogInternal.isOk = true;
4070 return true;
4071 }
4072
4073#if !invertOkAndCancelButtons
4074 ImGui::SameLine();
4075#endif
4076 }
4077
4078 return false;
4079}
4080
4081bool IGFD::FileDialog::m_DrawCancelButton() {
4082 if (IMGUI_BUTTON(cancelButtonString "##validationdialog", ImVec2(cancelButtonWidth, 0.0f)) || m_FileDialogInternal.needToExitDialog) // dialog exit asked

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected