1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

Merge pull request #5317 from Laserlicht/search_inp

[1.6.4] improved text search
This commit is contained in:
Ivan Savenko
2025-01-25 13:54:27 +02:00
committed by GitHub
5 changed files with 84 additions and 54 deletions

View File

@@ -55,6 +55,7 @@
#include "../lib/gameState/TavernHeroesPool.h"
#include "../lib/gameState/UpgradeInfo.h"
#include "../lib/texts/CGeneralTextHandler.h"
#include "../lib/texts/TextOperations.h"
#include "../lib/IGameSettings.h"
#include "ConditionalWait.h"
#include "../lib/CConfigHandler.h"
@@ -1594,7 +1595,7 @@ void CObjectListWindow::init(std::shared_ptr<CIntObject> titleWidget_, std::stri
itemsVisible.clear();
for(auto & item : items)
if(boost::algorithm::contains(boost::algorithm::to_lower_copy(item.second), boost::algorithm::to_lower_copy(text)))
if(TextOperations::textSearchSimilar(text, item.second))
itemsVisible.push_back(item);
selected = 0;