From 3b8001d55dd36dfa35f6be33ee2cb55736f4f041 Mon Sep 17 00:00:00 2001 From: Alexei Kotov Date: Sat, 11 Feb 2023 02:56:15 +0300 Subject: [PATCH 1/2] Make post-processing HUD search case-insensitive --- apps/openmw/mwgui/postprocessorhud.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/apps/openmw/mwgui/postprocessorhud.cpp b/apps/openmw/mwgui/postprocessorhud.cpp index 9e05c180ca..0886234347 100644 --- a/apps/openmw/mwgui/postprocessorhud.cpp +++ b/apps/openmw/mwgui/postprocessorhud.cpp @@ -20,6 +20,8 @@ #include #include +#include + #include #include "../mwrender/postprocessor.hpp" @@ -426,9 +428,14 @@ namespace MWGui if (!technique) continue; - if (!technique->getHidden() && !processor->isTechniqueEnabled(technique) - && name.find(mFilter->getCaption()) != std::string::npos) - mInactiveList->addItem(name, technique); + if (!technique->getHidden() && !processor->isTechniqueEnabled(technique)) + { + std::string lowerName = Utf8Stream::lowerCaseUtf8(name); + std::string lowerCaption = mFilter->getCaption(); + lowerCaption = Utf8Stream::lowerCaseUtf8(lowerCaption); + if (lowerName.find(lowerCaption) != std::string::npos) + mInactiveList->addItem(name, technique); + } } for (auto technique : processor->getTechniques()) From 1df5fd341b9066a7ae2e09e32201477e27a96113 Mon Sep 17 00:00:00 2001 From: Alexei Kotov Date: Sat, 11 Feb 2023 03:04:39 +0300 Subject: [PATCH 2/2] Don't override post-processing HUD search field focus --- apps/openmw/mwgui/postprocessorhud.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/openmw/mwgui/postprocessorhud.cpp b/apps/openmw/mwgui/postprocessorhud.cpp index 0886234347..dcf66647c3 100644 --- a/apps/openmw/mwgui/postprocessorhud.cpp +++ b/apps/openmw/mwgui/postprocessorhud.cpp @@ -445,6 +445,9 @@ namespace MWGui } auto tryFocus = [this](ListWrapper* widget, const std::string& hint) { + MyGUI::Widget* oldFocus = MyGUI::InputManager::getInstance().getKeyFocusWidget(); + if (oldFocus == mFilter) + return; size_t index = widget->findItemIndexWith(hint); if (index != MyGUI::ITEM_NONE)