From ea339380e9b9f8112a966130820db24b4a2552cd Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Wed, 16 Oct 2019 14:23:12 -0400 Subject: [PATCH] Add counterclockwise rotation button --- Tetris/ContentView.swift | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Tetris/ContentView.swift b/Tetris/ContentView.swift index 9928aed..6e0a77c 100644 --- a/Tetris/ContentView.swift +++ b/Tetris/ContentView.swift @@ -42,14 +42,18 @@ struct ContentView: View { // .gesture(horizDragGesture.simultaneously(with: verticalDragGesture)) HStack { + Button(action: { self.controller.rotate(direction: .counterClockwise) }) { + Image(systemName: "gobackward").resizable().frame(width: 50, height: 50) + } + .padding(.leading, 25) Button(action: self.onTap) { Image(systemName: "goforward").resizable().frame(width: 50, height: 50) } - .padding(.leading, 50) + .padding(.leading, 25) Spacer() DPadView(up: self.controller.hold, down: self.controller.drop, left: self.controller.left, right: self.controller.right) .frame(width: 150, height: 150) - .padding(.trailing, 50) + .padding(.trailing, 25) } } }