Adds the plugin-facing UI registration surface (Task 9, final D.2b task). Plugins call host.Ui.AddMarkupPanel(path, binding) from Enable(); calls are buffered in BufferedUiRegistry before the GL window opens, then drained into UiHost.Root in GameWindow.OnLoad inside the RetailUi block after the first- party vitals panel. Faulty plugin markup is isolated (try/catch per panel, logged + skipped). IPluginHost.Ui added; AppPluginHost wired; StubHost in Core.Tests updated; BufferedUiRegistryTests confirms drain-once semantics. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
19 lines
456 B
C#
19 lines
456 B
C#
using AcDream.Plugin.Abstractions;
|
|
|
|
namespace AcDream.App.Plugins;
|
|
|
|
public sealed class AppPluginHost : IPluginHost
|
|
{
|
|
public AppPluginHost(IPluginLogger log, IGameState state, IEvents events, IUiRegistry ui)
|
|
{
|
|
Log = log;
|
|
State = state;
|
|
Events = events;
|
|
Ui = ui;
|
|
}
|
|
|
|
public IPluginLogger Log { get; }
|
|
public IGameState State { get; }
|
|
public IEvents Events { get; }
|
|
public IUiRegistry Ui { get; }
|
|
}
|