feat: green penetration mode

This commit is contained in:
TrèsAbhi committed 2024-01-16 12:22:17 -06:00
1 parent e37b91c2e3
commit f5ac301c7e
4 files changed
+28 -1

No files matched your search

@@ -16,6 +16,9 @@ interface OptionsProps {
export function Options({ isFullScreen, canvas }: OptionsProps) {
const showGrid = useTankopedia((state) => state.model.visual.showGrid);
const greenPenetration = useTankopedia(
(state) => state.model.visual.greenPenetration,
);
return (
<Flex
@@ -44,6 +47,17 @@ export function Options({ isFullScreen, canvas }: OptionsProps) {
>
Show grid
</DropdownMenu.CheckboxItem>
<DropdownMenu.CheckboxItem
checked={greenPenetration}
onCheckedChange={(checked) => {
mutateTankopedia((draft) => {
draft.model.visual.greenPenetration = checked;
});
}}
>
Greene penetration
</DropdownMenu.CheckboxItem>
</DropdownMenu.Content>
</DropdownMenu.Root>