Skip to content

Let HUD elements be placed against any screen edge - #224

Merged
Views2k merged 2 commits into
mainfrom
fix/hud-free-placement
Nov 19, 2026
Merged

Views2k merged 2 commits into
mainfrom
fix/hud-free-placement

Conversation

@Views2k

@Views2k Views2k commented Nov 19, 2026

Copy link
Copy Markdown
Owner

Closes #223.

What changes

  • Free placement. A position the player chose is now clamped with OverlayPlacementGeometry.ClampOnScreen: fully on its monitor, no margin, monitor bounds instead of the work area. This applies to the drift gauge, lap delta, live map, G-force, boost, tire temperature, power and torque windows and to the main HUD in every layout. The native-layout main HUD already behaved this way.
  • Defaults keep their margins. ClampInside and the Place* helpers are unchanged and are still used for default positions.
  • Drift gauge. Its default position is centered on the monitor, 12 DIP below the top edge (half the previous 24). The settings button that applies it is now labeled Center at top (it was "Reset position").
  • Release notes for 2.7.6 mention both.

Saved positions are not migrated: every position that was valid before is still valid.

Checked

  • App and test projects compile; whitespace format check passes on the changed files.
  • New OverlayPlacementGeometryTests: a chosen position may touch each edge and corner, an off-screen position returns to the edge without a margin, an oversized element starts at the top-left, defaults keep the margin, the native clamp is the same rule.
  • DriftGaugePlacementTests: centered default with the 12-DIP gap at every scale and monitor offset.
  • Source contract tests updated: every movable HUD window restores through ClampOnScreen with the monitor bounds, and the drift settings button is "Center at top".

Not checked

  • Not run in game. The placement code is shared by Steam and the Xbox app.

A position the player chose is clamped to its monitor without a margin.
Default positions keep their margins. The drift gauge's default sits
centered 12 DIP below the top edge, and its settings button is labeled
Center at top.
@Views2k
Views2k marked this pull request as ready for review November 19, 2026 23:20
@Views2k
Views2k merged commit 4408d5a into main Nov 19, 2026
10 checks passed
@Views2k
Views2k deleted the fix/hud-free-placement branch November 19, 2026 23:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

HUD elements cannot be placed against the screen edge

1 participant