| 4180 | } |
| 4181 | |
| 4182 | bool IGFD::FileDialog::m_DrawFooter() { |
| 4183 | auto& fdFile = m_FileDialogInternal.fileManager; |
| 4184 | |
| 4185 | float posY = ImGui::GetCursorPos().y; // height of last bar calc |
| 4186 | ImGui::AlignTextToFramePadding(); |
| 4187 | if (!fdFile.dLGDirectoryMode) |
| 4188 | ImGui::Text(fileNameString); |
| 4189 | else // directory chooser |
| 4190 | ImGui::Text(dirNameString); |
| 4191 | ImGui::SameLine(); |
| 4192 | |
| 4193 | // Input file fields |
| 4194 | float width = ImGui::GetContentRegionAvail().x; |
| 4195 | if (!fdFile.dLGDirectoryMode) { |
| 4196 | ImGuiContext& g = *GImGui; |
| 4197 | width -= m_FileDialogInternal.filterManager.GetFilterComboBoxWidth() + g.Style.ItemSpacing.x; |
| 4198 | } |
| 4199 | |
| 4200 | ImGui::PushItemWidth(width); |
| 4201 | ImGuiInputTextFlags flags = ImGuiInputTextFlags_EnterReturnsTrue; |
| 4202 | if (m_FileDialogInternal.getDialogConfig().flags & ImGuiFileDialogFlags_ReadOnlyFileNameField) { |
| 4203 | flags |= ImGuiInputTextFlags_ReadOnly; |
| 4204 | } |
| 4205 | if (ImGui::InputText("##FileName", fdFile.fileNameBuffer, MAX_FILE_DIALOG_NAME_BUFFER, flags)) { |
| 4206 | m_FileDialogInternal.isOk = true; |
| 4207 | } |
| 4208 | if (ImGui::GetItemID() == ImGui::GetActiveID()) m_FileDialogInternal.fileInputIsActive = true; |
| 4209 | ImGui::PopItemWidth(); |
| 4210 | |
| 4211 | // combobox of filters |
| 4212 | m_FileDialogInternal.filterManager.DrawFilterComboBox(m_FileDialogInternal); |
| 4213 | |
| 4214 | bool res = m_DrawValidationButtons(); |
| 4215 | m_FileDialogInternal.footerHeight = ImGui::GetCursorPosY() - posY; |
| 4216 | return res; |
| 4217 | } |
| 4218 | |
| 4219 | bool IGFD::FileDialog::m_Selectable(int vRowIdx, const char* vLabel, bool vSelected, ImGuiSelectableFlags vFlags, const ImVec2& vSizeArg) { |
| 4220 | bool res = false; |
nothing calls this directly
no test coverage detected