From 656fce7e4f8e59b12b063fe49fbc87d96ae2e706 Mon Sep 17 00:00:00 2001 From: Hubert Walczak Date: Tue, 28 Nov 2023 18:53:57 +0100 Subject: [PATCH] added SP support --- src/HUD/Layout/Layout.tsx | 3 +- src/HUD/Scout/index.scss | 63 +++++++++++++++++++++++++++++++++++++++ src/HUD/Scout/index.tsx | 17 +++++++++++ 3 files changed, 82 insertions(+), 1 deletion(-) create mode 100644 src/HUD/Scout/index.scss create mode 100644 src/HUD/Scout/index.tsx diff --git a/src/HUD/Layout/Layout.tsx b/src/HUD/Layout/Layout.tsx index 7891846..23be92f 100644 --- a/src/HUD/Layout/Layout.tsx +++ b/src/HUD/Layout/Layout.tsx @@ -17,6 +17,7 @@ import Timeout from "../PauseTimeout/Timeout"; import { CSGO } from "csgogsi"; import { Match } from "../../API/types"; import { useAction } from "../../API/contexts/actions"; +import { Scout } from "../Scout"; interface Props { game: CSGO, @@ -73,7 +74,7 @@ const Layout = ({game,match}: Props) => { - +
diff --git a/src/HUD/Scout/index.scss b/src/HUD/Scout/index.scss new file mode 100644 index 0000000..376f806 --- /dev/null +++ b/src/HUD/Scout/index.scss @@ -0,0 +1,63 @@ +#scout { + width: 512.5px; + background-color: var(--sub-panel-color); + padding: 10px; + position: fixed; + left: 50%; + transform: translateX(-50%); + color: white; + top: 126px; + opacity: 0; + transition: opacity 0.5s; + + &.show { + opacity: 1; + } + .bar-container { + position: relative; + width: 100%; + height: 29px; + display: flex; + + .bar { + position: relative; + width: 100%; + z-index: 0; + height: 100%; + .team-prediction { + position: absolute; + height: 100%; + width: 100%; + } + .left { + z-index: 0; + + } + .right { + margin-left: auto; + width: 50%; + z-index: 2; + right: 0; + } + .team-CT { + background-color: var(--color-new-ct); + } + .team-T { + background-color: var(--color-new-t); + } + } + .overlay { + position: absolute; + width: 100%; + height: 100%; + display: flex; + justify-content: space-between; + z-index: 2; + align-items: center; + .team-prediction-value { + margin: 0 10px; + text-shadow: 1px 1px 0px black; + } + } + } +} \ No newline at end of file diff --git a/src/HUD/Scout/index.tsx b/src/HUD/Scout/index.tsx new file mode 100644 index 0000000..1079b83 --- /dev/null +++ b/src/HUD/Scout/index.tsx @@ -0,0 +1,17 @@ +import { Side } from "csgogsi"; +import "./index.scss"; + +export const Scout = ({ left, right }: { left: Side, right: Side }) => { + return
+
+
+
50%
+
50%
+
+
+
+
+
+
+
+} \ No newline at end of file