Switch Control Interface Icons to MaterialIcons

This commit is contained in:
Marty Oehme 2018-08-23 11:34:08 +02:00
parent 594506081a
commit 4906bbe54c
3 changed files with 9 additions and 14 deletions

View file

@ -6,7 +6,7 @@ import 'package:rules_of_living/src/Engine.dart';
@Component(
selector: 'sim-controls',
templateUrl: "controls_component.html",
directives: [coreDirectives, MaterialButtonComponent, MaterialIconComponent, MaterialSliderComponent],
directives: [coreDirectives, MaterialButtonComponent, MaterialIconComponent, MaterialSliderComponent, MaterialTooltipDirective],
providers: [],
styleUrls: const ["controls_component.css"],
)

View file

@ -1,14 +1,14 @@
<div id="controls">
<material-button id="reset" (click)="onResetClicked()"><material-icon icon="replay" baseline></material-icon></material-button>
<material-button id="run" (click)="onStartClicked()">
<span [ngSwitch]="engine.running">
<i *ngSwitchCase="false" class="fas fa-play"></i>
<i *ngSwitchCase="true" class="fas fa-stop"></i>
<material-icon *ngSwitchCase="false" icon="play_arrow" baseline></material-icon>
<material-icon *ngSwitchCase="true" icon="pause" baseline></material-icon>
</span>
</material-button>
<material-button id="step" (click)="onStepClicked()"><i class="fas fa-step-forward"></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="clear" (click)="onClearClicked()"><i class="fas fa-trash-alt"></i></material-button>
<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="step" (click)="onStepClicked()" materialTooltip="Step Forward"><material-icon icon="arrow_right" 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>
<span [materialTooltip]="simSpeed.toString()"><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>
</div>

View file

@ -19,11 +19,6 @@
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<link rel="icon" type="image/png" href="favicon.png">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.1.0/css/solid.css" integrity="sha384-TbilV5Lbhlwdyc4RuIV/JhD8NR+BfMrvz4BL5QFa2we1hQu6wvREr3v6XSRfCTRp" crossorigin="anonymous">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.1.0/css/fontawesome.css" integrity="sha384-ozJwkrqb90Oa3ZNb+yKFW2lToAWYdTiF1vt8JiH5ptTGHTGcN7qdoR1F95e0kYyG" crossorigin="anonymous">
<!-- As per https://pub.dartlang.org/packages/angular_components/versions/0.9.0-beta#-readme-tab-#Required-Icon-Font -->
<script defer src="main.dart.js"></script>
</head>