Add Speed Slider Tooltip

This commit is contained in:
Marty Oehme 2018-08-23 12:07:54 +02:00
parent c3368524f9
commit abd2c3ac23
2 changed files with 2 additions and 1 deletions

View file

@ -13,6 +13,7 @@ import 'package:rules_of_living/src/Engine.dart';
class ControlsComponent { class ControlsComponent {
final EngineService engineService; final EngineService engineService;
int simSpeed = 5; int simSpeed = 5;
String get speedSliderTooltip => "Simulation Speed: $simSpeed";
Engine get engine => engineService.engine; Engine get engine => engineService.engine;
ControlsComponent(this.engineService); ControlsComponent(this.engineService);

View file

@ -9,6 +9,6 @@
<material-button id="step" (click)="onStepClicked()" materialTooltip="Step Forward"><material-icon icon="skip_next" baseline></material-icon></material-button> <material-button id="step" (click)="onStepClicked()" materialTooltip="Step Forward"><material-icon icon="skip_next" baseline></material-icon></material-button>
<material-button id="random" (click)="onRandomClicked()" materialTooltip="Add Random Pattern"><material-icon icon="add" baseline></material-icon></material-button> <material-button id="random" (click)="onRandomClicked()" materialTooltip="Add Random Pattern"><material-icon icon="add" baseline></material-icon></material-button>
<material-button id="clear" (click)="onClearClicked()" materialTooltip="Clear"><material-icon icon="clear" baseline></material-icon></material-button> <material-button id="clear" (click)="onClearClicked()" materialTooltip="Clear"><material-icon icon="clear" baseline></material-icon></material-button>
<span [materialTooltip]="simSpeed.toString()"><material-icon icon="alarm" baseline></material-icon><material-slider [max]="10" [min]="1" [(value)]="simSpeed"></material-slider></span> <span [materialTooltip]="speedSliderTooltip"><material-icon icon="alarm" baseline></material-icon><material-slider [max]="10" [min]="1" [(value)]="simSpeed"></material-slider></span>
<material-button id="edges" (click)="onEdgesClicked()"><material-icon icon="border_all" baseline></material-icon></material-button> <material-button id="edges" (click)="onEdgesClicked()"><material-icon icon="border_all" baseline></material-icon></material-button>
</div> </div>