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 <cursoragent@cursor.com>
This commit is contained in:
BlankenshipG 2026-10-05 11:35:09 -04:00
commit 5ecadc7bba
3 changed files with 73 additions and 1 deletions

View file

@ -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).

View file

@ -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();
}
/// <summary>
/// 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).
/// </summary>
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;
}
/// <summary>
/// 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

View file

@ -39,6 +39,10 @@ internal sealed class NavPayload
public int ActiveNavIndex { get; set; }
public List<string> NavFiles { get; set; } = new();
public List<NavPoint> Points { get; set; } = new();
/// <summary>RynthAi records (and draws) the walked breadcrumb trail. Older plugins omit it (false).</summary>
public bool TrackBreadcrumbs { get; set; }
/// <summary>RynthAi draws the route overlay (rings / lines, waypoint labels, guide line).</summary>
public bool ShowRouteOverlay { get; set; }
/// <summary>A copy a face may change (its own point list); the points themselves are shared.</summary>
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))]