fix: Hide info if requested
This commit is contained in:
parent
658fed75da
commit
51d0011ed0
|
@ -38,7 +38,7 @@ export class EmulatorInfo extends React.Component<
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div id="status">
|
<div id="status">
|
||||||
Disk: <span>{disk}</span>| CPU Speed: <span>{cpu}</span>|{" "}
|
Disk: <span>{disk}</span> | CPU Speed: <span>{cpu}</span> |{" "}
|
||||||
<a href="#" onClick={this.props.toggleInfo}>
|
<a href="#" onClick={this.props.toggleInfo}>
|
||||||
Hide
|
Hide
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -216,12 +216,7 @@ export class Emulator extends React.Component<{}, EmulatorState> {
|
||||||
public render() {
|
public render() {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<EmulatorInfo
|
{this.renderInfo()}
|
||||||
emulator={this.state.emulator}
|
|
||||||
toggleInfo={() => {
|
|
||||||
this.setState({ isInfoDisplayed: !this.state.isInfoDisplayed });
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
{this.renderUI()}
|
{this.renderUI()}
|
||||||
<div id="emulator">
|
<div id="emulator">
|
||||||
<div></div>
|
<div></div>
|
||||||
|
@ -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 <EmulatorInfo
|
||||||
|
emulator={this.state.emulator}
|
||||||
|
toggleInfo={() => {
|
||||||
|
this.setState({ isInfoDisplayed: !this.state.isInfoDisplayed });
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Boot the emulator without restoring state
|
* Boot the emulator without restoring state
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in a new issue