|
|
@ -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 {
|
|
|
|