centered hud for your brain

This commit is contained in:
legop3
2026-01-24 03:06:29 -05:00
parent 8341328b51
commit 2dda137855
3 changed files with 13 additions and 10 deletions
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -11,7 +11,7 @@
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" /> <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<meta name="apple-mobile-web-app-title" content="Multi Roomba Rover" /> <meta name="apple-mobile-web-app-title" content="Multi Roomba Rover" />
<title>Multi Roomba Rover</title> <title>Multi Roomba Rover</title>
<script type="module" crossorigin src="/assets/index-CEVMLwfj.js"></script> <script type="module" crossorigin src="/assets/index-Cge0aRRk.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-5vqbgc7L.css"> <link rel="stylesheet" crossorigin href="/assets/index-5vqbgc7L.css">
</head> </head>
<body> <body>
+8 -5
View File
@@ -51,7 +51,7 @@ export default function VideoTile({
hudVariant = 'default', hudVariant = 'default',
driverLabel = null, driverLabel = null,
hudForceMap = false, hudForceMap = false,
hudMapPosition = 'top-right', hudMapPosition = 'top-center',
hudLabelScale = 1, hudLabelScale = 1,
fitParent = false, fitParent = false,
overcurrentLimiter = null, overcurrentLimiter = null,
@@ -581,7 +581,7 @@ function HudOverlay({
battery, battery,
showTopDown = false, showTopDown = false,
mobileHud = false, mobileHud = false,
mapPosition = 'top-right', mapPosition = 'top-center',
turnTimerText = null, turnTimerText = null,
labelScale = 1, labelScale = 1,
}) { }) {
@@ -616,11 +616,14 @@ function HudOverlay({
width: mapSize, width: mapSize,
height: mapSize, height: mapSize,
opacity: mapOpacity, opacity: mapOpacity,
transform: `scale(${mapScale})`, transform: mapPosition === 'top-center' ? `translateX(-50%) scale(${mapScale})` : `scale(${mapScale})`,
transformOrigin: mapPosition === 'bottom-left' ? 'bottom left' : 'top right', transformOrigin:
mapPosition === 'bottom-left' ? 'bottom left' : mapPosition === 'top-center' ? 'top center' : 'top right',
...(mapPosition === 'bottom-left' ...(mapPosition === 'bottom-left'
? { left: '0.25rem', bottom: '0.25rem' } ? { left: '0.25rem', bottom: '0.25rem' }
: { right: '0.25rem', top: '0.25rem' }), : mapPosition === 'top-center'
? { left: '50%', top: '0.25rem' }
: { right: '0.25rem', top: '0.25rem' }),
}; };
if (variant === 'spectator') { if (variant === 'spectator') {