feat(windows): add SettingsWindow skeleton (W1)

This commit is contained in:
2026-05-26 18:35:30 +02:00
parent 6bbdc67089
commit 12bf83b826
+69
View File
@@ -0,0 +1,69 @@
using System.Numerics;
using Dalamud.Bindings.ImGui;
using Dalamud.Interface.Windowing;
using Dalamud.Utility;
using HellionChat.Resources;
using HellionChat.Ui.Components.Settings;
using Microsoft.Extensions.Logging;
namespace HellionChat.Ui.Windows;
// `internal` to match the Plugin.SettingsWindow property in W2; `public` here
// would raise CS0053 against the internal members. Matches MainWindow shape.
internal sealed class SettingsWindow : Window
{
private readonly Plugin _plugin;
private readonly TabSidebar _sidebar;
private readonly ContentArea _content;
private readonly ThemePicker _themePicker;
private readonly ColorPicker _colorPicker;
private readonly LivePreviewPanel _livePreview;
public SettingsWindow(
Plugin plugin,
TabSidebar sidebar,
ContentArea content,
ThemePicker themePicker,
ColorPicker colorPicker,
LivePreviewPanel livePreview,
ILoggerFactory loggerFactory
)
: base($"{Language.Settings_Title.Format(Plugin.PluginName)}###chat2-settings")
{
_plugin = plugin;
_sidebar = sidebar;
_content = content;
_themePicker = themePicker;
_colorPicker = colorPicker;
_livePreview = livePreview;
_ = loggerFactory;
Size = new Vector2(720, 540);
SizeCondition = ImGuiCond.FirstUseEver;
SizeConstraints = new WindowSizeConstraints
{
MinimumSize = new Vector2(600, 400),
MaximumSize = new Vector2(float.MaxValue, float.MaxValue),
};
Flags = ImGuiWindowFlags.NoCollapse;
// Carry-over from v1.6.0 stub: Escape must not auto-close, and toggle
// events must not play default Dalamud window sounds.
RespectCloseHotkey = false;
DisableWindowSounds = true;
}
public override void Draw()
{
_sidebar.Draw();
ImGui.SameLine();
_content.Draw(_sidebar.ActiveTab, RenderActiveTab);
}
private void RenderActiveTab(string tabId)
{
// M6-M12 fill these branches; skeleton renders a placeholder per tab so
// the smoke check confirms tab switching works.
ImGui.TextUnformatted($"[{tabId}] tab content lands in later task");
}
}