diff --git a/Modules/GameEngineKit/Sources/_NewSystem/Views/DnD/Grid/Coordinators/DnDGridCoordinator+AssociateCategories.swift b/Modules/GameEngineKit/Sources/_NewSystem/Views/DnD/Grid/Coordinators/DnDGridCoordinator+AssociateCategories.swift index c899e9a644..fdbbe9cd3f 100644 --- a/Modules/GameEngineKit/Sources/_NewSystem/Views/DnD/Grid/Coordinators/DnDGridCoordinator+AssociateCategories.swift +++ b/Modules/GameEngineKit/Sources/_NewSystem/Views/DnD/Grid/Coordinators/DnDGridCoordinator+AssociateCategories.swift @@ -16,7 +16,7 @@ public class DnDGridCoordinatorAssociateCategories: DnDGridGameplayCoordinatorPr self.gameplay = gameplay self.uiChoices.value.choices = gameplay.choices.map { choice in - DnDAnswerNode(id: choice.id, value: choice.value, type: choice.type, size: self.uiChoices.value.choiceSize) + DnDAnswerNode(id: choice.id, value: choice.value, type: choice.type, size: self.uiChoices.value.choiceSize(for: gameplay.choices.count)) } } diff --git a/Modules/GameEngineKit/Sources/_NewSystem/Views/DnD/GridWithZones/Coordinators/DnDGridWithZonesCoordinator+AssociateCategories.swift b/Modules/GameEngineKit/Sources/_NewSystem/Views/DnD/GridWithZones/Coordinators/DnDGridWithZonesCoordinator+AssociateCategories.swift index 70de2fa2e4..c516ce13b1 100644 --- a/Modules/GameEngineKit/Sources/_NewSystem/Views/DnD/GridWithZones/Coordinators/DnDGridWithZonesCoordinator+AssociateCategories.swift +++ b/Modules/GameEngineKit/Sources/_NewSystem/Views/DnD/GridWithZones/Coordinators/DnDGridWithZonesCoordinator+AssociateCategories.swift @@ -23,7 +23,7 @@ public class DnDGridWithZonesCoordinatorAssociateCategories: DnDGridWithZonesGam } self.uiChoices.value.choices = gameplay.choices[2...].map { choice in - DnDAnswerNode(id: choice.id, value: choice.value, type: choice.type, size: self.uiChoices.value.choiceSize) + DnDAnswerNode(id: choice.id, value: choice.value, type: choice.type, size: self.uiChoices.value.choiceSize(for: gameplay.choices.count)) } } diff --git a/Modules/GameEngineKit/Sources/_NewSystem/Views/DnD/OneToOne/Coordinators/DnDOneToOneCoordinator+FindTheRightOrder.swift b/Modules/GameEngineKit/Sources/_NewSystem/Views/DnD/OneToOne/Coordinators/DnDOneToOneCoordinator+FindTheRightOrder.swift index a8fe0a1d21..812cd0624a 100644 --- a/Modules/GameEngineKit/Sources/_NewSystem/Views/DnD/OneToOne/Coordinators/DnDOneToOneCoordinator+FindTheRightOrder.swift +++ b/Modules/GameEngineKit/Sources/_NewSystem/Views/DnD/OneToOne/Coordinators/DnDOneToOneCoordinator+FindTheRightOrder.swift @@ -16,7 +16,7 @@ public class DnDOneToOneCoordinatorFindTheRightOrder: DnDOneToOneGameplayCoordin self.gameplay = gameplay self.uiChoices.value.choices = gameplay.orderedChoices.map { choice in - DnDAnswerNode(id: choice.id, value: choice.value, type: choice.type, size: self.uiChoices.value.choiceSize) + DnDAnswerNode(id: choice.id, value: choice.value, type: choice.type, size: self.uiChoices.value.choiceSize(for: gameplay.orderedChoices.count)) } self.uiDropZones = self.uiChoices.value.choices.map { node in diff --git a/Modules/GameEngineKit/Sources/_NewSystem/Views/DnD/SKComponents/DnDAnswerNode.swift b/Modules/GameEngineKit/Sources/_NewSystem/Views/DnD/SKComponents/DnDAnswerNode.swift index 2a4068fe70..b43bb85e99 100644 --- a/Modules/GameEngineKit/Sources/_NewSystem/Views/DnD/SKComponents/DnDAnswerNode.swift +++ b/Modules/GameEngineKit/Sources/_NewSystem/Views/DnD/SKComponents/DnDAnswerNode.swift @@ -98,8 +98,8 @@ public struct DnDUIChoices { var choices: [DnDAnswerNode] - var choiceSize: CGSize { - DnDGridSize(self.choices.count).choiceSize + func choiceSize(for choiceNumber: Int) -> CGSize { + DnDGridSize(choiceNumber).choiceSize } // MARK: Private @@ -142,14 +142,15 @@ public struct DnDUIChoices { switch self { case .one, .two: + CGSize(width: 220, height: 220) + case .three, + .four: CGSize(width: 200, height: 200) - case .three: - CGSize(width: 180, height: 180) - case .four, - .five, - .six, + case .five: + CGSize(width: 160, height: 160) + case .six, .none: - CGSize(width: 140, height: 140) + CGSize(width: 150, height: 150) } } }