fix button problem

dev_ARKit^2
Rayhân HASSOU 1 year ago
parent d3884adda3
commit 2f8b6b92b9

@ -25,12 +25,11 @@ struct MainMenuButton: View {
var bottomRightCorner: CGFloat = 0 var bottomRightCorner: CGFloat = 0
var body: some View { var body: some View {
Button(text.uppercased()) { Button(action: {
//playSound(named: sound) // playSound(named: sound)
if let onClick: () -> Void { onClick?()
onClick() }) {
} Text(text.uppercased())
}
.font(.headline) .font(.headline)
.fontWeight(.semibold) .fontWeight(.semibold)
.foregroundColor(.white) .foregroundColor(.white)
@ -44,6 +43,8 @@ struct MainMenuButton: View {
.frame(width: UIScreen.main.bounds.width / 1.7) .frame(width: UIScreen.main.bounds.width / 1.7)
.frame(maxWidth: .infinity, alignment: horizontalAlignment) .frame(maxWidth: .infinity, alignment: horizontalAlignment)
} }
.buttonStyle(PlainButtonStyle())
}
} }
struct RoundedCornersShape: Shape { struct RoundedCornersShape: Shape {

Loading…
Cancel
Save