From a4cea4b19d2d576c0afaeeb52dbc2d2634841e98 Mon Sep 17 00:00:00 2001 From: Shawrkie Williams Date: Tue, 23 Dec 2025 12:40:30 -0500 Subject: [PATCH 1/3] Use `IsEnabled` correctly --- AetherBags/Nodes/Configuration/Layout/CompactLookaheadNode.cs | 4 ++-- .../Nodes/Configuration/Layout/LayoutConfigurationNode.cs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/AetherBags/Nodes/Configuration/Layout/CompactLookaheadNode.cs b/AetherBags/Nodes/Configuration/Layout/CompactLookaheadNode.cs index 638ba6f..7067cd2 100644 --- a/AetherBags/Nodes/Configuration/Layout/CompactLookaheadNode.cs +++ b/AetherBags/Nodes/Configuration/Layout/CompactLookaheadNode.cs @@ -12,7 +12,7 @@ internal sealed class CompactLookaheadNode : SimpleComponentNode public readonly LabelTextNode TitleNode; public readonly NumericInputNode CompactLookahead = null!; - public unsafe CompactLookaheadNode() + public CompactLookaheadNode() { GeneralSettings config = System.Config.General; @@ -28,6 +28,7 @@ internal sealed class CompactLookaheadNode : SimpleComponentNode Position = Position with { X = 240 }, Size = Size with { X = 88 }, IsVisible = true, + IsEnabled = config.CompactPackingEnabled, Value = config.CompactLookahead, OnValueUpdate = value => { @@ -35,7 +36,6 @@ internal sealed class CompactLookaheadNode : SimpleComponentNode System.AddonInventoryWindow.ManualInventoryRefresh(); } }; - CompactLookahead.ComponentBase->SetEnabledState(config.CompactPackingEnabled); CompactLookahead.AttachNode(this); TitleNode.AddTimeline(new TimelineBuilder() diff --git a/AetherBags/Nodes/Configuration/Layout/LayoutConfigurationNode.cs b/AetherBags/Nodes/Configuration/Layout/LayoutConfigurationNode.cs index 87e9650..c33cf4a 100644 --- a/AetherBags/Nodes/Configuration/Layout/LayoutConfigurationNode.cs +++ b/AetherBags/Nodes/Configuration/Layout/LayoutConfigurationNode.cs @@ -11,7 +11,7 @@ internal class LayoutConfigurationNode : TabbedVerticalListNode private readonly CheckboxNode _preferLargestFitCheckboxNode = null!; private readonly CheckboxNode _useStableInsertCheckboxNode = null!; - public unsafe LayoutConfigurationNode() + public LayoutConfigurationNode() { GeneralSettings config = System.Config.General; @@ -37,7 +37,7 @@ internal class LayoutConfigurationNode : TabbedVerticalListNode config.CompactPackingEnabled = isChecked; _preferLargestFitCheckboxNode.IsEnabled = isChecked; _useStableInsertCheckboxNode.IsEnabled = isChecked; - _compactLookaheadNode.CompactLookahead.ComponentBase->SetEnabledState(isChecked); + _compactLookaheadNode.CompactLookahead.IsEnabled = isChecked; System.AddonInventoryWindow.ManualInventoryRefresh(); } }; From e2a227a23c4f7825b2d7781b894ef9497f3b1357 Mon Sep 17 00:00:00 2001 From: Shawrkie Williams Date: Thu, 25 Dec 2025 01:38:55 -0500 Subject: [PATCH 2/3] Add support for preview color --- AetherBags/Nodes/Color/ColorInputRow.cs | 5 +++++ .../Currency/CurrencyConfigurationNode.cs | 20 ++++++++++--------- .../Layout/CompactLookaheadNode.cs | 2 -- 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/AetherBags/Nodes/Color/ColorInputRow.cs b/AetherBags/Nodes/Color/ColorInputRow.cs index 5263b08..6bc91d6 100644 --- a/AetherBags/Nodes/Color/ColorInputRow.cs +++ b/AetherBags/Nodes/Color/ColorInputRow.cs @@ -35,6 +35,11 @@ public class ColorInputRow : HorizontalListNode _initialColor = color; OnColorConfirmed?.Invoke(color); }; + _colorPickerAddon?.OnColorPreviewed = color => + { + _colorPreview?.Color = color; + OnColorChange?.Invoke(color); + }; _colorPickerAddon?.OnColorCancelled = () => OnColorCanceled?.Invoke(_initialColor); } }; diff --git a/AetherBags/Nodes/Configuration/Currency/CurrencyConfigurationNode.cs b/AetherBags/Nodes/Configuration/Currency/CurrencyConfigurationNode.cs index d3c4816..0d2814b 100644 --- a/AetherBags/Nodes/Configuration/Currency/CurrencyConfigurationNode.cs +++ b/AetherBags/Nodes/Configuration/Currency/CurrencyConfigurationNode.cs @@ -1,12 +1,8 @@ -using System.Drawing; using System.Numerics; using AetherBags.Configuration; using AetherBags.Nodes.Color; -using Dalamud.Interface; using KamiToolKit.Classes; using KamiToolKit.Nodes; -using KamiToolKit.Premade.Addons; -using KamiToolKit.Premade.Nodes; namespace AetherBags.Nodes.Configuration.Currency; @@ -49,11 +45,9 @@ public sealed class CurrencyConfigurationNode : TabbedVerticalListNode Size = new Vector2(300, 24), CurrentColor = config.DefaultColor, DefaultColor = new CurrencySettings().DefaultColor, - OnColorConfirmed = color => - { - config.DefaultColor = color; - RefreshCurrency(); - }, + OnColorConfirmed = ApplyColorChange, + OnColorChange = ApplyColorChange, + OnColorCanceled = ApplyColorChange, }; AddNode(defaultCurrencyColorNode); @@ -120,6 +114,14 @@ public sealed class CurrencyConfigurationNode : TabbedVerticalListNode }, }; AddNode(limitCurrencyColorNode); + + return; + + void ApplyColorChange(Vector4 color) + { + config.DefaultColor = color; + RefreshCurrency(); + } } private void RefreshCurrency() => System.AddonInventoryWindow.ManualCurrencyRefresh(); diff --git a/AetherBags/Nodes/Configuration/Layout/CompactLookaheadNode.cs b/AetherBags/Nodes/Configuration/Layout/CompactLookaheadNode.cs index 7067cd2..50adb3d 100644 --- a/AetherBags/Nodes/Configuration/Layout/CompactLookaheadNode.cs +++ b/AetherBags/Nodes/Configuration/Layout/CompactLookaheadNode.cs @@ -1,6 +1,4 @@ using AetherBags.Configuration; -using FFXIVClientStructs.FFXIV.Component.GUI; -using KamiToolKit.Classes; using KamiToolKit.Classes.Timelines; using KamiToolKit.Nodes; using System.Numerics; From 3f335696b7ec833e6b1c2ff4eceec5122a42ef0e Mon Sep 17 00:00:00 2001 From: Shawrkie Williams Date: Thu, 25 Dec 2025 01:39:41 -0500 Subject: [PATCH 3/3] Update KamiToolKit --- KamiToolKit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/KamiToolKit b/KamiToolKit index 1438568..f16338c 160000 --- a/KamiToolKit +++ b/KamiToolKit @@ -1 +1 @@ -Subproject commit 1438568d3bb37dc0de7dd7b3e3ee61e750dedaaa +Subproject commit f16338cf173eca3a0fcca389533a8ada1c4ef624