diff --git a/AetherBags/Addons/AddonConfigurationWindow.cs b/AetherBags/Addons/AddonConfigurationWindow.cs index 85e6692..bf95edd 100644 --- a/AetherBags/Addons/AddonConfigurationWindow.cs +++ b/AetherBags/Addons/AddonConfigurationWindow.cs @@ -37,8 +37,6 @@ public class AddonConfigurationWindow : NativeAddon { Position = ContentStartPosition with { Y = tabContentY }, Size = ContentSize with { Y = tabContentHeight }, - ContentHeight = 400, - ScrollSpeed = 25, IsVisible = true, }; _generalScrollingAreaNode.AttachNode(this); @@ -47,8 +45,6 @@ public class AddonConfigurationWindow : NativeAddon { Position = ContentStartPosition with { Y = tabContentY }, Size = ContentSize with { Y = tabContentHeight }, - ContentHeight = 400, - ScrollSpeed = 25, IsVisible = false, }; _categoryScrollingAreaNode.AttachNode(this); @@ -57,8 +53,6 @@ public class AddonConfigurationWindow : NativeAddon { Position = ContentStartPosition with { Y = tabContentY }, Size = ContentSize with { Y = tabContentHeight }, - ContentHeight = 400, - ScrollSpeed = 25, IsVisible = false, }; _currencyScrollingAreaNode.AttachNode(this); diff --git a/AetherBags/Nodes/Configuration/Category/CategoryConfigurationNode.cs b/AetherBags/Nodes/Configuration/Category/CategoryConfigurationNode.cs index f2ddd6c..127d235 100644 --- a/AetherBags/Nodes/Configuration/Category/CategoryConfigurationNode.cs +++ b/AetherBags/Nodes/Configuration/Category/CategoryConfigurationNode.cs @@ -7,19 +7,18 @@ namespace AetherBags.Nodes.Configuration.Category; public class CategoryConfigurationNode : ConfigNode { - private readonly ScrollingAreaNode _categoryList; + private readonly ScrollingListNode _categoryList; private CategoryDefinitionConfigurationNode? _activeNode; public Action? OnCategoryChanged { get; set; } public CategoryConfigurationNode() { - _categoryList = new ScrollingAreaNode + _categoryList = new ScrollingListNode { - ContentHeight = 100.0f, - AutoHideScrollBar = true, + AutoHideScrollbar = true, }; - _categoryList.ContentNode.FitContents = true; + _categoryList.FitContents = true; _categoryList.AttachNode(this); } @@ -37,11 +36,11 @@ public class CategoryConfigurationNode : ConfigNode { _activeNode = new CategoryDefinitionConfigurationNode(option.CategoryDefinition) { - Size = _categoryList.ContentNode.Size, + Size = _categoryList.Size, OnLayoutChanged = UpdateScrollHeight, OnCategoryPropertyChanged = OnCategoryChanged, }; - _categoryList.ContentNode.AddNode(_activeNode); + _categoryList.AddNode(_activeNode); } else { @@ -53,17 +52,17 @@ public class CategoryConfigurationNode : ConfigNode private void UpdateScrollHeight() { - _categoryList.ContentNode.RecalculateLayout(); - _categoryList.ContentHeight = _categoryList.ContentNode.Height; + _categoryList.RecalculateLayout(); + //_categoryList.ContentHeight = _categoryList.Height; } protected override void OnSizeChanged() { base.OnSizeChanged(); _categoryList.Size = Size; - _categoryList.ContentNode.Width = Width; + _categoryList.Width = Width; - foreach (var node in _categoryList.ContentNode.GetNodes()) + foreach (var node in _categoryList.GetNodes()) { node.Width = Width; } diff --git a/AetherBags/Nodes/Configuration/Category/CategoryScrollingAreaNode.cs b/AetherBags/Nodes/Configuration/Category/CategoryScrollingAreaNode.cs index ba1bbb4..d6b0ef5 100644 --- a/AetherBags/Nodes/Configuration/Category/CategoryScrollingAreaNode.cs +++ b/AetherBags/Nodes/Configuration/Category/CategoryScrollingAreaNode.cs @@ -4,7 +4,7 @@ using KamiToolKit.Nodes; namespace AetherBags.Nodes.Configuration.Category; -public sealed class CategoryScrollingAreaNode : ScrollingAreaNode +public sealed class CategoryScrollingAreaNode : ScrollingListNode { private AddonCategoryConfigurationWindow? _categoryConfigurationAddon; private readonly TextButtonNode _categoryConfigurationButtonNode; @@ -13,7 +13,7 @@ public sealed class CategoryScrollingAreaNode : ScrollingAreaNode _categoryConfigurationAddon?.Toggle(), }; - ContentNode.AddNode(_categoryConfigurationButtonNode); + AddNode(_categoryConfigurationButtonNode); } private void InitializeCategoryAddon() { diff --git a/AetherBags/Nodes/Configuration/Currency/CurrencyScrollingAreaNode.cs b/AetherBags/Nodes/Configuration/Currency/CurrencyScrollingAreaNode.cs index f0e074f..e8188e0 100644 --- a/AetherBags/Nodes/Configuration/Currency/CurrencyScrollingAreaNode.cs +++ b/AetherBags/Nodes/Configuration/Currency/CurrencyScrollingAreaNode.cs @@ -2,11 +2,11 @@ using KamiToolKit.Nodes; namespace AetherBags.Nodes.Configuration.Currency; -public sealed class CurrencyScrollingAreaNode : ScrollingAreaNode +public sealed class CurrencyScrollingAreaNode : ScrollingListNode { public CurrencyScrollingAreaNode() { - ContentNode.AddNode(new CurrencyGeneralConfigurationNode + AddNode(new CurrencyGeneralConfigurationNode { Size = Size }); diff --git a/AetherBags/Nodes/Configuration/General/GeneralScrollingAreaNode.cs b/AetherBags/Nodes/Configuration/General/GeneralScrollingAreaNode.cs index 2ead348..ac01151 100644 --- a/AetherBags/Nodes/Configuration/General/GeneralScrollingAreaNode.cs +++ b/AetherBags/Nodes/Configuration/General/GeneralScrollingAreaNode.cs @@ -5,7 +5,7 @@ using KamiToolKit.Nodes; namespace AetherBags.Nodes.Configuration.General; -public sealed class GeneralScrollingAreaNode : ScrollingAreaNode +public sealed class GeneralScrollingAreaNode : ScrollingListNode { private readonly CheckboxNode _debugCheckboxNode = null!; @@ -13,11 +13,11 @@ public sealed class GeneralScrollingAreaNode : ScrollingAreaNode { config.DebugEnabled = isChecked; } }; - ContentNode.AddNode(_debugCheckboxNode); + AddNode(_debugCheckboxNode); } } \ No newline at end of file diff --git a/KamiToolKit b/KamiToolKit index ac0f811..21b3f2b 160000 --- a/KamiToolKit +++ b/KamiToolKit @@ -1 +1 @@ -Subproject commit ac0f8116f693e5a962306f0b9f917012b7ff556c +Subproject commit 21b3f2b44c1778cb4f7d5fe36a37c0a03377bb36