feat(settings): add ContentArea wrapper
This commit is contained in:
@@ -146,6 +146,7 @@ internal static class PluginHostFactory
|
||||
services.AddSingleton(sp => new Ui.Components.Settings.TabSidebar(
|
||||
sp.GetRequiredService<FontManager>()
|
||||
));
|
||||
services.AddSingleton(sp => new Ui.Components.Settings.ContentArea());
|
||||
services.AddSingleton(sp => new Ui.Components.StatusBar(
|
||||
sp.GetRequiredService<ThemeRegistry>(),
|
||||
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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user