feat: SK Breadcrumbs and Route overlay on Settings > Navigation

The Nav panel's two switches as Settings rows (hidden for a RynthAi that doesn't send them).
Each side refreshes the other after a change; the tooltips are shared.
This commit is contained in:
BlankenshipG 2026-10-15 11:35:38 -04:00
commit 61e1e0b827
4 changed files with 71 additions and 4 deletions

View file

@ -0,0 +1,45 @@
# Breadcrumbs and Route overlay on Settings > Navigation (2026.10.5.62)
Date: 2026-10-15
| Component | Version | Previous release |
|---|---|---|
| RynthCore.Engine | 2026.10.5.62 | 2026.10.5.61 |
## What's new
Settings > Navigation now has the Nav panel's two overlay switches, at the top of "Nav Marker
Display":
- **Breadcrumbs**: record the trail you walk and draw it on the ground (`/ra navtrail on|off`).
- **Route Overlay**: draw the route in the world, meaning the waypoint rings and lines, the
waypoint labels and the guide line (`/ra navoverlay on|off`).
They are the same switches as on the Nav panel, not copies. A change in either place shows in the
other:
- The Nav panel's toggle also asks the Settings page to fetch again. It updates the Nav panel's
own settings copy too, so a nav point reach saved straight afterwards doesn't send the old value
back.
- A save from the Settings page also asks the Nav panel to fetch again.
Both panels share the tooltips (`SettingsSchema.BreadcrumbsTip` and `RouteOverlayTip`).
## Compatibility
The new fields (`TrackBreadcrumbs` and `ShowRouteOverlay` in `RynthAiSettings`) are nullable.
- **Older RynthAi:** it doesn't send them, so the two rows stay hidden, and a save sends null,
which RynthAi reads as unchanged.
- **RynthAi 0.5.70-legacy-ui or later:** sends and applies them.
## Files
- `src/RynthCore.Engine/UI/Data/SettingsData.cs`: the fields, the two rows, the shared tooltips,
and the Nav refresh after a save.
- `src/RynthCore.Engine/ImGui/Panels/NavFace.cs`: the shared tooltips and the local settings copy.
- `src/RynthCore.Engine/UI/Data/RynthAiData.cs`: a Settings refresh after each nav command.
## Install
The installer build (`installer\Build-Installer.ps1`) stamps the engine as 2026.10.5.62.

View file

@ -157,19 +157,21 @@ internal sealed class NavFace : IImGuiPanel
// 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."))
// Also on Settings > Navigation. The local settings copy takes the new value too, so a reach
// save from this panel before the next settings fetch doesn't send the old one back.
if (OverlayToggle("##crumbs", "Breadcrumbs", _data.TrackBreadcrumbs, p, half, SettingsSchema.BreadcrumbsTip))
{
bool on = !_data.TrackBreadcrumbs;
NavCommands.Send(new NavCmd { Cmd = "setBreadcrumbs", On = on });
_data.TrackBreadcrumbs = on;
if (_settings?.TrackBreadcrumbs != null) _settings.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."))
if (OverlayToggle("##routeovl", "Route overlay", _data.ShowRouteOverlay, new Vector2(p.X + half + 4, p.Y), half, SettingsSchema.RouteOverlayTip))
{
bool on = !_data.ShowRouteOverlay;
NavCommands.Send(new NavCmd { Cmd = "setRouteOverlay", On = on });
_data.ShowRouteOverlay = on;
if (_settings?.ShowRouteOverlay != null) _settings.ShowRouteOverlay = on;
}
NextLine(p, 26);

View file

@ -371,6 +371,7 @@ internal static unsafe class RynthAiCommands
finally { Marshal.FreeHGlobal(p); }
if (refreshPatrol) UiSources.Patrol.RequestRefresh();
UiSources.Nav.RequestRefresh(); // the plugin applied it: the Nav panels show it next poll
UiSources.Settings.RequestRefresh(); // Breadcrumbs / Route overlay are on Settings > Navigation too
});
/// <summary>

View file

@ -160,6 +160,11 @@ internal sealed class RynthAiSettings
// RynthAi NavResumeNearest: macro start, route loads and resuming after a pause that moved
// the character head for the closest waypoint. On by default; an older plugin ignores it.
public bool NavResumeNearest { get; set; } = true;
// RynthAi NavOverlay.TrackBreadcrumbs / ShowRouteMarkers: the Nav panel's Breadcrumbs and Route
// overlay switches, also on Settings > Navigation. Null = a RynthAi that doesn't send them: the
// rows hide, and a save sends null back, which RynthAi reads as unchanged.
public bool? TrackBreadcrumbs { get; set; }
public bool? ShowRouteOverlay { get; set; }
// RynthAi dungeon patrol (/ra dunnav-patrol; RynthAi DungeonPatrolOptions). The defaults are
// the patrol as it was before these settings; an older plugin ignores them.
public int DunPatrolCoverage { get; set; } // 0 whole dungeon, 1 loops only, 2 everything, 3 sweep
@ -319,6 +324,7 @@ internal static unsafe class SettingsCommands
try { _setSettingsJson(ansi); }
finally { Marshal.FreeHGlobal(ansi); }
UiSources.Settings.RequestRefresh();
UiSources.Nav.RequestRefresh(); // the Nav panel's Breadcrumbs / Route overlay switches
});
}
}
@ -431,6 +437,15 @@ internal static class SettingsSchema
"close to its leader, and the nav marker ring shows it. Dungeon doorways use at most 1 yd. Up to 2 yd, " +
"nav walks right up to each point before turning (tight dungeons); bigger values round corners.";
// The Nav panel's two overlay switches (ImGui/Panels/NavFace.cs), also on Settings > Navigation.
public const string BreadcrumbsTip =
"Record the trail you walk and draw it on the ground (/ra navtrail on|off).\n" +
"Turning it off hides the trail; /ra navtrail clear wipes it.";
public const string RouteOverlayTip =
"Draw the route in the world: waypoint rings and lines, waypoint labels and the guide line\n" +
"to the active waypoint (/ra navoverlay on|off). The waypoint HUD window is separate.";
private const string SameAsNavPanel = "\nThe same switch as on the Nav panel.";
// Also shown by the dashboard's Ranges slide-out (ImGui/Panels/RangesSlideOut.cs), which
// edits these same rows (found by label with Find).
public const string MonsterRangeTip =
@ -924,6 +939,10 @@ internal static class SettingsSchema
Float(NavPointReachLabel, s => s.FollowNavMin, (s, v) => s.FollowNavMin = v, 0.5f, 20f, 0.1f, NavPointReachTip),
Spacer(),
Section("Nav Marker Display"),
Bool("Breadcrumbs", s => s.TrackBreadcrumbs ?? true, (s, v) => s.TrackBreadcrumbs = v,
BreadcrumbsTip + SameAsNavPanel, when: s => s.TrackBreadcrumbs.HasValue),
Bool("Route Overlay", s => s.ShowRouteOverlay ?? true, (s, v) => s.ShowRouteOverlay = v,
RouteOverlayTip + SameAsNavPanel, when: s => s.ShowRouteOverlay.HasValue),
Float("Ring Thickness", s => s.NavRingThickness, (s, v) => s.NavRingThickness = v, 1f, 16f, 1f),
Float("Line Thickness", s => s.NavLineThickness, (s, v) => s.NavLineThickness = v, 1f, 16f, 1f),
Float("Height Offset", s => s.NavHeightOffset, (s, v) => s.NavHeightOffset = v, -5f, 5f, 0.05f,