Skip to content

Commit

Permalink
added SP support
Browse files Browse the repository at this point in the history
  • Loading branch information
osztenkurden committed Nov 28, 2023
1 parent 02bf217 commit 656fce7
Show file tree
Hide file tree
Showing 3 changed files with 82 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/HUD/Layout/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -73,7 +74,7 @@ const Layout = ({game,match}: Props) => {
<TeamBox team={right} players={rightPlayers} side="right" current={game.player} />

<Trivia />

<Scout left={left.side} right={right.side} />
<MapSeries teams={[left, right]} match={match} isFreezetime={isFreezetime} map={game.map} />
<div className={"boxes left"}>
<UtilityLevel side={left.side} players={game.players} show={isFreezetime && !forceHide} />
Expand Down
63 changes: 63 additions & 0 deletions src/HUD/Scout/index.scss
Original file line number Diff line number Diff line change
@@ -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;
}
}
}
}
17 changes: 17 additions & 0 deletions src/HUD/Scout/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { Side } from "csgogsi";
import "./index.scss";

export const Scout = ({ left, right }: { left: Side, right: Side }) => {
return <div id="scout">
<div className="bar-container">
<div className="overlay">
<div className={`team-prediction-value left ${left}`}>50%</div>
<div className={`team-prediction-value right ${right}`}>50%</div>
</div>
<div className="bar">
<div className={`team-prediction team-${left} left`} />
<div className={`team-prediction team-${right} right`} />
</div>
</div>
</div>
}

0 comments on commit 656fce7

Please sign in to comment.