Connect Speed Slider to internal Variable
This commit is contained in:
parent
c86d8d8b59
commit
bd7990991e
2 changed files with 3 additions and 1 deletions
|
@ -12,6 +12,8 @@ import 'package:rules_of_living/src/Engine.dart';
|
||||||
)
|
)
|
||||||
class ControlsComponent {
|
class ControlsComponent {
|
||||||
final EngineService engineService;
|
final EngineService engineService;
|
||||||
|
int simSpeed = 5;
|
||||||
|
|
||||||
Engine get engine => engineService.engine;
|
Engine get engine => engineService.engine;
|
||||||
ControlsComponent(this.engineService);
|
ControlsComponent(this.engineService);
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,6 @@
|
||||||
<material-button id="random" (click)="onRandomClicked()"><i class="fas fa-random"></i></material-button>
|
<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="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>
|
<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>
|
<material-button id="edges" (click)="onEdgesClicked()"><i class="fas fa-chess-board"></i> </material-button>
|
||||||
</div>
|
</div>
|
Loading…
Reference in a new issue