mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-17 01:10:10 +00:00
Merge branch 'postprocesshud' into 'master'
Improve post-process HUD search field usability (#7198) Closes #7198 See merge request OpenMW/openmw!2717
This commit is contained in:
commit
f87b9e7bcb
@ -20,6 +20,8 @@
|
|||||||
#include <components/fx/technique.hpp>
|
#include <components/fx/technique.hpp>
|
||||||
#include <components/fx/widgets.hpp>
|
#include <components/fx/widgets.hpp>
|
||||||
|
|
||||||
|
#include <components/misc/utf8stream.hpp>
|
||||||
|
|
||||||
#include <components/widgets/box.hpp>
|
#include <components/widgets/box.hpp>
|
||||||
|
|
||||||
#include "../mwrender/postprocessor.hpp"
|
#include "../mwrender/postprocessor.hpp"
|
||||||
@ -426,9 +428,14 @@ namespace MWGui
|
|||||||
if (!technique)
|
if (!technique)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (!technique->getHidden() && !processor->isTechniqueEnabled(technique)
|
if (!technique->getHidden() && !processor->isTechniqueEnabled(technique))
|
||||||
&& name.find(mFilter->getCaption()) != std::string::npos)
|
{
|
||||||
mInactiveList->addItem(name, 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())
|
for (auto technique : processor->getTechniques())
|
||||||
@ -438,6 +445,9 @@ namespace MWGui
|
|||||||
}
|
}
|
||||||
|
|
||||||
auto tryFocus = [this](ListWrapper* widget, const std::string& hint) {
|
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);
|
size_t index = widget->findItemIndexWith(hint);
|
||||||
|
|
||||||
if (index != MyGUI::ITEM_NONE)
|
if (index != MyGUI::ITEM_NONE)
|
||||||
|
Loading…
Reference in New Issue
Block a user