MCPcopy Create free account
hub / github.com/BlitterStudio/amiberry / DrawSearchBar

Method DrawSearchBar

external/ImGuiFileDialog/ImGuiFileDialog.cpp:1239–1257  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1237}
1238
1239void 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
1259void IGFD::FilterInfos::setCollectionTitle(const std::string& vTitle) {
1260 title = vTitle;

Callers 1

Calls 3

ClearFunction · 0.85
GetActiveIDFunction · 0.85

Tested by

no test coverage detected