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(); } };