Bar icon dropdown: barMenu on plugin windows (API v95) #13

Open
AwfulWaffle wants to merge 26 commits from AwfulWaffle/RynthCore:bar-menu into main
2 changed files with 12 additions and 1 deletions
Showing only changes of commit 2841df63be - Show all commits

Web panel ABI: x86 struct assertions, restore v93 divider encoding

WebPanelStructsMatch now asserts 48 bytes / Reserved at 32 on x86 for engine and SDK types when run 32-bit. PluginContract.cs v93 divider was double-encoded (cp1252 read of UTF-8); restored to box-drawing chars.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Daniel Wallace 2026-11-07 14:34:35 -08:00

View file

@ -1070,7 +1070,7 @@ internal struct RynthCoreAPI
/// Read-only, any thread, no game calls. Requires API v93+.</summary>
public IntPtr GetMonsterHealthFn;
//── v93: a WebView2 web panel over the game window (WebPanel\WebPanelApi.cs) ──
// ── v93: a WebView2 web panel over the game window (WebPanel\WebPanelApi.cs) ──
// No call blocks its caller (AC's main thread, the plugin pump and ImGui draws all call these).
/// <summary>v93: <c>int WebPanelOpen(WebPanelOpenNative* open)</c>: opens (or replaces) the web panel.

View file

@ -628,6 +628,17 @@ internal static class Program
StructMirror(typeof(RynthCore.Engine.Plugins.WebPanelOpenNative), typeof(RynthCore.PluginSdk.WebPanelOpenNative), 8 + 4 * p + 8 + 16);
StructMirror(typeof(RynthCore.Engine.Plugins.WebPanelStateNative), typeof(RynthCore.PluginSdk.WebPanelStateNative), 48);
Eq((int)Marshal.OffsetOf<RynthCore.Engine.Plugins.WebPanelOpenNative>("Reserved"), 8 + 4 * p + 8, "engine WebPanelOpenNative.Reserved offset (32 on x86)");
// The 32-bit AC client's contract: 48 bytes, Reserved at 32 (only checked when this run is x86).
if (IntPtr.Size == 4)
{
Eq(Marshal.SizeOf<RynthCore.Engine.Plugins.WebPanelOpenNative>(), 48, "x86 engine WebPanelOpenNative size");
Eq(Marshal.SizeOf<RynthCore.PluginSdk.WebPanelOpenNative>(), 48, "x86 SDK WebPanelOpenNative size");
Eq((int)Marshal.OffsetOf<RynthCore.Engine.Plugins.WebPanelOpenNative>("Reserved"), 32, "x86 engine WebPanelOpenNative.Reserved offset");
Eq((int)Marshal.OffsetOf<RynthCore.PluginSdk.WebPanelOpenNative>("Reserved"), 32, "x86 SDK WebPanelOpenNative.Reserved offset");
Eq(Marshal.SizeOf<RynthCore.Engine.Plugins.WebPanelStateNative>(), 48, "x86 engine WebPanelStateNative size");
Eq(Marshal.SizeOf<RynthCore.PluginSdk.WebPanelStateNative>(), 48, "x86 SDK WebPanelStateNative size");
}
Console.WriteLine($" (WebPanelStructsMatch ran with IntPtr.Size={IntPtr.Size})");
}
// v93: every code value agrees between the engine's enums and the SDK's.