Merge branch 'dev/pie-lover'

This commit is contained in:
Shawrkie Williams
2025-12-25 01:41:36 -05:00
5 changed files with 21 additions and 16 deletions
+5
View File
@@ -35,6 +35,11 @@ public class ColorInputRow : HorizontalListNode
_initialColor = color; _initialColor = color;
OnColorConfirmed?.Invoke(color); OnColorConfirmed?.Invoke(color);
}; };
_colorPickerAddon?.OnColorPreviewed = color =>
{
_colorPreview?.Color = color;
OnColorChange?.Invoke(color);
};
_colorPickerAddon?.OnColorCancelled = () => OnColorCanceled?.Invoke(_initialColor); _colorPickerAddon?.OnColorCancelled = () => OnColorCanceled?.Invoke(_initialColor);
} }
}; };
@@ -1,12 +1,8 @@
using System.Drawing;
using System.Numerics; using System.Numerics;
using AetherBags.Configuration; using AetherBags.Configuration;
using AetherBags.Nodes.Color; using AetherBags.Nodes.Color;
using Dalamud.Interface;
using KamiToolKit.Classes; using KamiToolKit.Classes;
using KamiToolKit.Nodes; using KamiToolKit.Nodes;
using KamiToolKit.Premade.Addons;
using KamiToolKit.Premade.Nodes;
namespace AetherBags.Nodes.Configuration.Currency; namespace AetherBags.Nodes.Configuration.Currency;
@@ -49,11 +45,9 @@ public sealed class CurrencyConfigurationNode : TabbedVerticalListNode
Size = new Vector2(300, 24), Size = new Vector2(300, 24),
CurrentColor = config.DefaultColor, CurrentColor = config.DefaultColor,
DefaultColor = new CurrencySettings().DefaultColor, DefaultColor = new CurrencySettings().DefaultColor,
OnColorConfirmed = color => OnColorConfirmed = ApplyColorChange,
{ OnColorChange = ApplyColorChange,
config.DefaultColor = color; OnColorCanceled = ApplyColorChange,
RefreshCurrency();
},
}; };
AddNode(defaultCurrencyColorNode); AddNode(defaultCurrencyColorNode);
@@ -120,6 +114,14 @@ public sealed class CurrencyConfigurationNode : TabbedVerticalListNode
}, },
}; };
AddNode(limitCurrencyColorNode); AddNode(limitCurrencyColorNode);
return;
void ApplyColorChange(Vector4 color)
{
config.DefaultColor = color;
RefreshCurrency();
}
} }
private void RefreshCurrency() => System.AddonInventoryWindow.ManualCurrencyRefresh(); private void RefreshCurrency() => System.AddonInventoryWindow.ManualCurrencyRefresh();
@@ -1,6 +1,4 @@
using AetherBags.Configuration; using AetherBags.Configuration;
using FFXIVClientStructs.FFXIV.Component.GUI;
using KamiToolKit.Classes;
using KamiToolKit.Classes.Timelines; using KamiToolKit.Classes.Timelines;
using KamiToolKit.Nodes; using KamiToolKit.Nodes;
using System.Numerics; using System.Numerics;
@@ -12,7 +10,7 @@ internal sealed class CompactLookaheadNode : SimpleComponentNode
public readonly LabelTextNode TitleNode; public readonly LabelTextNode TitleNode;
public readonly NumericInputNode CompactLookahead = null!; public readonly NumericInputNode CompactLookahead = null!;
public unsafe CompactLookaheadNode() public CompactLookaheadNode()
{ {
GeneralSettings config = System.Config.General; GeneralSettings config = System.Config.General;
@@ -28,6 +26,7 @@ internal sealed class CompactLookaheadNode : SimpleComponentNode
Position = Position with { X = 240 }, Position = Position with { X = 240 },
Size = Size with { X = 88 }, Size = Size with { X = 88 },
IsVisible = true, IsVisible = true,
IsEnabled = config.CompactPackingEnabled,
Value = config.CompactLookahead, Value = config.CompactLookahead,
OnValueUpdate = value => OnValueUpdate = value =>
{ {
@@ -35,7 +34,6 @@ internal sealed class CompactLookaheadNode : SimpleComponentNode
System.AddonInventoryWindow.ManualInventoryRefresh(); System.AddonInventoryWindow.ManualInventoryRefresh();
} }
}; };
CompactLookahead.ComponentBase->SetEnabledState(config.CompactPackingEnabled);
CompactLookahead.AttachNode(this); CompactLookahead.AttachNode(this);
TitleNode.AddTimeline(new TimelineBuilder() TitleNode.AddTimeline(new TimelineBuilder()
@@ -11,7 +11,7 @@ internal class LayoutConfigurationNode : TabbedVerticalListNode
private readonly CheckboxNode _preferLargestFitCheckboxNode = null!; private readonly CheckboxNode _preferLargestFitCheckboxNode = null!;
private readonly CheckboxNode _useStableInsertCheckboxNode = null!; private readonly CheckboxNode _useStableInsertCheckboxNode = null!;
public unsafe LayoutConfigurationNode() public LayoutConfigurationNode()
{ {
GeneralSettings config = System.Config.General; GeneralSettings config = System.Config.General;
@@ -37,7 +37,7 @@ internal class LayoutConfigurationNode : TabbedVerticalListNode
config.CompactPackingEnabled = isChecked; config.CompactPackingEnabled = isChecked;
_preferLargestFitCheckboxNode.IsEnabled = isChecked; _preferLargestFitCheckboxNode.IsEnabled = isChecked;
_useStableInsertCheckboxNode.IsEnabled = isChecked; _useStableInsertCheckboxNode.IsEnabled = isChecked;
_compactLookaheadNode.CompactLookahead.ComponentBase->SetEnabledState(isChecked); _compactLookaheadNode.CompactLookahead.IsEnabled = isChecked;
System.AddonInventoryWindow.ManualInventoryRefresh(); System.AddonInventoryWindow.ManualInventoryRefresh();
} }
}; };