More work on terminal.

This commit is contained in:
Olivier Gagnon
2021-09-16 14:43:39 -04:00
parent f628a18551
commit 4a5fb04d41
6 changed files with 189 additions and 213 deletions
+13
View File
@@ -12,6 +12,7 @@ import MenuItem from "@material-ui/core/MenuItem";
import IconButton from "@material-ui/core/IconButton";
import ReplyAllIcon from "@material-ui/icons/ReplyAll";
import ReplyIcon from "@material-ui/icons/Reply";
import ClearIcon from "@material-ui/icons/Clear";
interface IProps {
player: IPlayer;
@@ -33,6 +34,11 @@ export function Augmentations(props: IProps): React.ReactElement {
props.player.queueAugmentation(augName);
}
}
function clearAugs(): void {
props.player.augmentations = [];
}
return (
<Accordion>
<AccordionSummary expandIcon={<ExpandMoreIcon />}>
@@ -61,6 +67,13 @@ export function Augmentations(props: IProps): React.ReactElement {
</IconButton>
</>
}
endAdornment={
<>
<IconButton color="primary" onClick={clearAugs}>
<ClearIcon />
</IconButton>
</>
}
>
{Object.values(AugmentationNames).map((aug) => (
<MenuItem key={aug} value={aug}>