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 8 additions and 1 deletions
Showing only changes of commit d191c28505 - Show all commits

View File

@ -51,7 +51,7 @@
<ng-container matColumnDef="delete"> <ng-container matColumnDef="delete">
<th mat-header-cell *matHeaderCellDef></th> <th mat-header-cell *matHeaderCellDef></th>
<td mat-cell *matCellDef="let transition"> <td mat-cell *matCellDef="let transition">
<button mat-icon-button color="warn"><mat-icon>delete</mat-icon></button> <button mat-icon-button color="warn" (click)="deleteTransition(transition)"><mat-icon>delete</mat-icon></button>
</td> </td>
</ng-container> </ng-container>

View File

@ -76,4 +76,11 @@ export class SimpleTransitionEditorComponent implements OnInit {
this.dataSource.data = this.gamesystem!.transitions; this.dataSource.data = this.gamesystem!.transitions;
this.editedTransition = undefined; this.editedTransition = undefined;
} }
deleteTransition(transition: SimpleTransition) {
if(this.gamesystem!.parentGamesystem == undefined) {
this.gamesystem!.removeTransition(transition);
this.dataSource.data = this.gamesystem!.transitions;
}
}
} }