Bug: couldn't exit Modal showing Basis Informationen, now possible through Button zurück

This commit is contained in:
Chauntalle Schüle 2020-05-14 14:09:45 +02:00 committed by Chauntalle Schüle
parent c14731dff6
commit 5feb831873

View File

@ -21,6 +21,9 @@ class Modal: GKEntity{
case .BaseDetails: case .BaseDetails:
addComponent(ModalBackgroundComponent(anchorPoint: anchorPoint)) addComponent(ModalBackgroundComponent(anchorPoint: anchorPoint))
addComponent(ModalContentComponent(header: "Basis Information", body: "Diese Basis enthält \(base.unitCount) Einheiten", footer: "", anchorPoint: anchorPoint)) addComponent(ModalContentComponent(header: "Basis Information", body: "Diese Basis enthält \(base.unitCount) Einheiten", footer: "", anchorPoint: anchorPoint))
addComponent(ButtonComponent(iconName: "", text: "Zurück", position: CGPoint(x: anchorPoint.x , y: anchorPoint.y - 120), isEnabled: true, onButtonPress: {
self.removeModalEntities(entityManager: self.modalEntityManager)
}))
case .BaseAttack: case .BaseAttack:
addComponent(ModalBackgroundComponent(anchorPoint: anchorPoint)) addComponent(ModalBackgroundComponent(anchorPoint: anchorPoint))
addComponent(SliderComponent(width: 300, position: CGPoint(x: anchorPoint.x , y: anchorPoint.y - 50))) addComponent(SliderComponent(width: 300, position: CGPoint(x: anchorPoint.x , y: anchorPoint.y - 50)))