feat(settings): add ContentArea wrapper

This commit is contained in:
2026-05-26 16:08:27 +02:00
parent bb37e19176
commit a73cad1534
2 changed files with 19 additions and 0 deletions
+1
View File
@@ -146,6 +146,7 @@ internal static class PluginHostFactory
services.AddSingleton(sp => new Ui.Components.Settings.TabSidebar( services.AddSingleton(sp => new Ui.Components.Settings.TabSidebar(
sp.GetRequiredService<FontManager>() sp.GetRequiredService<FontManager>()
)); ));
services.AddSingleton(sp => new Ui.Components.Settings.ContentArea());
services.AddSingleton(sp => new Ui.Components.StatusBar( services.AddSingleton(sp => new Ui.Components.StatusBar(
sp.GetRequiredService<ThemeRegistry>(), sp.GetRequiredService<ThemeRegistry>(),
sp.GetRequiredService<FontManager>() sp.GetRequiredService<FontManager>()
@@ -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<string> renderTab)
{
using var child = ImRaii.Child("##settings-content", new Vector2(0, 0), true);
if (!child.Success)
{
return;
}
renderTab(activeTab);
}
}