Skip to content

Commit d9c7768

Browse files
committed
chore(scoreboard): cleaning up settings modal option for scoreboard
Signed-off-by: Dhruv Arora <dhruv.arora1@autodesk.com>
1 parent 8da8c33 commit d9c7768

2 files changed

Lines changed: 1 addition & 36 deletions

File tree

fission/src/ui/helpers/ScoreboardVisibility.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,6 @@ import { globalAddToast } from "@/ui/components/GlobalUIControls"
99
import { TOP_BAR_GLYPH_SX } from "@/ui/components/topbar/TopBarConfig"
1010
import { useStateContext } from "@/ui/helpers/StateProviderHelpers"
1111

12-
export const SCOREBOARD_MODE_LABELS: Record<ScoreboardMode, string> = {
13-
auto: "Auto (during gameplay)",
14-
on: "Always shown",
15-
off: "Always hidden",
16-
}
17-
1812
const MUTED_GLYPH_OPACITY = 0.55
1913

2014
export const SCOREBOARD_GLYPH_SX: Record<ScoreboardMode, SxProps<Theme>> = {

fission/src/ui/modals/configuring/SettingsModal.tsx

Lines changed: 1 addition & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ import Checkbox, { type CheckboxProps } from "@/ui/components/Checkbox"
1010
import Label from "@/ui/components/Label"
1111
import type { ModalImplProps } from "@/ui/components/Modal"
1212
import StatefulSlider, { type StatefulSliderProps } from "@/ui/components/StatefulSlider"
13-
import { Button, LabelWithTooltip, Spacer, SynthesisIcons } from "@/ui/components/StyledComponents"
14-
import { SCOREBOARD_MODE_LABELS, useScoreboard } from "@/ui/helpers/ScoreboardVisibility"
13+
import { Button, Spacer, SynthesisIcons } from "@/ui/components/StyledComponents"
1514
import { useThemeContext } from "@/ui/helpers/ThemeProviderHelpers"
1615
import { useUIContext } from "@/ui/helpers/UIProviderHelpers"
1716
import { randomColor } from "@/util/Random"
@@ -21,8 +20,6 @@ import {
2120
lowGraphicsPreferences,
2221
highGraphicsPreferences,
2322
type GraphicsPreferences,
24-
SCOREBOARD_MODES,
25-
type ScoreboardMode,
2623
} from "@/systems/preferences/PreferenceTypes"
2724
import { Select, MenuItem } from "@mui/material"
2825

@@ -142,31 +139,6 @@ const GeneralTabCheckbox = ({
142139
return <Checkbox {...props} label={label} checked={pref} onClick={setPref} />
143140
}
144141

145-
const ScoreboardModeSetting = () => {
146-
const { mode, setMode } = useScoreboard()
147-
148-
return (
149-
<Stack direction="row" justifyContent="space-between" alignItems="center">
150-
<LabelWithTooltip
151-
labelText="Scoreboard"
152-
tooltipText="Auto shows the scoreboard while you are in gameplay or a match is running."
153-
/>
154-
<Select
155-
value={mode}
156-
onChange={e => setMode(e.target.value as ScoreboardMode)}
157-
size="small"
158-
sx={{ width: 220, mr: 1.5 }}
159-
>
160-
{SCOREBOARD_MODES.map(m => (
161-
<MenuItem key={m} value={m}>
162-
{SCOREBOARD_MODE_LABELS[m]}
163-
</MenuItem>
164-
))}
165-
</Select>
166-
</Stack>
167-
)
168-
}
169-
170142
const GeneralTab: React.FC = () => (
171143
<Stack direction="column" gap={2}>
172144
<Spacer height={5} />
@@ -231,7 +203,6 @@ const GeneralTab: React.FC = () => (
231203
tooltip="If disabled, protected zones will not be visible but will continue to function the same."
232204
/>
233205
<GeneralTabCheckbox preference="RenderSceneTags" label="Show Scene Tags" tooltip="Name tags above robot." />
234-
<ScoreboardModeSetting />
235206
<GeneralTabCheckbox
236207
preference="ShowCenterOfMassIndicators"
237208
label="Show Centers of Mass"

0 commit comments

Comments
 (0)