Connect Speed Slider to internal Variable

This commit is contained in:
Marty Oehme 2018-08-23 09:33:15 +02:00
parent c86d8d8b59
commit bd7990991e
2 changed files with 3 additions and 1 deletions

View file

@ -12,6 +12,8 @@ import 'package:rules_of_living/src/Engine.dart';
)
class ControlsComponent {
final EngineService engineService;
int simSpeed = 5;
Engine get engine => engineService.engine;
ControlsComponent(this.engineService);

View file

@ -9,6 +9,6 @@
<material-button id="random" (click)="onRandomClicked()"><i class="fas fa-random"></i></material-button>
<material-button id="reset" (click)="onResetClicked()"><i class="fas fa-undo"></i></material-button>
<material-button id="clear" (click)="onClearClicked()"><i class="fas fa-trash-alt"></i></material-button>
<i class="fas fa-clock"> Speed:</i><material-slider [max]="10" [min]="1" [value]="1" ></material-slider>
<i class="fas fa-clock">{{simSpeed}}</i> <material-slider [max]="10" [min]="1" [(value)]="simSpeed" ></material-slider>
<material-button id="edges" (click)="onEdgesClicked()"><i class="fas fa-chess-board"></i> </material-button>
</div>