From 23e1b2d737688dc0d8948d9e99c80573b53111bb Mon Sep 17 00:00:00 2001 From: bluepilledgreat <97983689+bluepilledgreat@users.noreply.github.com> Date: Sun, 20 Oct 2024 02:10:58 +0100 Subject: [PATCH] count descendants and increase element cap --- Bloxstrap/UI/Elements/Bootstrapper/CustomDialog.Creator.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Bloxstrap/UI/Elements/Bootstrapper/CustomDialog.Creator.cs b/Bloxstrap/UI/Elements/Bootstrapper/CustomDialog.Creator.cs index 359ce19..0ce0bd2 100644 --- a/Bloxstrap/UI/Elements/Bootstrapper/CustomDialog.Creator.cs +++ b/Bloxstrap/UI/Elements/Bootstrapper/CustomDialog.Creator.cs @@ -14,7 +14,7 @@ namespace Bloxstrap.UI.Elements.Bootstrapper { public partial class CustomDialog { - private const int MaxElements = 50; + private const int MaxElements = 100; private static ThicknessConverter? _thicknessConverter = null; private static ThicknessConverter ThicknessConverter { get => _thicknessConverter ??= new ThicknessConverter(); } @@ -691,7 +691,7 @@ namespace Bloxstrap.UI.Elements.Bootstrapper if (xml.Attribute("Version")?.Value != "0") throw new Exception("Unknown BloxstrapCustomBootstrapper version"); - if (xml.Elements().Count() > MaxElements) + if (xml.Descendants().Count() > MaxElements) throw new Exception($"Custom bootstrappers can have a maximum of {MaxElements} elements"); _initialised = true;