Initial commit
A modern .NET 9 NativeAOT framework for Asheron's Call client modding. Self-contained injection system that hooks D3D9 EndScene to render an ImGui overlay inside the AC client process.
This commit is contained in:
commit
80b71d295d
179 changed files with 52858 additions and 0 deletions
26
src/RynthCore.Engine/UI/OverlayHost.cs
Normal file
26
src/RynthCore.Engine/UI/OverlayHost.cs
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
// ============================================================================
|
||||
// RynthCore.Engine - UI/OverlayHost.cs
|
||||
// Static registry for overlay panels. Engine code registers panels before
|
||||
// AvaloniaOverlay.Start() is called; the window reads them at creation time.
|
||||
// ============================================================================
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Avalonia.Controls;
|
||||
|
||||
namespace RynthCore.Engine.UI;
|
||||
|
||||
internal static class OverlayHost
|
||||
{
|
||||
private static readonly List<(string Title, Func<Control> Factory)> _panels = new();
|
||||
|
||||
/// <summary>
|
||||
/// Register a panel tab. Call before AvaloniaOverlay.Start().
|
||||
/// Factory is invoked on the Avalonia UI thread when the window is created.
|
||||
/// </summary>
|
||||
internal static void RegisterPanel(string title, Func<Control> factory)
|
||||
=> _panels.Add((title, factory));
|
||||
|
||||
internal static IReadOnlyList<(string Title, Func<Control> Factory)> GetPanels()
|
||||
=> _panels;
|
||||
}
|
||||
Loading…
Reference in a new issue