Screen width in pixels
Screen height in pixels
Position scale multiplier for large displays (1.0-1.5)
HUD position (left, right, top, bottom)
Context ('training' or 'combat') for context-specific dimensions
OptionalpaddingOverride: numberOptional padding override (final pixel value, already scaled). When provided, bypasses default padding calculation.
OptionalgapOverride: numberOptional gap override (final pixel value, already scaled). When provided, bypasses default gap calculation.
Calculated layout dimensions and offsets
const layout = useHUDLayout(
1920, 1080, 1.0, 'left', 'training'
);
// Resolution-based sizing interpolates smoothly between breakpoints
// layout.hudWidth = 269 (14% of 1920 for desktop)
// layout.topOffset = 64.8 (getHUDHeight(1080, 0.06) = 64.8)
// layout.bottomOffset = 118.8 (getHUDHeight(1080, 0.11) = 118.8)
// layout.availableHeight = 896.4 (1080 - 64.8 - 118.8)
Custom hook for calculating HUD layout dimensions
Provides consistent layout calculations across Training and Combat screens. Uses resolution-based responsive sizing for smooth scaling across all screen sizes.