From 2dcb062393e98b322b8ab684b52246f9db6b7f26 Mon Sep 17 00:00:00 2001 From: Autumn Valenta Date: Fri, 31 May 2024 19:24:19 -0600 Subject: [PATCH] Set width hints --- src/hooks/useSubDisplayEquip.jsx | 16 ++++++++-------- src/hooks/useSubDisplayRings.jsx | 16 ++++++++-------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/hooks/useSubDisplayEquip.jsx b/src/hooks/useSubDisplayEquip.jsx index e306e55..a762e91 100644 --- a/src/hooks/useSubDisplayEquip.jsx +++ b/src/hooks/useSubDisplayEquip.jsx @@ -25,14 +25,14 @@ export default function useSubDisplayEquip(enabled, { width, height, keyMap, }) { const slots = useMemo(() => ({ - weapon: ["Wp ", [0, 0]], - body: ["Bd ", [1, 0]], - legs: ["Lg ", [2, 0]], - feet: ["Ft ", [3, 0]], - head: ["Hd ", [0, width - 4]], - arms: ["Ar ", [1, width - 4]], - shield: ["Sh ", [2, width - 4]], - waist: ["Ws ", [3, width - 4]], + weapon: ["Wp ", [0, 0], 4], + body: ["Bd ", [1, 0], 4], + legs: ["Lg ", [2, 0], 4], + feet: ["Ft ", [3, 0], 4], + head: ["Hd ", [0, width - 4], 4], + arms: ["Ar ", [1, width - 4], 4], + shield: ["Sh ", [2, width - 4], 4], + waist: ["Ws ", [3, width - 4], 4], }), [width]); const { sprites, layers } = useSpriteLayers({ diff --git a/src/hooks/useSubDisplayRings.jsx b/src/hooks/useSubDisplayRings.jsx index fc338bd..23e4264 100644 --- a/src/hooks/useSubDisplayRings.jsx +++ b/src/hooks/useSubDisplayRings.jsx @@ -12,14 +12,14 @@ const SLOT_ORDER = [ 'ring4b', ]; const SLOTS = { - ring1a: ["", [0, 0]], - ring2a: ["", [1, 0]], - ring3a: ["", [2, 0]], - ring4a: ["", [3, 0]], - ring1b: ["", [0, 2]], - ring2b: ["", [1, 2]], - ring3b: ["", [2, 2]], - ring4b: ["", [3, 2]], + ring1a: ["", [0, 0], 2], + ring2a: ["", [1, 0], 2], + ring3a: ["", [2, 0], 2], + ring4a: ["", [3, 0], 2], + ring1b: ["", [0, 2], 2], + ring2b: ["", [1, 2], 2], + ring3b: ["", [2, 2], 2], + ring4b: ["", [3, 2], 2], }; const SPRITE_POSITIONS = Object.fromEntries( Object.entries(SLOTS).map(([kind, [,position]]) => [kind, [position]])