Added option to suppress TIX limit/stop orders

This commit is contained in:
Olivier Gagnon
2021-12-08 20:21:44 -05:00
parent c915cd06d8
commit d195b00ab6
5 changed files with 41 additions and 21 deletions
+18 -1
View File
@@ -68,7 +68,7 @@ export function GameOptionsRoot(props: IProps): React.ReactElement {
const [suppressBuyAugmentationConfirmation, setSuppressBuyAugmentationConfirmation] = useState(
Settings.SuppressBuyAugmentationConfirmation,
);
const [suppressTIXPopup, setSuppressTIXPopup] = useState(Settings.SuppressTIXPopup);
const [suppressBladeburnerPopup, setSuppressBladeburnerPopup] = useState(Settings.SuppressBladeburnerPopup);
const [disableHotkeys, setDisableHotkeys] = useState(Settings.DisableHotkeys);
@@ -128,6 +128,11 @@ export function GameOptionsRoot(props: IProps): React.ReactElement {
Settings.SuppressBuyAugmentationConfirmation = event.target.checked;
}
function handleSuppressTIXPopupChange(event: React.ChangeEvent<HTMLInputElement>): void {
setSuppressTIXPopup(event.target.checked);
Settings.SuppressTIXPopup = event.target.checked;
}
function handleSuppressBladeburnerPopupChange(event: React.ChangeEvent<HTMLInputElement>): void {
setSuppressBladeburnerPopup(event.target.checked);
Settings.SuppressBladeburnerPopup = event.target.checked;
@@ -382,6 +387,18 @@ export function GameOptionsRoot(props: IProps): React.ReactElement {
}
/>
</ListItem>
<ListItem>
<FormControlLabel
control={<Switch checked={suppressTIXPopup} onChange={handleSuppressTIXPopupChange} />}
label={
<Tooltip
title={<Typography>If this is set, the stock market will never create any popup.</Typography>}
>
<Typography>Suppress TIX messages</Typography>
</Tooltip>
}
/>
</ListItem>
{!!props.player.bladeburner && (
<ListItem>
<FormControlLabel