Create new States in Editor
Some checks failed
E2E Testing / test (push) Failing after 1m22s

This commit is contained in:
Sebastian Böckelmann 2024-02-10 11:51:32 +01:00
parent 19cfe82905
commit 4dbed5a855
2 changed files with 12 additions and 1 deletions

View File

@ -54,7 +54,7 @@
<ng-container matColumnDef="expand">
<th mat-header-cell *matHeaderCellDef aria-label="row actions">
<button mat-icon-button><mat-icon>add</mat-icon></button>
<button mat-icon-button (click)="addState()"><mat-icon>add</mat-icon></button>
</th>
<td mat-cell *matCellDef="let element">
<button mat-icon-button aria-label="expand row" (click)="(expandedElement = expandedElement === element ? null : element); $event.stopPropagation()">

View File

@ -68,4 +68,15 @@ export class SimpleStateEditorComponent implements OnInit{
}
}
addState() {
if(this.gamesystem != undefined) {
const simpleState = this.gamesystem.createState("New State", "");
if(simpleState != undefined) {
this.dataSource.data = this.gamesystem.states;
this.editedElement = simpleState;
this.expandedElement = simpleState;
}
}
}
}