Add cut stats toggle
This commit is contained in:
parent
a9a15a9bae
commit
4af129ea20
@ -3,7 +3,7 @@ import { useSongDataStore } from "../store/songDataStore";
|
||||
import styles from "../styles/cutStats.module.css";
|
||||
|
||||
export default function CutStats() {
|
||||
const [showScoreInfo] = useSettingsStore((store) => [store.showScoreInfo]);
|
||||
const [showCutStats] = useSettingsStore((store) => [store.showCutStats]);
|
||||
const [saberA, saberB, isLoading] = useSongDataStore((store) => [
|
||||
store.saberA,
|
||||
store.saberB,
|
||||
@ -14,7 +14,7 @@ export default function CutStats() {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (!showScoreInfo) {
|
||||
if (!showCutStats) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -41,6 +41,7 @@ export default class Home extends Component {
|
||||
showPlayerStats: true,
|
||||
showScoreInfo: false,
|
||||
showSongInfo: false,
|
||||
showCutStats: false,
|
||||
shouldReplacePlayerInfoWithScore: false,
|
||||
},
|
||||
};
|
||||
@ -286,6 +287,15 @@ export default class Home extends Component {
|
||||
size="md"
|
||||
/>
|
||||
<Spacer y={1.2} />
|
||||
<Text>Show cut stats (Average cut)</Text>
|
||||
<Switch
|
||||
onChange={(event) =>
|
||||
this.updateValue("showCutStats", event.target.checked)
|
||||
}
|
||||
checked={this.state.values.showCutStats}
|
||||
size="md"
|
||||
/>
|
||||
<Spacer y={1.2} />
|
||||
<Text>
|
||||
Replace Player info with Song info when a song starts (Show
|
||||
song info Required)
|
||||
|
@ -9,6 +9,7 @@ interface SettingsState {
|
||||
showPlayerStats: boolean;
|
||||
showScoreInfo: boolean;
|
||||
showSongInfo: boolean;
|
||||
showCutStats: boolean;
|
||||
shouldReplacePlayerInfoWithScore: boolean;
|
||||
setMounted: (isMounted: boolean) => void;
|
||||
setOverlaySettings: (params: string) => void;
|
||||
@ -22,6 +23,7 @@ export const useSettingsStore = create<SettingsState>()((set) => ({
|
||||
showPlayerStats: true,
|
||||
showScoreInfo: false,
|
||||
showSongInfo: false,
|
||||
showCutStats: false,
|
||||
shouldReplacePlayerInfoWithScore: false,
|
||||
|
||||
setMounted: (isMounted: boolean) => set(() => ({ mounted: isMounted })),
|
||||
|
Reference in New Issue
Block a user