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-title" content="Multi Roomba Rover" />
<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">
</head>
<body>
+7 -4
View File
@@ -51,7 +51,7 @@ export default function VideoTile({
hudVariant = 'default',
driverLabel = null,
hudForceMap = false,
hudMapPosition = 'top-right',
hudMapPosition = 'top-center',
hudLabelScale = 1,
fitParent = false,
overcurrentLimiter = null,
@@ -581,7 +581,7 @@ function HudOverlay({
battery,
showTopDown = false,
mobileHud = false,
mapPosition = 'top-right',
mapPosition = 'top-center',
turnTimerText = null,
labelScale = 1,
}) {
@@ -616,10 +616,13 @@ function HudOverlay({
width: mapSize,
height: mapSize,
opacity: mapOpacity,
transform: `scale(${mapScale})`,
transformOrigin: mapPosition === 'bottom-left' ? 'bottom left' : 'top right',
transform: mapPosition === 'top-center' ? `translateX(-50%) scale(${mapScale})` : `scale(${mapScale})`,
transformOrigin:
mapPosition === 'bottom-left' ? 'bottom left' : mapPosition === 'top-center' ? 'top center' : 'top right',
...(mapPosition === 'bottom-left'
? { left: '0.25rem', bottom: '0.25rem' }
: mapPosition === 'top-center'
? { left: '50%', top: '0.25rem' }
: { right: '0.25rem', top: '0.25rem' }),
};