diff --git a/src/app/editor/gamesystem-editor/template-specificator/template-specificator.component.html b/src/app/editor/gamesystem-editor/template-specificator/template-specificator.component.html index 75f749d..be2c11a 100644 --- a/src/app/editor/gamesystem-editor/template-specificator/template-specificator.component.html +++ b/src/app/editor/gamesystem-editor/template-specificator/template-specificator.component.html @@ -1 +1,14 @@ -

template-specificator works!

+

Specify Templatesystem

+
+

This will not affect the properties of the Templatesystem itself!

+ + Select Templatesystem + + {{templateSystem.componentName}} + + +
+
+ + +
diff --git a/src/app/editor/gamesystem-editor/template-specificator/template-specificator.component.scss b/src/app/editor/gamesystem-editor/template-specificator/template-specificator.component.scss index e69de29..4e80027 100644 --- a/src/app/editor/gamesystem-editor/template-specificator/template-specificator.component.scss +++ b/src/app/editor/gamesystem-editor/template-specificator/template-specificator.component.scss @@ -0,0 +1,3 @@ +.long-form { + width: 100%; +} diff --git a/src/app/editor/gamesystem-editor/template-specificator/template-specificator.component.ts b/src/app/editor/gamesystem-editor/template-specificator/template-specificator.component.ts index df10080..bd85e38 100644 --- a/src/app/editor/gamesystem-editor/template-specificator/template-specificator.component.ts +++ b/src/app/editor/gamesystem-editor/template-specificator/template-specificator.component.ts @@ -1,4 +1,7 @@ -import { Component } from '@angular/core'; +import {Component, Inject} from '@angular/core'; +import {MAT_DIALOG_DATA, MatDialogRef} from "@angular/material/dialog"; +import {Gamesystem} from "../../../project/game-model/gamesystems/Gamesystem"; +import {FormControl, Validators} from "@angular/forms"; @Component({ selector: 'app-template-specificator', @@ -7,4 +10,17 @@ import { Component } from '@angular/core'; }) export class TemplateSpecificatorComponent { + templateCtrl: FormControl = new FormControl('', [Validators.required]) + + constructor(private dialogRef: MatDialogRef, + @Inject(MAT_DIALOG_DATA) public templateSystems: Gamesystem[] = []) { + } + + cancelSpecification() { + this.dialogRef.close() + } + + confirmSpecification() { + this.dialogRef.close(this.templateCtrl.value) + } }