map hud adjustment for mobile

This commit is contained in:
legop3
2026-02-02 11:20:53 -05:00
parent b4c122d914
commit cf0c12cff7
3 changed files with 13 additions and 12 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-CO1H_x4Z.js"></script> <script type="module" crossorigin src="/assets/index-C9XUn7S3.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-be89mHSW.css"> <link rel="stylesheet" crossorigin href="/assets/index-be89mHSW.css">
</head> </head>
<body> <body>
+4 -3
View File
@@ -79,6 +79,7 @@ export default function VideoTile({
const batteryCharge = sensors?.batteryChargeMah ?? null; const batteryCharge = sensors?.batteryChargeMah ?? null;
const desktopLayout = layoutFormat === 'desktop'; const desktopLayout = layoutFormat === 'desktop';
const mobileHud = !desktopLayout; const mobileHud = !desktopLayout;
const effectiveHudMapPosition = mobileHud ? 'top-right' : hudMapPosition;
const [showHudMapDesktop, setShowHudMapDesktop] = useHudMapSetting(); const [showHudMapDesktop, setShowHudMapDesktop] = useHudMapSetting();
const showHudMap = hudForceMap ? true : mobileHud ? true : showHudMapDesktop; const showHudMap = hudForceMap ? true : mobileHud ? true : showHudMapDesktop;
const batteryVisual = buildBatteryVisual(batteryCharge, batteryConfig); const batteryVisual = buildBatteryVisual(batteryCharge, batteryConfig);
@@ -445,7 +446,7 @@ export default function VideoTile({
battery={batteryVisual} battery={batteryVisual}
showTopDown={showHudMap} showTopDown={showHudMap}
mobileHud={mobileHud} mobileHud={mobileHud}
mapPosition={hudMapPosition} mapPosition={effectiveHudMapPosition}
turnTimerText={turnTimerText} turnTimerText={turnTimerText}
labelScale={hudLabelScale} labelScale={hudLabelScale}
/> />
@@ -613,8 +614,8 @@ function HudOverlay({
transformOrigin: 'center bottom', transformOrigin: 'center bottom',
}; };
const mapSize = '240px'; const mapSize = '240px';
const mapScale = portraitMobile ? 0.36 : isMobile ? 0.45 : 0.7; const mapScale = portraitMobile ? 0.3 : isMobile ? 0.33 : 0.7;
const mapOpacity = isMobile ? 0.85 : 0.7; const mapOpacity = isMobile ? 0.6 : 0.7;
const mapStyle = { const mapStyle = {
width: mapSize, width: mapSize,
height: mapSize, height: mapSize,