RynthCore: let players enlarge the in-game toolbar #7
Loading…
Reference in a new issue
No description provided.
Delete branch "AwfulWaffle/RynthCore:toolbar-size"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closed by the author: this change is already in main (checked against
418d80b). Thanks for taking it in.One commit against RynthCore
194ea47(release 2026.10.9.3). It touches onlyRynthCore.Engineand adds one offline test tool. There are no RynthSuite or SDK changes, so it is independent of the RynthAi.Combat patch for RynthSuite and can land in either order.Why
The bar's buttons are a fixed 20 logical px (
ImGuiBar.cs,ButtonSize). The only multiplier isUiScale.ForWindow, which is DPI/96 and comes out as 1 for a DPI-unaware acclient. On a high-resolution window the icons are tiny, and because panel names only appear in the bar's tooltips, this also makes features hard to discover.Design: reuse the panel text-size system
PanelTextScalegains a separate__chromerow (GetChrome/SetChrome, steps 0-10 like the panel sizes).ImGuiFonts.CurrentStepis set to that step, so it uses the already-baked enlarged fonts with merged icons (sharp, not stretched). The button size is scaled by the same step's factor. One helper,ImGuiBar.ChromeStep, is the only source of both, andCurrentStepis reset infinally.StepsInUsenow bakes the chrome step even when per-panel sizing is off.SetForWindow's reset loop skips the chrome row.FontScale/_uiScale;PlacementScaleandInputScale;How players change it
/rc ui barsize [0-10|+|-|+n|-n|status].Position handling
When the bar grows past the screen edge it is pulled back on screen. The pulled-back position is saved only after a user drag or a size change. A clamp caused by a smaller AC window, or by the first frame after a load, leaves the saved
bar=row alone, so restoring the window size puts the bar back where the player left it.Tests
New
tools/PanelTextScaleTests(console,dotnet run -c Release, same shape asEngineSettingsTests). It runs one child process per case, usingRYNTHCORE_PANEL_TEXT_SIZEto point at a temp file. Coverage:SetForWindow;StepsInUseincludes the chrome step with per-panel sizing off;UseForAllandSetAllleave the chrome row alone;Reverting the two
PanelTextScalefixes makes 4 cases fail.Gates:
dotnet build src/RynthCore.Engine/RynthCore.Engine.csproj -c Release, with and without-p:EngineHost=coreclr: 0 errors.tools/check_imgui_calls.py: OK.EngineSettingsTests: 123/123.check_offthread_mutators.pyreportsDecalBridgeHost.cs:305 PostNotice(). This violation is identical on194ea47, so it predates the patch.Notes for the maintainer
ImGuiPanelHost./rc resetbarrewritesDesktop\RynthCore.bar.cfgfor the diagnostic shell (RynthCoreShell), so it never moves the real ImGui toolbar. A toolbar dragged off-screen has no recovery command. Not changed here.🤖 Generated with Claude Code
Pull request closed