From 5ecadc7bba9ecef50c116b87f685ae339896d6ee Mon Sep 17 00:00:00 2001 From: BlankenshipG Date: Mon, 5 Oct 2026 11:35:09 -0400 Subject: [PATCH] feat(nav): Breadcrumbs and Route overlay toggles on the Nav panel NavFace gains a toggle row bound to RynthAi's TrackBreadcrumbs and route overlay settings via the nav bridge (setBreadcrumbs / setRouteOverlay). Co-authored-by: Cursor --- ...5-nav-breadcrumbs-route-overlay-toggles.md | 36 +++++++++++++++++++ src/RynthCore.Engine/ImGui/Panels/NavFace.cs | 33 ++++++++++++++++- src/RynthCore.Engine/UI/Data/NavData.cs | 5 +++ 3 files changed, 73 insertions(+), 1 deletion(-) create mode 100644 Changelog/2026-10-05-nav-breadcrumbs-route-overlay-toggles.md diff --git a/Changelog/2026-10-05-nav-breadcrumbs-route-overlay-toggles.md b/Changelog/2026-10-05-nav-breadcrumbs-route-overlay-toggles.md new file mode 100644 index 0000000..271a21b --- /dev/null +++ b/Changelog/2026-10-05-nav-breadcrumbs-route-overlay-toggles.md @@ -0,0 +1,36 @@ +# Nav panel: Breadcrumbs and Route overlay toggles (RynthAi 0.5.9-legacy-ui) + +Date: 2026-10-05 +Branches: RynthCore `merge/aelrynth-2026.10.5.1`, RynthSuite `fix/rynthai-launcher-remote-commands` + +## What changed + +### Nav panel (engine, `NavFace`) +A new row under Route / Insert has two checkbox-style toggles. A ticked box and teal text means +on. Both are saved per character in RynthAi's settings. +- **Breadcrumbs**: records the trail you walk and draws it on the ground. Turning it off stops + recording and hides the trail. Turning it back on starts a new trail segment, so the trail + never draws a line across the stretch you walked while it was off. +- **Route overlay**: draws the route in the world: waypoint rings and connecting lines, waypoint + labels, and the guide line to the active waypoint. The waypoint HUD window keeps its own + switch (`/ra navhud`). + +### RynthAi +- `NavOverlaySettings.ShowRouteMarkers` now does something. It was saved but never read, so + route rings always drew. `NavMarkerRenderer` now skips the rings and lines when it is off, + and the waypoint labels and guide line follow it too. +- `NavOverlaySettings.TrackBreadcrumbs` now also hides the drawn trail when off. +- Nav bridge: the snapshot carries `TrackBreadcrumbs` and `ShowRouteOverlay`. New commands + `setBreadcrumbs` and `setRouteOverlay` (with `On`) save the settings. +- Chat commands: + - `/ra navtrail on|off|toggle` (the existing `clear` and the status report still work; the + report now says whether tracking is on). + - New `/ra navoverlay [on|off]` (no argument toggles). + +### Compatibility +- An older RynthAi doesn't send the two flags, so both toggles show off; clicking them does + nothing until RynthAi is updated. + +## Versions +- RynthAi plugin: 0.5.9-legacy-ui (previous 0.5.8-legacy-ui). +- The next installer is 2026.10.5.9 (previous 2026.10.5.8). diff --git a/src/RynthCore.Engine/ImGui/Panels/NavFace.cs b/src/RynthCore.Engine/ImGui/Panels/NavFace.cs index baa21e6..ef81989 100644 --- a/src/RynthCore.Engine/ImGui/Panels/NavFace.cs +++ b/src/RynthCore.Engine/ImGui/Panels/NavFace.cs @@ -1,7 +1,8 @@ // ============================================================================ // RynthCore.Engine - ImGui/Panels/NavFace.cs // ImGui face of the Nav panel (UI/Panels/NavPanel.cs): active nav + status, -// Start/Stop, route type and insert mode, Add Waypoint / Portal (not yet) / +// Start/Stop, route type and insert mode, the Breadcrumbs and Route overlay +// toggles, Add Waypoint / Portal (not yet) / // Recall / Clear / Save / Dungeon Patrol, a chat waypoint, Save As, the nav // file picker, the nav point reach (RynthAi's FollowNavMin, the same row as // Settings > Navigation), and the waypoint list (click selects the insert @@ -130,6 +131,24 @@ internal sealed class NavFace : IImGuiPanel }); NextLine(p, 26); + // Breadcrumbs | Route overlay (RynthAi's NavOverlaySettings; saved per character) + p = ImGuiNET.ImGui.GetCursorScreenPos(); + if (OverlayToggle("##crumbs", "Breadcrumbs", _data.TrackBreadcrumbs, p, half, + "Record the trail you walk and draw it on the ground (/ra navtrail on|off).\nTurning it off hides the trail; /ra navtrail clear wipes it.")) + { + bool on = !_data.TrackBreadcrumbs; + NavCommands.Send(new NavCmd { Cmd = "setBreadcrumbs", On = on }); + _data.TrackBreadcrumbs = on; + } + if (OverlayToggle("##routeovl", "Route overlay", _data.ShowRouteOverlay, new Vector2(p.X + half + 4, p.Y), half, + "Draw the route in the world: waypoint rings and lines, waypoint labels and the guide line\nto the active waypoint (/ra navoverlay on|off). The waypoint HUD window is separate.")) + { + bool on = !_data.ShowRouteOverlay; + NavCommands.Send(new NavCmd { Cmd = "setRouteOverlay", On = on }); + _data.ShowRouteOverlay = on; + } + NextLine(p, 26); + typing |= ReachRow(w); // Actions @@ -239,6 +258,18 @@ internal sealed class NavFace : IImGuiPanel _picker.Draw(); } + /// + /// A checkbox-style toggle button: ticked box and teal text when on, empty box and muted + /// text when off. Returns true when clicked (the caller flips the value). + /// + private static bool OverlayToggle(string id, string label, bool on, Vector2 pos, float width, string tooltip) + { + string text = (on ? PhosphorIcons.CheckSquare : PhosphorIcons.Square) + " " + label; + bool clicked = Button(id, text, pos, new Vector2(width, 22), on ? Teal : Mute, BtnFill, leftAlign: true); + if (ImGuiNET.ImGui.IsItemHovered()) ImGuiNET.ImGui.SetTooltip(tooltip); + return clicked; + } + /// /// Nav point reach (yd): how close nav gets to each nav point before moving on. Label, /// [-] value [+]; the typed value commits on Enter or when the box loses focus. Saves the diff --git a/src/RynthCore.Engine/UI/Data/NavData.cs b/src/RynthCore.Engine/UI/Data/NavData.cs index 8fd22c8..43f2ad3 100644 --- a/src/RynthCore.Engine/UI/Data/NavData.cs +++ b/src/RynthCore.Engine/UI/Data/NavData.cs @@ -39,6 +39,10 @@ internal sealed class NavPayload public int ActiveNavIndex { get; set; } public List NavFiles { get; set; } = new(); public List Points { get; set; } = new(); + /// RynthAi records (and draws) the walked breadcrumb trail. Older plugins omit it (false). + public bool TrackBreadcrumbs { get; set; } + /// RynthAi draws the route overlay (rings / lines, waypoint labels, guide line). + public bool ShowRouteOverlay { get; set; } /// A copy a face may change (its own point list); the points themselves are shared. public NavPayload Clone() @@ -59,6 +63,7 @@ internal sealed class NavCmd public int InsertAt { get; set; } = -1; public string NavName { get; set; } = string.Empty; public string Text { get; set; } = string.Empty; // addChat + public bool On { get; set; } // setBreadcrumbs / setRouteOverlay } [JsonSerializable(typeof(NavPayload))]