Plugin API v95: renumber the bar menu after the web panel's v94
Upstream took v93 (GetMonsterHealth) and the web panel is now v94, so the "barMenu" manifest key is v95: PluginContractVersion.BarMenu and Current, RynthCoreSdkApiVersion, the comments in SectionManifest.cs, ImGuiBar.cs and BarMenuHover.cs, the SectionsTests case names and the changelog. docs/WEB_PANEL.md names the SDK's API as 95 now. No table change. Still provisional. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
8e6658e20f
commit
fb3b3f3a69
8 changed files with 21 additions and 21 deletions
|
|
@ -1,7 +1,7 @@
|
|||
// ============================================================================
|
||||
// RynthCore.Engine - ImGui/BarMenuHover.cs
|
||||
// The timing of the bar icon dropdown (a plugin window's "barMenu", plugin API
|
||||
// v94): pure, so tools/SectionsTests compiles it as is. ImGuiBar feeds it once
|
||||
// v95): pure, so tools/SectionsTests compiles it as is. ImGuiBar feeds it once
|
||||
// a frame.
|
||||
//
|
||||
// An icon must be hovered OpenDelay before its dropdown opens (a sweep of the
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
// draws that asked for one (its manifest's "windows" with "bar", UI/Sections/
|
||||
// PluginWindows.cs; an engine panel such a window has taken over loses its own
|
||||
// button), reload (RL) and pop out.
|
||||
// A plugin window with a "barMenu" (plugin API v94) drops a column of icon buttons below its
|
||||
// A plugin window with a "barMenu" (plugin API v95) drops a column of icon buttons below its
|
||||
// bar icon after the mouse rests on it (BarMenuHover: open and close delays); a click runs that
|
||||
// item's chat command. The icon's own click still toggles the window.
|
||||
// A button whose window is open, docked or popped out, draws highlighted in the
|
||||
|
|
|
|||
|
|
@ -51,12 +51,12 @@ internal static class PluginContractVersion
|
|||
// game window (WebPanel\WebPanelApi.cs; DreamWeave's in-game market and tools), appended after v93's
|
||||
// GetMonsterHealth (was v93 on up/web-panel; renumbered after upstream's v93). The number is
|
||||
// PROVISIONAL: the unmerged branches named under v93 also use 94; whichever merges second renumbers.
|
||||
// v94: no table change. SectionManifest.cs reads a plugin window's "barMenu" (a hover dropdown on its
|
||||
// v95: no table change. SectionManifest.cs reads a plugin window's "barMenu" (a hover dropdown on its
|
||||
// bar icon: up to 6 items of id, tooltip, icon and a /command the engine runs on click). Engines
|
||||
// before v94 ignore the key. The number is PROVISIONAL, as 93 is: upstream may take 94 first,
|
||||
// in which case this renumbers on merge.
|
||||
// before v95 ignore the key (was v94 on up/bar-menu; renumbered after upstream's v93). The number
|
||||
// is PROVISIONAL, as 94 is: whichever merges second renumbers.
|
||||
/// <summary>The API version that added the "barMenu" manifest key; a plugin declaring it pins its own copy against this.</summary>
|
||||
public const uint BarMenu = 94;
|
||||
public const uint BarMenu = 95;
|
||||
|
||||
public const uint Current = 94;
|
||||
public const uint Current = 95;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@
|
|||
// opens when nothing is saved for it (v90, 2026-10-22). "scale": "draw" =
|
||||
// the window draws its content at any size (PanelScale): Ctrl+wheel over
|
||||
// it steps that size, 30-250%, not its text size (v90, 2026-10-23).
|
||||
// "barMenu" (v94, 2026-11-07): a hover dropdown on the window's bar icon, for a
|
||||
// "barMenu" (v95, 2026-11-07): a hover dropdown on the window's bar icon, for a
|
||||
// window with "bar": true. An array of { "id": "market", "tooltip": "Market",
|
||||
// "icon": "<Phosphor glyph, may be empty>", "command": "/rserver market" }:
|
||||
// "id" a short lower-case word (unique in the menu), "tooltip" the item's
|
||||
|
|
@ -60,7 +60,7 @@
|
|||
// chat command when the item is clicked. An item missing its id, tooltip or
|
||||
// command, or with a duplicate id, is dropped; at most MaxBarMenuItems (6)
|
||||
// are kept, and a "barMenu" that is not an array is ignored (the window is
|
||||
// kept). Engines before v94 ignore the key.
|
||||
// kept). Engines before v95 ignore the key.
|
||||
//
|
||||
// Everything from a plugin is checked here: ids are short lower-case words,
|
||||
// text is capped, a command must be a single "/..." chat command, and the lists
|
||||
|
|
@ -102,7 +102,7 @@ internal sealed record SectionContribution(
|
|||
public bool IsUniversal => Server.Length == 0;
|
||||
}
|
||||
|
||||
/// <summary>One entry of a window's bar-icon dropdown ("barMenu", v94): a click runs <see cref="Command"/> as a player chat command.</summary>
|
||||
/// <summary>One entry of a window's bar-icon dropdown ("barMenu", v95): a click runs <see cref="Command"/> as a player chat command.</summary>
|
||||
internal sealed record SectionBarMenuItem(string Id, string Tooltip, string Icon, string Command);
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -135,7 +135,7 @@ internal sealed record SectionWindowDecl(
|
|||
// 2026-11-07 (no version bump: older engines ignore the key): drawn under AC's own UI, like a native
|
||||
// AC window ("layer": "underUi"; frameless windows only). AC's windows cover it and take the clicks there.
|
||||
bool UnderUi = false,
|
||||
// v94: the bar icon's hover dropdown ("barMenu"); null when the window declares none.
|
||||
// v95: the bar icon's hover dropdown ("barMenu"); null when the window declares none.
|
||||
SectionBarMenuItem[]? BarMenu = null)
|
||||
{
|
||||
/// <summary>For every world, not one server.</summary>
|
||||
|
|
@ -176,7 +176,7 @@ internal static class SectionManifestParser
|
|||
public const int MaxJsonLength = 256 * 1024;
|
||||
public const int MaxWindows = 8;
|
||||
public const int MaxWindowTitleLength = 32;
|
||||
/// <summary>Most items kept in one window's bar-icon dropdown (v94).</summary>
|
||||
/// <summary>Most items kept in one window's bar-icon dropdown (v95).</summary>
|
||||
public const int MaxBarMenuItems = 6;
|
||||
public const float DefaultWindowWidth = 420f, DefaultWindowHeight = 300f, MinWindowSize = 120f, MaxWindowSize = 2000f;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue