Bar: hover dropdown for a plugin window's barMenu

BarMenuHover (pure timer: 0.15 s open, 0.30 s close, switch at once, no reopen after a click until the icon is left), the dropdown drawn under the bar icon, and a barMenu-only plugin reload now reaches the bar (WindowPlan.MenuSignature, refreshed in PluginWindows.Sync without re-registering the panel).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Daniel Wallace 2026-11-07 20:09:48 -08:00
commit 60a7bddf59
7 changed files with 266 additions and 9 deletions

View file

@ -1,7 +1,7 @@
# Bar icon dropdown: plugin API v94
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). This change is the manifest only; a later change draws it.
(upstream may take it first; it renumbers on merge). The manifest is parsed here; the bar draws it (below).
## What changed
@ -10,7 +10,7 @@ Branch `up/bar-menu`, from `up/web-panel` (0ef12d7). Not deployed. The API numbe
(`SectionBarMenuItem` records; `Menu` is the never-null view).
- Validation, with the window always kept: the id is a short lower-case word and unique in the menu, the tooltip is
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 empty icon is kept). An item failing any of these is dropped; items past
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.
@ -21,4 +21,14 @@ Branch `up/bar-menu`, from `up/web-panel` (0ef12d7). Not deployed. The API numbe
break, over-long), empty id, duplicate id, empty tooltip, empty icon kept, 20 items capped to 6, a non-array
`barMenu`, no key, and the 48-character tooltip cap. `tools/PluginManifestTests` pins the SDK and engine numbers together.
Not yet tested in game.
Not yet tested in game.
## The dropdown
- Hovering a plugin window's bar icon for 0.15 s drops a column of icon buttons flush below it (flush above when it would
cross the bottom of the screen; clamped sideways). It stays while the mouse is over the icon or the column, and for
0.30 s after it leaves both. Another icon's dropdown replaces it at once. Clicking an item runs its command as a player
chat command (the hotkey path) and closes the dropdown. The icon's own click still toggles the window.
- A plugin reload that changes only `barMenu` reaches the bar: `PluginWindows.Sync` refreshes the hosted declaration
(`WindowPlan.MenuSignature`) without re-registering the panel, and bumps the version so the bar rebuilds its buttons.
- Timing is `ImGui/BarMenuHover.cs` (pure; `SectionsTests` `BarMenuHoverTiming`). Drawing is in-game only.