| 4115 | } |
| 4116 | |
| 4117 | bool IGFD::FileDialog::m_DrawFooter() { |
| 4118 | auto& fdFile = m_FileDialogInternal.fileManager; |
| 4119 | |
| 4120 | float posY = ImGui::GetCursorPos().y; // height of last bar calc |
| 4121 | ImGui::AlignTextToFramePadding(); |
| 4122 | if (!fdFile.dLGDirectoryMode) |
| 4123 | ImGui::Text(fileNameString); |
| 4124 | else // directory chooser |
| 4125 | ImGui::Text(dirNameString); |
| 4126 | ImGui::SameLine(); |
| 4127 | |
| 4128 | // Input file fields |
| 4129 | float width = ImGui::GetContentRegionAvail().x; |
| 4130 | if (!fdFile.dLGDirectoryMode) { |
| 4131 | ImGuiContext& g = *GImGui; |
| 4132 | width -= m_FileDialogInternal.filterManager.GetFilterComboBoxWidth() + g.Style.ItemSpacing.x; |
| 4133 | } |
| 4134 | |
| 4135 | ImGui::PushItemWidth(width); |
| 4136 | ImGuiInputTextFlags flags = ImGuiInputTextFlags_EnterReturnsTrue; |
| 4137 | if (m_FileDialogInternal.getDialogConfig().flags & ImGuiFileDialogFlags_ReadOnlyFileNameField) { |
| 4138 | flags |= ImGuiInputTextFlags_ReadOnly; |
| 4139 | } |
| 4140 | if (ImGui::InputText("##FileName", fdFile.fileNameBuffer, MAX_FILE_DIALOG_NAME_BUFFER, flags)) { |
| 4141 | m_FileDialogInternal.isOk = true; |
| 4142 | } |
| 4143 | if (ImGui::GetItemID() == ImGui::GetActiveID()) m_FileDialogInternal.fileInputIsActive = true; |
| 4144 | ImGui::PopItemWidth(); |
| 4145 | |
| 4146 | // combobox of filters |
| 4147 | m_FileDialogInternal.filterManager.DrawFilterComboBox(m_FileDialogInternal); |
| 4148 | |
| 4149 | bool res = m_DrawValidationButtons(); |
| 4150 | m_FileDialogInternal.footerHeight = ImGui::GetCursorPosY() - posY; |
| 4151 | return res; |
| 4152 | } |
| 4153 | |
| 4154 | bool IGFD::FileDialog::m_Selectable(int vRowIdx, const char* vLabel, bool vSelected, ImGuiSelectableFlags vFlags, const ImVec2& vSizeArg) { |
| 4155 | bool res = false; |
nothing calls this directly
no test coverage detected