From cda6a4c4202866deb8d26fff7726d4c2e99f450a Mon Sep 17 00:00:00 2001 From: Ottermandias Date: Fri, 14 Mar 2025 00:13:01 +0100 Subject: [PATCH] Make preferred changed item star more noticeable, and make the color configurable. --- Penumbra/UI/Classes/Colors.cs | 2 ++ Penumbra/UI/ModsTab/ModPanelChangedItemsTab.cs | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Penumbra/UI/Classes/Colors.cs b/Penumbra/UI/Classes/Colors.cs index 4c0d1694..9c15ceb8 100644 --- a/Penumbra/UI/Classes/Colors.cs +++ b/Penumbra/UI/Classes/Colors.cs @@ -34,6 +34,7 @@ public enum ColorId : short PredefinedTagAdd, PredefinedTagRemove, TemporaryModSettingsTint, + ChangedItemPreferenceStar, NoTint, } @@ -110,6 +111,7 @@ public static class Colors ColorId.TemporaryModSettingsTint => ( 0x30FF0000, "Mod with Temporary Settings", "A mod that has temporary settings. This color is used as a tint for the regular state colors." ), ColorId.NewModTint => ( 0x8000FF00, "New Mod Tint", "A mod that was newly imported or created during this session and has not been enabled yet. This color is used as a tint for the regular state colors."), ColorId.NoTint => ( 0x00000000, "No Tint", "The default tint for all mods."), + ColorId.ChangedItemPreferenceStar => ( 0x30FFFFFF, "Preferred Changed Item Star", "The color of the star button in the mod panel's changed items tab to prioritize specific items."), _ => throw new ArgumentOutOfRangeException( nameof( color ), color, null ), // @formatter:on }; diff --git a/Penumbra/UI/ModsTab/ModPanelChangedItemsTab.cs b/Penumbra/UI/ModsTab/ModPanelChangedItemsTab.cs index 700f1d66..f70d63d2 100644 --- a/Penumbra/UI/ModsTab/ModPanelChangedItemsTab.cs +++ b/Penumbra/UI/ModsTab/ModPanelChangedItemsTab.cs @@ -12,6 +12,7 @@ using Penumbra.GameData.Structs; using Penumbra.Mods; using Penumbra.Mods.Manager; using Penumbra.String; +using Penumbra.UI.Classes; namespace Penumbra.UI.ModsTab; @@ -213,6 +214,7 @@ public class ModPanelChangedItemsTab( private ImGuiStoragePtr _stateStorage; private Vector2 _buttonSize; + private uint _starColor; public void DrawContent() { @@ -236,6 +238,7 @@ public class ModPanelChangedItemsTab( if (!table) return; + _starColor = ColorId.ChangedItemPreferenceStar.Value(); if (cache.AnyExpandable) { ImUtf8.TableSetupColumn("##exp"u8, ImGuiTableColumnFlags.WidthFixed, _buttonSize.Y); @@ -286,7 +289,7 @@ public class ModPanelChangedItemsTab( private void DrawPreferredButton(IdentifiedItem item, int idx) { if (ImUtf8.IconButton(FontAwesomeIcon.Star, "Prefer displaying this item instead of the current primary item.\n\nRight-click for more options."u8, _buttonSize, - false, ImGui.GetColorU32(ImGuiCol.TextDisabled, 0.1f))) + false, _starColor)) dataEditor.AddPreferredItem(selector.Selected!, item.Item.Id, false, true); using var context = ImUtf8.PopupContextItem("StarContext"u8, ImGuiPopupFlags.MouseButtonRight); if (!context)