| 1237 | } |
| 1238 | |
| 1239 | void IGFD::SearchManager::DrawSearchBar(FileDialogInternal& vFileDialogInternal) { |
| 1240 | // search field |
| 1241 | if (IMGUI_BUTTON(resetButtonString "##BtnImGuiFileDialogSearchField")) { |
| 1242 | Clear(); |
| 1243 | vFileDialogInternal.fileManager.ApplyFilteringOnFileList(vFileDialogInternal); |
| 1244 | } |
| 1245 | if (ImGui::IsItemHovered()) ImGui::SetTooltip(buttonResetSearchString); |
| 1246 | ImGui::SameLine(); |
| 1247 | ImGui::Text(searchString); |
| 1248 | ImGui::SameLine(); |
| 1249 | ImGui::PushItemWidth(ImGui::GetContentRegionAvail().x); |
| 1250 | bool edited = ImGui::InputText("##InputImGuiFileDialogSearchField", searchBuffer, MAX_FILE_DIALOG_NAME_BUFFER); |
| 1251 | if (ImGui::GetItemID() == ImGui::GetActiveID()) searchInputIsActive = true; |
| 1252 | ImGui::PopItemWidth(); |
| 1253 | if (edited) { |
| 1254 | searchTag = searchBuffer; |
| 1255 | vFileDialogInternal.fileManager.ApplyFilteringOnFileList(vFileDialogInternal); |
| 1256 | } |
| 1257 | } |
| 1258 | |
| 1259 | void IGFD::FilterInfos::setCollectionTitle(const std::string& vTitle) { |
| 1260 | title = vTitle; |
no test coverage detected