Add Configuration Sidebar with ConfigurationService
This commit is contained in:
parent
6ba0ca55cb
commit
bf0d136d8b
10 changed files with 83 additions and 23 deletions
|
|
@ -1,5 +1,6 @@
|
|||
import 'package:angular/angular.dart';
|
||||
import 'package:angular_components/angular_components.dart';
|
||||
import 'package:rules_of_living/service/configuration_service.dart';
|
||||
import 'package:rules_of_living/service/engine_service.dart';
|
||||
import 'package:rules_of_living/src/Engine.dart';
|
||||
|
||||
|
|
@ -10,7 +11,6 @@ import 'package:rules_of_living/src/Engine.dart';
|
|||
coreDirectives,
|
||||
MaterialButtonComponent,
|
||||
MaterialIconComponent,
|
||||
MaterialSliderComponent,
|
||||
MaterialTooltipDirective
|
||||
],
|
||||
providers: [],
|
||||
|
|
@ -18,8 +18,6 @@ import 'package:rules_of_living/src/Engine.dart';
|
|||
)
|
||||
class ControlsComponent {
|
||||
final EngineService engineService;
|
||||
int simSpeed = 5;
|
||||
String get speedSliderTooltip => "Simulation Speed: $simSpeed";
|
||||
|
||||
Engine get engine => engineService.engine;
|
||||
ControlsComponent(this.engineService);
|
||||
|
|
@ -41,10 +39,6 @@ class ControlsComponent {
|
|||
engine.addPattern();
|
||||
}
|
||||
|
||||
void onEdgesClicked() {
|
||||
engine.toggleEdgeRendering();
|
||||
}
|
||||
|
||||
void onClearClicked() {
|
||||
engine.clear();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue