From a73cad1534bbea204304c3f1dbba5cef167fe93f Mon Sep 17 00:00:00 2001 From: Jon Kazama Date: Tue, 26 May 2026 16:08:27 +0200 Subject: [PATCH] feat(settings): add ContentArea wrapper --- HellionChat/PluginHostFactory.cs | 1 + .../Ui/Components/Settings/ContentArea.cs | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 HellionChat/Ui/Components/Settings/ContentArea.cs diff --git a/HellionChat/PluginHostFactory.cs b/HellionChat/PluginHostFactory.cs index e1abcda..16fc6a3 100644 --- a/HellionChat/PluginHostFactory.cs +++ b/HellionChat/PluginHostFactory.cs @@ -146,6 +146,7 @@ internal static class PluginHostFactory services.AddSingleton(sp => new Ui.Components.Settings.TabSidebar( sp.GetRequiredService() )); + services.AddSingleton(sp => new Ui.Components.Settings.ContentArea()); services.AddSingleton(sp => new Ui.Components.StatusBar( sp.GetRequiredService(), sp.GetRequiredService() diff --git a/HellionChat/Ui/Components/Settings/ContentArea.cs b/HellionChat/Ui/Components/Settings/ContentArea.cs new file mode 100644 index 0000000..1e7da68 --- /dev/null +++ b/HellionChat/Ui/Components/Settings/ContentArea.cs @@ -0,0 +1,18 @@ +using System.Numerics; +using Dalamud.Interface.Utility.Raii; + +namespace HellionChat.Ui.Components.Settings; + +internal sealed class ContentArea +{ + public void Draw(string activeTab, Action renderTab) + { + using var child = ImRaii.Child("##settings-content", new Vector2(0, 0), true); + if (!child.Success) + { + return; + } + + renderTab(activeTab); + } +}