This commit is contained in:
cracklesparkle
2025-01-30 12:36:39 +09:00
parent e6b3dc05d3
commit 0788a401ca
43 changed files with 3710 additions and 1724 deletions

View File

@ -4,39 +4,41 @@ import { useMapStore } from '../../../store/map';
interface IMapStatusbarProps {
mapControlsStyle: CSSProperties;
map_id: string;
}
const MapStatusbar = ({
mapControlsStyle,
map_id
}: IMapStatusbarProps) => {
const mapState = useMapStore()
const { currentCoordinate, currentX, currentY, currentZ, statusText } = useMapStore().id[map_id]
return (
<Flex gap='sm' p={'4px'} miw={'100%'} fz={'xs'} pos='absolute' bottom='0px' left='0px' style={{ ...mapControlsStyle, borderRadius: 0 }}>
<Flex gap='sm' p={'4px'} w={'100%'} fz={'xs'} style={{ ...mapControlsStyle, borderRadius: 0 }}>
<Text fz='xs' w={rem(130)}>
x: {mapState.currentCoordinate?.[0]}
x: {currentCoordinate?.[0]}
</Text>
<Text fz='xs' w={rem(130)}>
y: {mapState.currentCoordinate?.[1]}
y: {currentCoordinate?.[1]}
</Text>
<Divider orientation='vertical' />
<Text fz='xs'>
Z={mapState.currentZ}
Z={currentZ}
</Text>
<Text fz='xs'>
X={mapState.currentX}
X={currentX}
</Text>
<Text fz='xs'>
Y={mapState.currentY}
Y={currentY}
</Text>
<Text fz='xs' ml='auto'>
{mapState.statusText}
{statusText}
</Text>
</Flex>
)