diff --git a/src/spice2x/overlay/windows/config.cpp b/src/spice2x/overlay/windows/config.cpp index 06222bd..1a4abb4 100644 --- a/src/spice2x/overlay/windows/config.cpp +++ b/src/spice2x/overlay/windows/config.cpp @@ -450,6 +450,8 @@ namespace overlay::windows { ImGuiInputTextFlags_EscapeClearsAll)) { this->search_filter_in_lower_case = strtolower(this->search_filter); } + + // clear search terms if (!this->search_filter.empty()) { ImGui::SameLine(); if (ImGui::Button("Clear")) { @@ -457,15 +459,22 @@ namespace overlay::windows { this->search_filter_in_lower_case.clear(); } } + + // active only checkbox + ImGui::SameLine(); + ImGui::Checkbox("Active Only", &this->search_active_only); + ImGui::Spacing(); // draw matching options - if (!this->search_filter.empty()) { + if (!this->search_filter.empty() || this->search_active_only) { for (auto category : launcher::get_categories(launcher::Options::OptionsCategory::Everything)) { this->build_options( options, category, - const_cast(&this->search_filter_in_lower_case)); + const_cast(&this->search_filter_in_lower_case), + false, + this->search_active_only); } } } else if (this->options_group_selected == OPTIONS_TAB_QUICK) { @@ -5041,7 +5050,8 @@ namespace overlay::windows { } void Config::build_options( - std::vector