mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-09-16 09:31:20 -04:00
centered hud for your brain
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -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>
|
||||||
|
|||||||
@@ -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') {
|
||||||
|
|||||||
Reference in New Issue
Block a user