Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions fission/src/Synthesis.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ import WPILibConnectionStatus from "./ui/components/WPILibConnectionStatus.tsx"
import AutoTestPanel from "./ui/panels/simulation/AutoTestPanel.tsx"
import GraphicsSettings from "./ui/panels/GraphicsSettingsPanel.tsx"
import MainMenuModal from "@/modals/MainMenuModal"
import { applyInitialGraphicsSettings } from "./ui/panels/GraphicsSettingsPanel"

function Synthesis() {
const { openModal, closeModal, getActiveModalElement, registerModal } = useModalManager(initialModals)
Expand Down Expand Up @@ -96,6 +97,8 @@ function Synthesis() {
startSingleplayerCallback={() => {
World.InitWorld()

applyInitialGraphicsSettings()

Comment on lines +105 to +106

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not a huge fan of calling a function from a Panel in Synthesis.tsx. If anything, this function should be in a helper .ts file, not .tsx

if (!PreferencesSystem.getGlobalPreference<boolean>("ReportAnalytics") && !import.meta.env.DEV) {
setConsentPopupDisable(false)
}
Expand Down
2 changes: 2 additions & 0 deletions fission/src/systems/preferences/PreferenceTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export type GlobalPreference =
| "SimAutoReconnect"
| "MuteAllSound"
| "SFXVolume"
| "GraphicsOptimizationApplied"

export const RobotPreferencesKey: string = "Robots"
export const FieldPreferencesKey: string = "Fields"
Expand All @@ -40,6 +41,7 @@ export const DefaultGlobalPreferences: { [key: string]: unknown } = {
SimAutoReconnect: false,
MuteAllSound: false,
SFXVolume: 25,
GraphicsOptimizationApplied: false,
}

export type GraphicsPreferences = {
Expand Down
Loading