From 3135d5e7e656cc37b6a60744f3cb63d50ca79b08 Mon Sep 17 00:00:00 2001 From: Ottermandias Date: Mon, 12 Aug 2024 20:57:38 +0200 Subject: [PATCH] Make collection combo mousewheel-scrollable with ctrl. --- Penumbra/UI/CollectionTab/CollectionCombo.cs | 23 +++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/Penumbra/UI/CollectionTab/CollectionCombo.cs b/Penumbra/UI/CollectionTab/CollectionCombo.cs index 9d195eed..1670be5e 100644 --- a/Penumbra/UI/CollectionTab/CollectionCombo.cs +++ b/Penumbra/UI/CollectionTab/CollectionCombo.cs @@ -1,14 +1,15 @@ using ImGuiNET; +using OtterGui; using OtterGui.Raii; +using OtterGui.Text; using OtterGui.Widgets; using Penumbra.Collections; using Penumbra.Collections.Manager; -using Penumbra.GameData.Actors; namespace Penumbra.UI.CollectionTab; public sealed class CollectionCombo(CollectionManager manager, Func> items) - : FilterComboCache(items, MouseWheelType.None, Penumbra.Log) + : FilterComboCache(items, MouseWheelType.Control, Penumbra.Log) { private readonly ImRaii.Color _color = new(); @@ -20,14 +21,26 @@ public sealed class CollectionCombo(CollectionManager manager, Func obj.Name; + + protected override void DrawCombo(string label, string preview, string tooltip, int currentSelected, float previewWidth, float itemHeight, + ImGuiComboFlags flags) + { + base.DrawCombo(label, preview, tooltip, currentSelected, previewWidth, itemHeight, flags); + ImUtf8.HoverTooltip("Control and mouse wheel to scroll."u8); + } }