Pass down SelfTestRegistry to SelfTestWindow

This commit is contained in:
Haselnussbomber 2025-11-11 09:09:29 +01:00
parent 5dd121dfcc
commit af03e292ba
No known key found for this signature in database
GPG key ID: BB905BB49E7295D1
2 changed files with 7 additions and 5 deletions

View file

@ -33,6 +33,7 @@ using Dalamud.Interface.Utility.Raii;
using Dalamud.Interface.Windowing;
using Dalamud.Logging.Internal;
using Dalamud.Plugin.Internal;
using Dalamud.Plugin.SelfTest.Internal;
using Dalamud.Storage.Assets;
using Dalamud.Utility;
using FFXIVClientStructs.FFXIV.Client.System.Framework;
@ -103,7 +104,8 @@ internal class DalamudInterface : IInternalDisposableService
TitleScreenMenu titleScreenMenu,
GameGui gameGui,
ConsoleManager consoleManager,
AddonLifecycle addonLifecycle)
AddonLifecycle addonLifecycle,
SelfTestRegistry selfTestRegistry)
{
this.dalamud = dalamud;
this.configuration = configuration;
@ -119,7 +121,7 @@ internal class DalamudInterface : IInternalDisposableService
this.pluginStatWindow = new PluginStatWindow() { IsOpen = false };
this.pluginWindow = new PluginInstallerWindow(pluginImageCache, configuration) { IsOpen = false };
this.settingsWindow = new SettingsWindow() { IsOpen = false };
this.selfTestWindow = new SelfTestWindow() { IsOpen = false };
this.selfTestWindow = new SelfTestWindow(selfTestRegistry) { IsOpen = false };
this.styleEditorWindow = new StyleEditorWindow() { IsOpen = false };
this.titleScreenMenuWindow = new TitleScreenMenuWindow(
clientState,

View file

@ -13,7 +13,6 @@ using Dalamud.Logging.Internal;
using Dalamud.Plugin.SelfTest;
using Dalamud.Plugin.SelfTest.Internal;
using Dalamud.Utility;
using Lumina.Excel.Sheets;
namespace Dalamud.Interface.Internal.Windows.SelfTest;
@ -36,10 +35,11 @@ internal class SelfTestWindow : Window
/// <summary>
/// Initializes a new instance of the <see cref="SelfTestWindow"/> class.
/// </summary>
public SelfTestWindow()
/// <param name="selfTestRegistry">An instance of <see cref="SelfTestRegistry"/>.</param>
public SelfTestWindow(SelfTestRegistry selfTestRegistry)
: base("Dalamud Self-Test", ImGuiWindowFlags.NoScrollbar | ImGuiWindowFlags.NoScrollWithMouse)
{
this.selfTestRegistry = Service<SelfTestRegistry>.Get();
this.selfTestRegistry = selfTestRegistry;
this.Size = new Vector2(800, 800);
this.SizeCondition = ImGuiCond.FirstUseEver;