From fa4a426b79475ac91ee04d47ffbf560bdf922398 Mon Sep 17 00:00:00 2001 From: Ottermandias Date: Sat, 15 Jul 2023 14:59:16 +0200 Subject: [PATCH] Allow searching by search-string parts. --- Glamourer/Gui/Equipment/ItemCombo.cs | 7 ++++--- Glamourer/Gui/Equipment/WeaponCombo.cs | 5 ++++- Glamourer/Gui/Tabs/DesignTab/ModCombo.cs | 4 +++- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/Glamourer/Gui/Equipment/ItemCombo.cs b/Glamourer/Gui/Equipment/ItemCombo.cs index a65a5d7..9052894 100644 --- a/Glamourer/Gui/Equipment/ItemCombo.cs +++ b/Glamourer/Gui/Equipment/ItemCombo.cs @@ -23,9 +23,10 @@ public sealed class ItemCombo : FilterComboCache public ItemCombo(DataManager gameData, ItemManager items, EquipSlot slot, TextureService textures) : base(() => GetItems(items, slot)) { - _textures = textures; - Label = GetLabel(gameData, slot); - _currentItem = ItemManager.NothingId(slot); + _textures = textures; + Label = GetLabel(gameData, slot); + _currentItem = ItemManager.NothingId(slot); + SearchByParts = true; } protected override void DrawList(float width, float itemHeight) diff --git a/Glamourer/Gui/Equipment/WeaponCombo.cs b/Glamourer/Gui/Equipment/WeaponCombo.cs index a6c05bb..5d6085a 100644 --- a/Glamourer/Gui/Equipment/WeaponCombo.cs +++ b/Glamourer/Gui/Equipment/WeaponCombo.cs @@ -19,7 +19,10 @@ public sealed class WeaponCombo : FilterComboCache 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) { diff --git a/Glamourer/Gui/Tabs/DesignTab/ModCombo.cs b/Glamourer/Gui/Tabs/DesignTab/ModCombo.cs index a5bce6e..c48158a 100644 --- a/Glamourer/Gui/Tabs/DesignTab/ModCombo.cs +++ b/Glamourer/Gui/Tabs/DesignTab/ModCombo.cs @@ -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;