You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
62 lines
1.6 KiB
62 lines
1.6 KiB
//
|
|
// MainMenuView.swift
|
|
// DouShouQiIOS
|
|
//
|
|
// Created by Pierre FERREIRA on 21/05/2024.
|
|
//
|
|
|
|
import SwiftUI
|
|
|
|
struct MainMenuView: View {
|
|
@Environment(\.colorScheme) var colorScheme
|
|
|
|
var body: some View {
|
|
NavigationStack {
|
|
|
|
VStack {
|
|
Image("DouShouQi")
|
|
.resizable()
|
|
.aspectRatio(contentMode: .fit)
|
|
.frame(width: 200, height: 200)
|
|
|
|
|
|
Text("DouShouQi")
|
|
.font(.largeTitle)
|
|
.bold()
|
|
.padding()
|
|
|
|
NavButton("Jouer Seul", destinationView: {GameView()})
|
|
.padding(.top, 10)
|
|
|
|
NavButton("Jouer en Multi", destinationView: {GameView()})
|
|
|
|
|
|
NavButton("Leaderboard", destinationView: {PlayerListView()})
|
|
.padding(.top, 20)
|
|
|
|
Button(action: {
|
|
// Quitter
|
|
print("Quitter tapped!")
|
|
}
|
|
) {
|
|
Text("Quitter")
|
|
.font(.title2)
|
|
.padding()
|
|
.foregroundColor(.yellow)
|
|
}.overlay(
|
|
RoundedRectangle(cornerRadius: 10)
|
|
.stroke(.yellow, lineWidth: 3)
|
|
)
|
|
.padding(.top, 20)
|
|
|
|
}.navigationBarBackButtonHidden(true)
|
|
}
|
|
}
|
|
}
|
|
|
|
struct MainMenuView_Previews: PreviewProvider {
|
|
static var previews: some View {
|
|
MainMenuView()
|
|
}
|
|
}
|