]> git.localhorst.tv Git - alttp.git/blobdiff - resources/js/components/tracker/Dungeons.js
compact keysanity tracker
[alttp.git] / resources / js / components / tracker / Dungeons.js
index c6ed5c2fe7991a41c1d6fbeebfbe8c9bd5ac224d..8a7e4d034b4ff06e27b0fb0175d925e9b00d223c 100644 (file)
@@ -7,6 +7,7 @@ import {
        BOSSES,
        getDungeonAcquiredSKs,
        getDungeonRemainingItems,
+       shouldCompactKeysanity,
        shouldShowDungeonItem,
 } from '../../helpers/tracker';
 import { useTracker } from '../../hooks/tracker';
@@ -15,11 +16,12 @@ const Dungeons = ({ columns }) => {
        const { config, dungeons, state } = useTracker();
 
        const layout = React.useMemo(() => {
+               const compact = shouldCompactKeysanity(config);
                const mapX = 1;
                const compassX = shouldShowDungeonItem(config, 'Map') ? mapX + 1 : mapX;
                const smallX = shouldShowDungeonItem(config, 'Compass') ? compassX + 1 : compassX;
                const bigX =  shouldShowDungeonItem(config, 'Small') ? smallX + 1 : smallX;
-               const countX = shouldShowDungeonItem(config, 'Big') ? bigX + 1 : bigX;
+               const countX = compact ? 2 : shouldShowDungeonItem(config, 'Big') ? bigX + 1 : bigX;
                const bossX = countX + 1;
                const prizeX = bossX + 1;
                const dungeonWidth = Math.max(5, prizeX + 1);
@@ -33,10 +35,14 @@ const Dungeons = ({ columns }) => {
 
                const transforms = {
                        tag: null,
-                       map: `translate(${mapX} 0) scale(0.9)`,
-                       compass: `translate(${compassX} 0) scale(0.9)`,
-                       small: `translate(${smallX} 0) scale(0.9)`,
-                       big: `translate(${bigX} 0) scale(0.9)`,
+                       map: compact
+                               ? 'translate(0.75 -0.25) scale(0.45)' : `translate(${mapX} 0) scale(0.9)`,
+                       compass: compact
+                               ? 'translate(1.25 -0.25) scale(0.45)' : `translate(${compassX} 0) scale(0.9)`,
+                       small: compact
+                               ? 'translate(0.75 0.25) scale(0.45)' : `translate(${smallX} 0) scale(0.9)`,
+                       big: compact
+                               ? 'translate(1.25 0.25) scale(0.45)' : `translate(${bigX} 0) scale(0.9)`,
                        checks: `translate(${countX} 0) scale(0.9)`,
                        boss: `translate(${bossX} 0)`,
                        prize: `translate(${prizeX} 0)`,