Add Save and Load Buttons to Interface
Fully functional and tested.
This commit is contained in:
parent
22dabda987
commit
92e147028e
2 changed files with 8 additions and 3 deletions
|
@ -29,8 +29,12 @@ class ControlsComponent {
|
||||||
engine.step();
|
engine.step();
|
||||||
}
|
}
|
||||||
|
|
||||||
void onResetClicked() {
|
void onSaveClicked() {
|
||||||
sim.reset();
|
sim.save();
|
||||||
|
}
|
||||||
|
|
||||||
|
void onLoadClicked() {
|
||||||
|
sim.load();
|
||||||
}
|
}
|
||||||
|
|
||||||
void onRandomClicked() {
|
void onRandomClicked() {
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
<div id="controls">
|
<div id="controls">
|
||||||
<material-button id="reset" (click)="onResetClicked()"><material-icon icon="replay" baseline></material-icon></material-button>
|
<material-button id="save" (click)="onSaveClicked()"><material-icon icon="save" baseline></material-icon></material-button>
|
||||||
|
<material-button id="load" (click)="onLoadClicked()"><material-icon icon="history" baseline></material-icon></material-button>
|
||||||
<material-button id="run" (click)="onStartClicked()">
|
<material-button id="run" (click)="onStartClicked()">
|
||||||
<span [ngSwitch]="engine.isRunning">
|
<span [ngSwitch]="engine.isRunning">
|
||||||
<material-icon *ngSwitchCase="false" icon="play_arrow" baseline></material-icon>
|
<material-icon *ngSwitchCase="false" icon="play_arrow" baseline></material-icon>
|
||||||
|
|
Loading…
Reference in a new issue