issue-5-product-gamesystems #10
@ -1,4 +1,4 @@
|
|||||||
<mat-tab-group>
|
<mat-tab-group [(selectedIndex)]="activeTab">
|
||||||
<mat-tab *ngFor="let modelComponent of gameModelComponents">
|
<mat-tab *ngFor="let modelComponent of gameModelComponents">
|
||||||
<ng-template mat-tab-label>
|
<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.SCRIPTACCOUNT" [ngClass]="modelComponent.unsaved? 'unsaved':'saved'">inventory_2</mat-icon>
|
||||||
|
@ -15,10 +15,12 @@ import {Transition} from "../game-model/gamesystems/Transition";
|
|||||||
export class EditorComponent {
|
export class EditorComponent {
|
||||||
gameModelComponents: ModelComponent[] = [];
|
gameModelComponents: ModelComponent[] = [];
|
||||||
@Output("onModelNameUpdate") onModelNameUpdateEmitter = new EventEmitter<boolean>();
|
@Output("onModelNameUpdate") onModelNameUpdateEmitter = new EventEmitter<boolean>();
|
||||||
|
activeTab: number = this.gameModelComponents.length;
|
||||||
|
|
||||||
openGameModelComponent(gameModelComponent: ModelComponent) {
|
openGameModelComponent(gameModelComponent: ModelComponent) {
|
||||||
if(!this.gameModelComponents.includes(gameModelComponent)) {
|
if(!this.gameModelComponents.includes(gameModelComponent)) {
|
||||||
this.gameModelComponents.push(gameModelComponent);
|
this.gameModelComponents.push(gameModelComponent);
|
||||||
|
this.activeTab = this.gameModelComponents.length;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user