- public var body: some View {
- VStack(alignment: .leading, spacing: 0) {
- ForEach(0 ..< verticalTileCount, id: \.self) { i in
- HStack(alignment: .top, spacing: 0) {
- ForEach(0 ..< 5) { j in
- if i * 5 + j < patterns.count {
- Pattern(design: .constant(patterns[i * 5 + j]), pixelSize: pixelSize, foregroundColor: foregroundColor, backgroundColor: backgroundColor)
- .frame(width: pixelSize * 16, height: pixelSize * 12)
- .border(selectedDesign == patterns[i * 5 + j] ? selectedColor : foregroundColor, width: pixelSize / 2.0)
- .onTapGesture(perform: {
- selectedDesign = patterns[i * 5 + j]
- })
- }
+ public var body: some View {
+ VStack(alignment: .leading, spacing: 0) {
+ ForEach(0 ..< verticalTileCount, id: \.self) { i in
+ HStack(alignment: .top, spacing: 0) {
+ ForEach(0 ..< 5) { j in
+ if i * 5 + j < patterns.count {
+ PatternView(design: .constant(patterns[i * 5 + j]), pixelSize: pixelSize, foregroundColor: foregroundColor, backgroundColor: backgroundColor)
+ .frame(width: pixelSize * 16, height: pixelSize * 12)
+ .border(selectedDesign == patterns[i * 5 + j] ? selectedColor : foregroundColor, width: pixelSize / 2.0)
+ .onTapGesture(perform: {
+ selectedDesign = patterns[i * 5 + j]
+ })