Repository navigation
Fit the ammo and vitals panels together at every resolution - #2265
Merged
Merged
Conversation
The ammo panel scales with the screen but its fonts were picked from yres bands, so the text and rounds changed size against the box with resolution (the rounds and fire mode glyph smallest at 4K) and each piece sat on its own line. The weapon name, rounds, fire mode glyph and reserve now use proportional fonts sized from the panel, with the glyph, rounds and reserve standing on AUX POWER's baseline. Sizes match stock at 1080p, except the fire mode glyph, which gets its own font so it can be bigger than the rounds. OVERHEAT moves to the weapon name's line, since its old -22 offset was in raw pixels. The header defaults match HudLayout.res. Also drops the glyph's and the reserve's GetTextSize calls, whose results were never read. Checked in game at 1080p and 4K: the layout matches within a pixel, including the BALC heat bar and OVERHEAT.
The vitals panel's labels and numbers used NHudOCRSmall from yres bands, so at 4K they drew at about 70% of their 1080p size against the box, and next to the ammo panel's new proportional name they no longer matched. NHudAmmoName becomes NHudPanelText and both panels use it. At 1080p nothing changes. Also drops five unused size members from the ammo panel. Checked in game at 1080p and 4K: both panels match within 1.5 px.
Support's 225 integrity ran into the end of the bar (touching at 720p, about a pixel apart at 1080p and 4K). The three bars are now 86 wide instead of 90, which leaves a few units before the right-aligned number. The header defaults match HudLayout.res.
A custom ClientScheme.res made before NHudPanelText, NHudFireMode and NHudAmmoReserve existed has none of them, so GetFont returned 0 and the weapon name, fire mode glyph, reserve and every vitals label and number drew blank. Each now falls back to the font it replaced, at stock's size. Checked in game at 1080p with the three entries removed: blank before, all drawn after.
KyleWerle
marked this pull request as ready for review
October 20, 2026 05:41
Contributor
AdamTadeusz
approved these changes
Oct 23, 2026
sunmachine
self-requested a review
October 24, 2026 01:32
Contributor
|
No workflow files changed, approving the runner for external contributor. 👍 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
Both panels now use proportional fonts (
NHudPanelTextfor the weapon name and the vitals, plusNHudBullets,NHudFireModeandNHudAmmoReserve), so they look the same at every resolution, and the glyph, rounds and reserve stand on one baseline.NHudOCRSmallandNHudOCRaren't changed, so the rest of the HUD, the scoreboard and the menus aren't touched.- 22offset was in raw pixels, so at 4K it drew on top of the heat bar.+overflow rule is unchanged. At the new size it kicks in at PZ 34, SMAC 33 and SRM 33.Just a warning for custom HUDs:
NHudWeaponorNHudHealthoverride still draws, but its positions will sit off with the new font sizes.ClientScheme.reswithout the new font entries falls back to the fonts they replaced, at their old sizes. One that restylesNHudBulletswith the old pixel sizes will draw the rounds far too big, since it's now looked up proportional.NHudOCRSmallno longer changes the weapon name or the vitals text, unless the scheme has noNHudPanelText.Checked in game at 720p, 1080p and 4K with every class and the BALC in a Juggernaut round (cold, warm and overheated). Both panels match within a pixel and a half across the three.
Toolchain
Linked Issues
None.