antagonist controls

This commit is contained in:
tresabhi committed 2026-11-10 14:54:22 -06:00
1 parent f74b66dd5f
commit f071a77fc0
18 files changed
+316 -259

No files matched your search

@@ -1,6 +1,7 @@
import { literals } from "@blitzkit/i18n/src/literals";
import { EyeClosedIcon, EyeOpenIcon } from "@radix-ui/react-icons";
import { useCallback, type ReactNode } from "react";
import { useAbsoluteDisplay } from "../../hooks/useAbsoluteDisplay";
import { useStrings } from "../../hooks/useStrings";
import { Tankopedia } from "../../stores/tankopedia";
import { TankopediaPersistent } from "../../stores/tankopediaPersistent";
@@ -61,7 +62,9 @@ export interface ThicknessesProps {
export function Thicknesses({ thicknessRange }: ThicknessesProps) {
const strings = useStrings();
const display = Tankopedia.use((state) => state.loaders.display.loaded);
const isStaticArmorDisplay = useAbsoluteDisplay(
TankopediaDisplay.StaticArmor,
);
const showControls = Tankopedia.use((state) => state.showControls);
const showPrimaryArmor = TankopediaPersistent.use(
(state) => state.showPrimaryArmor,
@@ -87,7 +90,7 @@ export function Thicknesses({ thicknessRange }: ThicknessesProps) {
return (
<div
className={styles.thicknesses}
data-visible={showControls && display === TankopediaDisplay.StaticArmor}
data-visible={showControls && isStaticArmorDisplay}
>
<LayerToggle
visible={showPrimaryArmor}