diff --git a/src/renderer/emulator-info.tsx b/src/renderer/emulator-info.tsx index 40f7ae6..ad1bc61 100644 --- a/src/renderer/emulator-info.tsx +++ b/src/renderer/emulator-info.tsx @@ -38,7 +38,7 @@ export class EmulatorInfo extends React.Component< return (
- Disk: {disk}| CPU Speed: {cpu}|{" "} + Disk: {disk} | CPU Speed: {cpu} |{" "} Hide diff --git a/src/renderer/emulator.tsx b/src/renderer/emulator.tsx index 8efc3e1..d8aaec4 100644 --- a/src/renderer/emulator.tsx +++ b/src/renderer/emulator.tsx @@ -216,12 +216,7 @@ export class Emulator extends React.Component<{}, EmulatorState> { public render() { return ( <> - { - this.setState({ isInfoDisplayed: !this.state.isInfoDisplayed }); - }} - /> + {this.renderInfo()} {this.renderUI()}
@@ -231,6 +226,22 @@ export class Emulator extends React.Component<{}, EmulatorState> { ); } + /** + * Render the little info thingy + */ + public renderInfo() { + if (!this.state.isInfoDisplayed) { + return null; + } + + return { + this.setState({ isInfoDisplayed: !this.state.isInfoDisplayed }); + }} + /> + } + /** * Boot the emulator without restoring state */