diff --git a/Changelog/2026-11-07-bar-menu.md b/Changelog/2026-11-07-bar-menu.md index 34eb83a..7fc6211 100644 --- a/Changelog/2026-11-07-bar-menu.md +++ b/Changelog/2026-11-07-bar-menu.md @@ -1,7 +1,7 @@ -# Bar icon dropdown: plugin API v94 +# Bar icon dropdown: plugin API v95 -Branch `up/bar-menu`, from `up/web-panel` (0ef12d7). Not deployed. The API number 94 is provisional, as 93 is -(upstream may take it first; it renumbers on merge). The manifest is parsed here; the bar draws it (below). +Branch `pr/bar-menu`, from `pr/web-panel` (web panel, v94). Not deployed. The API number 95 is provisional, as +94 is (unmerged upstream branches also use these numbers; whichever merges second renumbers). The manifest is parsed here; the bar draws it (below). ## What changed @@ -12,8 +12,8 @@ Branch `up/bar-menu`, from `up/web-panel` (0ef12d7). Not deployed. The API numbe non-empty and capped at 48 characters, the command is a single `/...` chat command (the same rule as a contribution's), the icon is one Phosphor glyph or empty (an icon that is not a glyph is kept as an empty icon, and the bar draws the tooltip's first letter). An item with a bad id, tooltip or command is dropped; items past `MaxBarMenuItems` (6) are ignored; a `barMenu` that is not an array is ignored. -- `PluginContractVersion.Current` and the SDK's `RynthCoreSdkApiVersion` (`RynthCore.PluginSdk.targets`) go to 94. - No function table change. Engines before v94 ignore the key, so a plugin can declare it unconditionally. +- `PluginContractVersion.Current` and the SDK's `RynthCoreSdkApiVersion` (`RynthCore.PluginSdk.targets`) go to 95. + No function table change. Engines before v95 ignore the key, so a plugin can declare it unconditionally. ## Tests diff --git a/docs/WEB_PANEL.md b/docs/WEB_PANEL.md index ed1634d..af6a095 100644 --- a/docs/WEB_PANEL.md +++ b/docs/WEB_PANEL.md @@ -198,7 +198,7 @@ the plugin to keep working on a core without the web panel, with ShellExecute as 1. **Declare `RynthPluginMinEngineApi` at the plugin's true minimum.** In release builds (`-p:RynthPluginSharedSdk=true`, as `Publish-Update.ps1` and `Build-Installer.ps1` pass), a declared minimum - *below 88* is raised to the API of the SDK the plugin was built with (94 now), and the launcher then holds the + *below 88* is raised to the API of the SDK the plugin was built with (95 now), and the launcher then holds the plugin back from older cores, which kills the fallback (`RynthCore.PluginSdk.targets`: `RynthCoreManagedPluginApi` is 88). There is no separate opt-out property: declaring a minimum of **88 or higher** is the opt-out, and a declared 88 or higher is used as it is. Declare the lowest API your plugin really needs at load, and make diff --git a/src/RynthCore.Engine/ImGui/BarMenuHover.cs b/src/RynthCore.Engine/ImGui/BarMenuHover.cs index 3dc6d87..3a2e6b2 100644 --- a/src/RynthCore.Engine/ImGui/BarMenuHover.cs +++ b/src/RynthCore.Engine/ImGui/BarMenuHover.cs @@ -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 diff --git a/src/RynthCore.Engine/ImGui/ImGuiBar.cs b/src/RynthCore.Engine/ImGui/ImGuiBar.cs index 4442e5b..7b00bee 100644 --- a/src/RynthCore.Engine/ImGui/ImGuiBar.cs +++ b/src/RynthCore.Engine/ImGui/ImGuiBar.cs @@ -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 diff --git a/src/RynthCore.Engine/Plugins/PluginContractVersion.cs b/src/RynthCore.Engine/Plugins/PluginContractVersion.cs index 0b1e3a2..d13120b 100644 --- a/src/RynthCore.Engine/Plugins/PluginContractVersion.cs +++ b/src/RynthCore.Engine/Plugins/PluginContractVersion.cs @@ -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. /// The API version that added the "barMenu" manifest key; a plugin declaring it pins its own copy against this. - public const uint BarMenu = 94; + public const uint BarMenu = 95; - public const uint Current = 94; + public const uint Current = 95; } diff --git a/src/RynthCore.Engine/UI/Sections/SectionManifest.cs b/src/RynthCore.Engine/UI/Sections/SectionManifest.cs index 438df06..08f5de2 100644 --- a/src/RynthCore.Engine/UI/Sections/SectionManifest.cs +++ b/src/RynthCore.Engine/UI/Sections/SectionManifest.cs @@ -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": "", "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; } -/// One entry of a window's bar-icon dropdown ("barMenu", v94): a click runs as a player chat command. +/// One entry of a window's bar-icon dropdown ("barMenu", v95): a click runs as a player chat command. internal sealed record SectionBarMenuItem(string Id, string Tooltip, string Icon, string Command); /// @@ -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) { /// For every world, not one server. @@ -176,7 +176,7 @@ internal static class SectionManifestParser public const int MaxJsonLength = 256 * 1024; public const int MaxWindows = 8; public const int MaxWindowTitleLength = 32; - /// Most items kept in one window's bar-icon dropdown (v94). + /// Most items kept in one window's bar-icon dropdown (v95). public const int MaxBarMenuItems = 6; public const float DefaultWindowWidth = 420f, DefaultWindowHeight = 300f, MinWindowSize = 120f, MaxWindowSize = 2000f; diff --git a/src/RynthCore.PluginSdk/build/RynthCore.PluginSdk.targets b/src/RynthCore.PluginSdk/build/RynthCore.PluginSdk.targets index 5abe769..8434353 100644 --- a/src/RynthCore.PluginSdk/build/RynthCore.PluginSdk.targets +++ b/src/RynthCore.PluginSdk/build/RynthCore.PluginSdk.targets @@ -36,7 +36,7 @@ - 94 + 95 88 <_RynthPluginManifestOn Condition="'$(RynthPluginMinEngineApi)' != '' and '$(RynthPluginManifest)' != 'false'">true diff --git a/tools/SectionsTests/Program.cs b/tools/SectionsTests/Program.cs index 52568cb..bfdeb98 100644 --- a/tools/SectionsTests/Program.cs +++ b/tools/SectionsTests/Program.cs @@ -588,7 +588,7 @@ internal static class Program "chrome and fitHeight are in the signature (a change re-registers)"); } - // -- Bar icon dropdown (v94) -- + // -- Bar icon dropdown (v95) -- private static string BarMenuManifest(string windowExtra) => "{ \"version\": 1, \"windows\": [ { \"id\": \"server\", \"title\": \"DreamWeave\", \"surface\": \"window:server\", \"bar\": true" @@ -596,7 +596,7 @@ internal static class Program private static void ManifestBarMenu() { - Case("plugin windows: barMenu (v94)"); + Case("plugin windows: barMenu (v95)"); string storefront = ((char)0xE470).ToString(), shield = ((char)0xE40A).ToString(), sparkle = ((char)0xE6A2).ToString(); string longTip = new string('T', 60); string longCommand = "/" + new string('c', 250);