diff --git a/src/app/editor/items/item-group-editor/item-group-editor.component.html b/src/app/editor/items/item-group-editor/item-group-editor.component.html index b88942b..caa4082 100644 --- a/src/app/editor/items/item-group-editor/item-group-editor.component.html +++ b/src/app/editor/items/item-group-editor/item-group-editor.component.html @@ -27,7 +27,7 @@ - + diff --git a/src/app/editor/items/item-group-editor/item-group-editor.component.ts b/src/app/editor/items/item-group-editor/item-group-editor.component.ts index f0326c0..ba7578f 100644 --- a/src/app/editor/items/item-group-editor/item-group-editor.component.ts +++ b/src/app/editor/items/item-group-editor/item-group-editor.component.ts @@ -3,6 +3,7 @@ import {ItemGroup} from "../../../project/game-model/inventory/ItemGroup"; import {MatColumnDef, MatTable, MatTableDataSource} from "@angular/material/table"; import {ItemQuality} from "../../../project/game-model/inventory/ItemQuality"; import {ItemGroupCharacteristic} from "../../../project/game-model/inventory/ItemgroupCharacteristic"; +import {Item} from "../../../project/game-model/inventory/Item"; @Component({ selector: 'app-item-group-editor', @@ -36,4 +37,11 @@ export class ItemGroupEditorComponent implements OnInit{ finishEditing() { this.editedCharacteristic = undefined; } + + addItemgroupCharacteristic() { + const itemgroupCharacteristic = new ItemGroupCharacteristic("", ""); + this.itemgroup!.itemGroupCharacteristics.push(itemgroupCharacteristic); + this.itemQualityDatasource.data = this.itemgroup!.itemGroupCharacteristics; + this.editedCharacteristic = itemgroupCharacteristic; + } }