From b38b1d8b592e0cd0937660afd23cdd2a32cc33d2 Mon Sep 17 00:00:00 2001 From: Grant Date: Tue, 4 Jun 2024 19:31:59 -0600 Subject: [PATCH] virginmap overlay (fixes #32) --- packages/client/src/board.scss | 10 +++ .../client/src/components/CanvasWrapper.tsx | 2 + .../components/Overlay/OverlaySettings.tsx | 22 +++++ .../src/components/Overlay/VirginOverlay.tsx | 81 +++++++++++++++++++ .../components/Settings/SettingsSidebar.tsx | 2 + packages/client/src/components/Template.scss | 3 - packages/client/src/components/Template.tsx | 1 + packages/client/src/contexts/AppContext.tsx | 4 + packages/client/src/lib/canvas.ts | 21 +++++ packages/client/src/lib/keybinds.ts | 5 ++ packages/client/src/lib/template.ts | 3 +- packages/lib/src/net.ts | 3 + 12 files changed, 153 insertions(+), 4 deletions(-) create mode 100644 packages/client/src/components/Overlay/OverlaySettings.tsx create mode 100644 packages/client/src/components/Overlay/VirginOverlay.tsx diff --git a/packages/client/src/board.scss b/packages/client/src/board.scss index 1f17dd9..43c3cf8 100644 --- a/packages/client/src/board.scss +++ b/packages/client/src/board.scss @@ -23,3 +23,13 @@ pointer-events: none; touch-action: none; } + +.board-overlay { + position: absolute; + top: 0; + left: 0; +} + +.no-interact { + pointer-events: none; +} diff --git a/packages/client/src/components/CanvasWrapper.tsx b/packages/client/src/components/CanvasWrapper.tsx index b7b890a..1421517 100644 --- a/packages/client/src/components/CanvasWrapper.tsx +++ b/packages/client/src/components/CanvasWrapper.tsx @@ -9,6 +9,7 @@ import { IPosition } from "@sc07-canvas/lib/src/net"; import { Template } from "./Template"; import { IRouterData, Router } from "../lib/router"; import { KeybindManager } from "../lib/keybinds"; +import { VirginOverlay } from "./Overlay/VirginOverlay"; export const CanvasWrapper = () => { const { config } = useAppContext(); @@ -17,6 +18,7 @@ export const CanvasWrapper = () => { return (
+ {config &&