Allow searching by search-string parts.

This commit is contained in:
Ottermandias 2023-07-15 14:59:16 +02:00
parent 16dd81695f
commit fa4a426b79
3 changed files with 11 additions and 5 deletions

View file

@ -26,6 +26,7 @@ public sealed class ItemCombo : FilterComboCache<EquipItem>
_textures = textures;
Label = GetLabel(gameData, slot);
_currentItem = ItemManager.NothingId(slot);
SearchByParts = true;
}
protected override void DrawList(float width, float itemHeight)

View file

@ -19,7 +19,10 @@ public sealed class WeaponCombo : FilterComboCache<EquipItem>
public WeaponCombo(ItemManager items, FullEquipType type)
: base(() => GetWeapons(items, type))
=> Label = GetLabel(type);
{
Label = GetLabel(type);
SearchByParts = true;
}
protected override void DrawList(float width, float itemHeight)
{

View file

@ -14,7 +14,9 @@ public sealed class ModCombo : FilterComboCache<(Mod Mod, ModSettings Settings)>
{
public ModCombo(PenumbraService penumbra)
: base(penumbra.GetMods)
{ }
{
SearchByParts = false;
}
protected override string ToString((Mod Mod, ModSettings Settings) obj)
=> obj.Mod.Name;