ConceptCreator/src/app/editor/editor.component.html
Sebastian Böckelmann 30e220e0dc
All checks were successful
E2E Testing / test (push) Successful in 1m34s
Open ItemEditor
2024-05-07 08:35:48 +02:00

27 lines
2.1 KiB
HTML

<mat-tab-group [(selectedIndex)]="activeTab">
<mat-tab *ngFor="let modelComponent of gameModelComponents">
<ng-template mat-tab-label>
<mat-icon class="example-tab-icon unsaved" *ngIf="modelComponent.type === ModelComponentType.SCRIPTACCOUNT" [ngClass]="modelComponent.unsaved? 'unsaved':'saved'">inventory_2</mat-icon>
<mat-icon class="example-tab-icon unsaved" *ngIf="modelComponent.type === ModelComponentType.GAMESYTEM" [ngClass]="modelComponent.unsaved? 'unsaved':'saved'">code</mat-icon>
<span [ngClass]="modelComponent.unsaved? 'unsaved':'saved'">{{modelComponent.componentName}}</span>
<button class="content-label close-btn" mat-icon-button (click)="closeGameModelComponent(modelComponent)"><mat-icon>close</mat-icon></button>
</ng-template>
<app-model-component-editor [modelComponent]="modelComponent" (onModelNameUpdated)="onModelNameUpdate()"></app-model-component-editor>
<app-script-account-editor *ngIf="modelComponent.type === ModelComponentType.SCRIPTACCOUNT"
[scriptAccount]="convertModelComponentToScriptAccount(modelComponent)"></app-script-account-editor>
<app-gamesystem-editor *ngIf="modelComponent.type === ModelComponentType.GAMESYTEM"
[gamesystem]="convertModelComponentToGamesystem(modelComponent)"
(onOpenGamesystemEditor)="openGameModelComponent($event)"
[scriptAccounts]="gameModel!.scriptAccounts"></app-gamesystem-editor>
<app-character-editor *ngIf="modelComponent.type === ModelComponentType.CHARACTER"
[character]="convertModelComponentToCharacter(modelComponent)"
[gameModel]="gameModel!"
>
</app-character-editor>
<app-item-group-editor *ngIf="modelComponent.type === ModelComponentType.ITEMGROUP" [itemgroup]="convertModelComponentToItemGroup(modelComponent)"></app-item-group-editor>
<app-item-editor *ngIf="modelComponent.type === ModelComponentType.ITEM" [item]="convertModelComponentToItem(modelComponent)"></app-item-editor>
</mat-tab>
</mat-tab-group>