mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-09-17 10:00:46 -04:00
map hud adjustment for mobile
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-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>
|
||||||
|
|||||||
@@ -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,
|
||||||
|
|||||||
Reference in New Issue
Block a user