issue-5-gamesystems #6

Merged
sebastian merged 24 commits from issue-5-gamesystems into main 2024-02-10 12:30:37 +00:00
2 changed files with 12 additions and 1 deletions
Showing only changes of commit 4dbed5a855 - Show all commits

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;
}
}
}
}