mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-16 06:18:42 +02:00
Some polish
This commit is contained in:
@@ -65,7 +65,7 @@ export const CurrentOptionsPage = (props: IProps): React.ReactElement => {
|
||||
|
||||
const pages = {
|
||||
[GameOptionsTabs.SYSTEM]: (
|
||||
<GameOptionsPage title="System">
|
||||
<GameOptionsPage title="System" noList>
|
||||
<OptionsSlider
|
||||
label=".script exec time (ms)"
|
||||
value={execTime}
|
||||
@@ -135,6 +135,7 @@ export const CurrentOptionsPage = (props: IProps): React.ReactElement => {
|
||||
game to use a lot of memory.
|
||||
</>
|
||||
}
|
||||
marks
|
||||
/>
|
||||
<OptionsSlider
|
||||
label="Autosave interval (s)"
|
||||
@@ -144,6 +145,7 @@ export const CurrentOptionsPage = (props: IProps): React.ReactElement => {
|
||||
min={0}
|
||||
max={600}
|
||||
tooltip={<>The time (in seconds) between each autosave. Set to 0 to disable autosave.</>}
|
||||
marks
|
||||
/>
|
||||
</GameOptionsPage>
|
||||
),
|
||||
|
||||
@@ -5,13 +5,14 @@ import React from "react";
|
||||
interface IProps {
|
||||
children: React.ReactElement | (React.ReactElement | null)[];
|
||||
title: string;
|
||||
noList?: boolean;
|
||||
}
|
||||
|
||||
export const GameOptionsPage = (props: IProps): React.ReactElement => {
|
||||
return (
|
||||
<Paper sx={{ height: "fit-content", p: 1 }}>
|
||||
<Typography variant="h6">{props.title}</Typography>
|
||||
{(props.children as any)?.length > 1 ? (
|
||||
{(props.children as any)?.length > 1 && !props.noList ? (
|
||||
<List disablePadding dense>
|
||||
{(props.children as React.ReactElement[])
|
||||
.filter((c) => c)
|
||||
|
||||
@@ -9,6 +9,7 @@ interface IProps {
|
||||
max: number;
|
||||
tooltip: React.ReactElement;
|
||||
label: string;
|
||||
marks?: boolean;
|
||||
}
|
||||
|
||||
export const OptionsSlider = (props: IProps): React.ReactElement => {
|
||||
@@ -30,6 +31,7 @@ export const OptionsSlider = (props: IProps): React.ReactElement => {
|
||||
width: "12px",
|
||||
},
|
||||
}}
|
||||
marks={props.marks}
|
||||
/>
|
||||
</Box>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user