diff --git a/DouShouQi_App/DouShouQi_App/Views/Player/ScoreBoardView.swift b/DouShouQi_App/DouShouQi_App/Views/Player/ScoreBoardView.swift index 4b9da01..53c3e1a 100644 --- a/DouShouQi_App/DouShouQi_App/Views/Player/ScoreBoardView.swift +++ b/DouShouQi_App/DouShouQi_App/Views/Player/ScoreBoardView.swift @@ -6,6 +6,7 @@ // import SwiftUI +import DouShouQiModel struct ScoreBoardView: View { var body: some View { @@ -14,35 +15,38 @@ struct ScoreBoardView: View { TitlePageFrame(Text: "Score Board", ImageWidth: 200, ImageHeight: 200) } - HStack { - Text("Rank") - .font(.headline) - .frame(width: 50, alignment: .trailing) - - Text("Name") + VStack { + HStack { + Text("Rank") + .font(.headline) + .frame(width: 50, alignment: .trailing) + + Text("Name") + + Spacer() + + Text("Wins") + .frame(width: 55, alignment: .trailing) + + Text("Looses") + .frame(width: 55, alignment: .trailing) + + } + .padding(10) - Spacer() + HStack { + Rectangle() + .frame(height: 2) + } - Text("Wins") - .frame(width: 55, alignment: .trailing) + PlayerResumeFrame(Name: "Nathan Verdier", Rank: 1, Wins: 19, Looses: 15) + PlayerResumeFrame(Name: "Rayhan Hassou", Rank: 2, Wins: 17, Looses: 17) + PlayerResumeFrame(Name: "Rémi Regnault", Rank: 3, Wins: 15, Looses: 19) - Text("Looses") - .frame(width: 55, alignment: .trailing) - - } - .padding(10) - - HStack { - Rectangle() - .frame(height: 2) + Spacer() } - - PlayerResumeFrame(Name: "Nathan Verdier", Rank: 1, Wins: 19, Looses: 15) - PlayerResumeFrame(Name: "Rayhan Hassou", Rank: 2, Wins: 17, Looses: 17) - PlayerResumeFrame(Name: "Rémi Regnault", Rank: 3, Wins: 15, Looses: 19) - - Spacer() } + .padding(10) } }