diff --git a/Changelog/2026-10-04-floating-huds.md b/Changelog/2026-10-04-floating-huds.md new file mode 100644 index 0000000..f29351f --- /dev/null +++ b/Changelog/2026-10-04-floating-huds.md @@ -0,0 +1,93 @@ +# Floating HUDs: item count HUD, Mini Remote, quest favorites (2026-10-04) + +RynthAi 0.6.23, plus an engine Settings button. Ships in the next installer after 2026.10.4.17. + +## What changed + +Four new floating windows, modelled on UtilityBelt's Item Hud, Mini Remote and quest +favorites. They are ordinary ImGui windows. You can dock them, undock them, or drag them +outside the AC window, because the engine has docking and multi-viewport enabled. Each HUD +remembers its own position. + +| Window | Controlled from | Command | +|--------|-----------------|---------| +| Inventory HUDs (setup) | Advanced Settings > Inventory Management > **Inventory HUDs...**, and the same button in the Avalonia Settings panel | `/ra huds [show\|hide]` | +| Item count HUD | Inventory HUDs setup window | `/ra itemhud [show\|hide]` | +| Mini Remote | Inventory HUDs setup window | `/ra remote [show\|hide]` | +| Quest favorites HUD | ILT Hub > Character > Quest tracker | `/ra quests favhud [show\|hide]` | +| Quests (pop-out tracker) | ILT Hub quest tracker **Pop out** button | `/ra quests window [show\|hide]` | + +Running a command without `show` or `hide` toggles the window. + +### Item count HUD + +- Shows one row per pinned item: the item's icon (read from portal.dat) and how many you + carry, with stacks added up across all packs. The count turns red at 0. Names are optional. +- Right-click the HUD to show names, lock its position, change the icon size (12–48 px), + open the setup window, or hide it. + +### Mini Remote + +- **Stats** (ILT-like worlds): session time, plus XP, Luminance, kills, coins and pyreals per hour. + **Reset XP** restarts the session rates. **Report** prints a summary to local chat. +- **Pet**: the essence that is out ("Out" / "Healing"), or the next combat essence + ("Ready" / "Empty"). +- **Item gems**: a 5×6 grid of item slots. Click a slot to use that item; the slot dims when + you carry none. Right-click a slot to assign the selected item or clear it. +- **Toggles**: Macro, Combat, Buff, Nav, Loot, Meta, Pet (summon pets). +- **Bank** (ILT-like worlds): P, Lum, LK, MK, EC, WE from the ILT Hub bank tracker. +- **Rebuff**: FB (force rebuff) and CFB (cancel force rebuff). +- Right-click the window background to hide sections, lock its position, open the setup + window, or hide it. + +### Inventory HUDs setup window + +- Show/hide the item HUD (with or without names) and the Mini Remote. +- **Scan pack**, **Add from inventory** (pins the selected item), **Drop missing** (unpins + items you no longer carry). +- An **On HUD** list (Up/Down to reorder) and a filterable **Not on HUD** list of everything in + your pack, with `<` / `>` to move items between them. Double-click an item in Not on HUD to + pin it. +- Mini Remote slot picker with **Set** (from the selected item), **Clear** and **Refresh**. + +Item HUD and Mini Remote settings are saved per character in `huds.json`. + +### Quest favorites + +- The ILT Hub quest tracker has a new star column. Click `*` to favourite a quest. + **Favorites only** filters the table to starred quests. +- **Show floating favorites HUD** opens a small HUD listing starred quests, with ready / + time-left. Right-click it to lock it, open the quest tracker, refresh `/myquests`, or hide it. +- **Pop out** moves the quest tracker into its own "Quests" window. Closing that window docks + it back into the Hub. +- Favorites and HUD flags are saved per character in `ilt-hub.json` (`Character.QuestFavorites`). + +## Not carried over from UtilityBelt + +These UtilityBelt Mini Remote and Quests features were left out: + +- Storm, Chat XL, Guardian/Translate, the profile combos and the Fellow toggle. RynthAi has no + equivalent systems for these yet. +- The L / LumS / KillL / PassL / C / Conv stat cells. +- The quest rewards editor. + +## Files + +- New `Huds/` folder: + - `HudController.cs`: pack scan, pump-thread actions, commands. + - `HudState.cs`: settings and `huds.json` store. + - `HudIconCache.cs`: decodes portal.dat icons and uploads D3D9 textures. + - `DxtUtil.cs`: DXT decoder. + - `HudDraw.cs`, `ItemCountHud.cs`, `MiniRemoteHud.cs`, `HudSetupUi.cs`. +- `IltHub/IltQuests.cs`: favorites, favorites HUD, pop-out window. +- `IltHub/IltHubState.cs`, `IltHubStore.cs`: quest favorite fields. +- `IltHub/IltHubUi.cs`, `IltHubController.cs`: floating window rendering and the `quests` verbs. +- `IltHub/IltSessionRates.cs`: `RateSummary` for the Mini Remote. +- `IltHub/IltPets.cs`: Mini Remote pet line. +- `LegacyUi/LegacyAdvancedSettingsUi.cs`, `LegacyDashboardRenderer.cs`: Inventory HUDs button. +- `RynthAiPlugin.cs`, `RynthAiCommands.cs`: wiring and `/ra` help. +- `Diagnostics/RynthLog.cs`: new `Huds` log category. +- Engine: + - `UI/Panels/SettingsPanel.cs`: Inventory HUDs button in Inventory Management. + - `UI/Panels/RynthAiPanel.cs`: `SendRynthAiCommand` helper. +- RynthAi version 0.6.22 → 0.6.23. diff --git a/src/RynthCore.Engine/UI/Panels/RynthAiPanel.cs b/src/RynthCore.Engine/UI/Panels/RynthAiPanel.cs index 9407e99..0307801 100644 --- a/src/RynthCore.Engine/UI/Panels/RynthAiPanel.cs +++ b/src/RynthCore.Engine/UI/Panels/RynthAiPanel.cs @@ -1600,6 +1600,16 @@ internal static partial class RynthAiPanel /// typing "/ra <action> <value>". The plugin copies both strings and applies /// the command on its pump thread, so the buffers can be freed as soon as this returns. /// + /// + /// Lets other engine panels send a "/ra <action> <value>" command to the RynthAi + /// plugin, binding the plugin export first if this panel has not done so yet. + /// + internal static void SendRynthAiCommand(string action, string value) + { + if (_applyRemoteCommand == null) TryBind(); + SendRemoteCmd(action, value); + } + private static void SendRemoteCmd(string action, string value) { if (_applyRemoteCommand == null) diff --git a/src/RynthCore.Engine/UI/Panels/SettingsPanel.cs b/src/RynthCore.Engine/UI/Panels/SettingsPanel.cs index cb613ae..1ac5170 100644 --- a/src/RynthCore.Engine/UI/Panels/SettingsPanel.cs +++ b/src/RynthCore.Engine/UI/Panels/SettingsPanel.cs @@ -961,6 +961,10 @@ internal static class SettingsPanel p.Children.Add(BoolRow("Combine Bags During Salvage", state.Data.CombineBagsDuringSalvage, v => { state.Data.CombineBagsDuringSalvage = v; Push(state); }, "When salvaging an item, also add any under-full salvage bag of the same material to the salvage panel.")); + // The HUD windows are ImGui windows owned by the RynthAi plugin, so the engine only asks it to open them. + p.Children.Add(ButtonRow("Floating HUDs", "Inventory HUDs...", + () => RynthAiPanel.SendRynthAiCommand("huds", "show"), + "Opens the item count HUD / Mini Remote setup window (/ra huds).")); p.Children.Add(Spacer()); p.Children.Add(SectionHeader("Loot Timers (ms)")); @@ -1318,6 +1322,44 @@ internal static class SettingsPanel return row; } + /// Label on the left, a single action button on the right. + private static Control ButtonRow(string label, string buttonText, Action onClick, string? tooltip = null) + { + var btn = new Button + { + Content = buttonText, + FontSize = 10, + Height = 20, + MinWidth = 160, + Padding = new Thickness(4, 1), + Background = ColBtnFill, + Foreground = ColTextDim, + BorderBrush = ColBtnBord, + BorderThickness = new Thickness(1), + HorizontalContentAlignment = HorizontalAlignment.Center, + }; + btn.Click += (_, _) => onClick(); + + var row = new Grid + { + ColumnDefinitions = new ColumnDefinitions("*,Auto"), + Margin = new Thickness(0, 2, 0, 2), + Height = 22, + }; + var lblBlock = new TextBlock { Text = label, Foreground = ColTextDim, FontSize = 11, VerticalAlignment = VerticalAlignment.Center }; + Grid.SetColumn(lblBlock, 0); + Grid.SetColumn(btn, 1); + row.Children.Add(lblBlock); + row.Children.Add(btn); + + if (tooltip != null) + { + ToolTip.SetTip(row, tooltip); + ToolTip.SetShowDelay(row, 400); + } + return row; + } + // SimpleTheme wraps TextBox content in a ScrollViewer, and its vertical // scrollbar's up RepeatButton is a filled triangle Path. On these short // (Height=20) single-line numeric fields that scrollbar shows and the