Add Save and Load Buttons to Interface

Fully functional and tested.
This commit is contained in:
Unknown 2018-10-19 20:51:14 +02:00
parent 22dabda987
commit 92e147028e
2 changed files with 8 additions and 3 deletions

View file

@ -29,8 +29,12 @@ class ControlsComponent {
engine.step();
}
void onResetClicked() {
sim.reset();
void onSaveClicked() {
sim.save();
}
void onLoadClicked() {
sim.load();
}
void onRandomClicked() {

View file

@ -1,5 +1,6 @@
<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()">
<span [ngSwitch]="engine.isRunning">
<material-icon *ngSwitchCase="false" icon="play_arrow" baseline></material-icon>