forked from phenom/healer-man
Release Healer Man 0.1.29
This commit is contained in:
1 parent
8c9809d3e0
commit
544c1bee91
120 files changed
+4363
-1036
No files matched your search
+6
-1
@@ -1,6 +1,8 @@
|
||||
import type { CSSProperties } from "react";
|
||||
import type { Vector3Tuple } from "../game/dungeonManifest";
|
||||
import { DungeonMapGraphic } from "./DungeonMapGraphic";
|
||||
import { useInputBindingLabels } from "../input/useInputBindingLabels";
|
||||
import { useGameStore } from "../game/store";
|
||||
|
||||
export interface MinimapProps {
|
||||
position: Vector3Tuple;
|
||||
@@ -19,6 +21,9 @@ export function Minimap({
|
||||
rotationMode = "north-up",
|
||||
onOpenMap,
|
||||
}: MinimapProps) {
|
||||
const bindingLabel = useInputBindingLabels();
|
||||
const inputMode = useGameStore((state) => state.inputMode);
|
||||
const mapKey = bindingLabel(inputMode === "gamepad" ? "controller" : "pc", "map");
|
||||
const heading = ((Math.round((yaw * 180) / Math.PI) % 360) + 360) % 360;
|
||||
return (
|
||||
<section className="hud-minimap" aria-label="Dungeon minimap">
|
||||
@@ -35,7 +40,7 @@ export function Minimap({
|
||||
</button>
|
||||
<div className="hud-minimap__caption">
|
||||
<strong>{areaName}</strong>
|
||||
<span>{Math.round(distanceTravelled)} m explored · <kbd>M</kbd> map</span>
|
||||
<span>{Math.round(distanceTravelled)} m explored · {mapKey !== "Unbound" && <kbd>{mapKey}</kbd>} map</span>
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user