From 987b73ee5abe409ca540a37c0fd48aa859d4a7cd Mon Sep 17 00:00:00 2001 From: "remi.regnault" Date: Tue, 21 May 2024 15:01:40 +0200 Subject: [PATCH 1/7] :construction: adding PlayerResumeFrame --- .../DouShouQi_App.xcodeproj/project.pbxproj | 12 +++++ .../Components/Player/PlayerResumeFrame.swift | 45 +++++++++++++++++++ 2 files changed, 57 insertions(+) create mode 100644 DouShouQi_App/DouShouQi_App/Components/Player/PlayerResumeFrame.swift diff --git a/DouShouQi_App/DouShouQi_App.xcodeproj/project.pbxproj b/DouShouQi_App/DouShouQi_App.xcodeproj/project.pbxproj index 3626663..24935ce 100644 --- a/DouShouQi_App/DouShouQi_App.xcodeproj/project.pbxproj +++ b/DouShouQi_App/DouShouQi_App.xcodeproj/project.pbxproj @@ -16,6 +16,7 @@ 645834792BF5F92600E18321 /* DouShouQi_AppUITestsLaunchTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 645834782BF5F92600E18321 /* DouShouQi_AppUITestsLaunchTests.swift */; }; 645834882BF5FEA000E18321 /* DSQ.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 645834872BF5FEA000E18321 /* DSQ.xcframework */; }; 645834892BF5FEA000E18321 /* DSQ.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 645834872BF5FEA000E18321 /* DSQ.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 645B4C202BFCCA0500FD658A /* PlayerResumeFrame.swift in Sources */ = {isa = PBXBuildFile; fileRef = 645B4C1F2BFCCA0500FD658A /* PlayerResumeFrame.swift */; }; 649ABF5B2BF60D78002E8894 /* MainMenuView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 649ABF5A2BF60D78002E8894 /* MainMenuView.swift */; }; 649ABF602BF60F2D002E8894 /* MainMenuButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 649ABF5F2BF60F2D002E8894 /* MainMenuButton.swift */; }; 649B59A42BF64574002BAE38 /* TitlePageFrame.swift in Sources */ = {isa = PBXBuildFile; fileRef = 649B59A32BF64574002BAE38 /* TitlePageFrame.swift */; }; @@ -71,6 +72,7 @@ 645834782BF5F92600E18321 /* DouShouQi_AppUITestsLaunchTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DouShouQi_AppUITestsLaunchTests.swift; sourceTree = ""; }; 645834852BF5FE1400E18321 /* DouShouQi-App-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = "DouShouQi-App-Info.plist"; sourceTree = SOURCE_ROOT; }; 645834872BF5FEA000E18321 /* DSQ.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; path = DSQ.xcframework; sourceTree = ""; }; + 645B4C1F2BFCCA0500FD658A /* PlayerResumeFrame.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlayerResumeFrame.swift; sourceTree = ""; }; 649ABF5A2BF60D78002E8894 /* MainMenuView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainMenuView.swift; sourceTree = ""; }; 649ABF5F2BF60F2D002E8894 /* MainMenuButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainMenuButton.swift; sourceTree = ""; }; 649B59A32BF64574002BAE38 /* TitlePageFrame.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TitlePageFrame.swift; sourceTree = ""; }; @@ -177,6 +179,14 @@ name = Frameworks; sourceTree = ""; }; + 645B4C1C2BFCC95000FD658A /* Player */ = { + isa = PBXGroup; + children = ( + 645B4C1F2BFCCA0500FD658A /* PlayerResumeFrame.swift */, + ); + path = Player; + sourceTree = ""; + }; 649ABF592BF60D13002E8894 /* Views */ = { isa = PBXGroup; children = ( @@ -188,6 +198,7 @@ 649ABF5E2BF60ED5002E8894 /* Components */ = { isa = PBXGroup; children = ( + 645B4C1C2BFCC95000FD658A /* Player */, 649ABF5F2BF60F2D002E8894 /* MainMenuButton.swift */, 649B59A32BF64574002BAE38 /* TitlePageFrame.swift */, ); @@ -371,6 +382,7 @@ 649ABF602BF60F2D002E8894 /* MainMenuButton.swift in Sources */, 649B59B22BF65392002BAE38 /* TextStyles.swift in Sources */, 6458345C2BF5F92300E18321 /* DouShouQi_AppApp.swift in Sources */, + 645B4C202BFCCA0500FD658A /* PlayerResumeFrame.swift in Sources */, 649ABF5B2BF60D78002E8894 /* MainMenuView.swift in Sources */, 649B59A42BF64574002BAE38 /* TitlePageFrame.swift in Sources */, ); diff --git a/DouShouQi_App/DouShouQi_App/Components/Player/PlayerResumeFrame.swift b/DouShouQi_App/DouShouQi_App/Components/Player/PlayerResumeFrame.swift new file mode 100644 index 0000000..201bffb --- /dev/null +++ b/DouShouQi_App/DouShouQi_App/Components/Player/PlayerResumeFrame.swift @@ -0,0 +1,45 @@ +// +// PlayerResumeFrame.swift +// DouShouQi_App +// +// Created by Rémi REGNAULT on 21/05/2024. +// + +import SwiftUI + +struct PlayerResumeFrame: View { + + // Player Params + let Name: String + let Rank: Int + let Wins: Int + let Looses: Int + + var body: some View { + 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) + } + } +} + +struct PlayerResumeFrame_Previews: PreviewProvider { + static var previews: some View { + PlayerResumeFrame(Name: "Michel Polnaref", Rank: 178, Wins: 0, Looses: 296) + } +} From 38b104d0593b50815ece103bfd039e52791a83e6 Mon Sep 17 00:00:00 2001 From: "remi.regnault" Date: Tue, 21 May 2024 15:24:07 +0200 Subject: [PATCH 2/7] :construction: adding ScoreBoardView --- .../DouShouQi_App.xcodeproj/project.pbxproj | 12 +++++ .../Views/Player/ScoreBoardView.swift | 53 +++++++++++++++++++ 2 files changed, 65 insertions(+) create mode 100644 DouShouQi_App/DouShouQi_App/Views/Player/ScoreBoardView.swift diff --git a/DouShouQi_App/DouShouQi_App.xcodeproj/project.pbxproj b/DouShouQi_App/DouShouQi_App.xcodeproj/project.pbxproj index 24935ce..908f76b 100644 --- a/DouShouQi_App/DouShouQi_App.xcodeproj/project.pbxproj +++ b/DouShouQi_App/DouShouQi_App.xcodeproj/project.pbxproj @@ -17,6 +17,7 @@ 645834882BF5FEA000E18321 /* DSQ.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 645834872BF5FEA000E18321 /* DSQ.xcframework */; }; 645834892BF5FEA000E18321 /* DSQ.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 645834872BF5FEA000E18321 /* DSQ.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 645B4C202BFCCA0500FD658A /* PlayerResumeFrame.swift in Sources */ = {isa = PBXBuildFile; fileRef = 645B4C1F2BFCCA0500FD658A /* PlayerResumeFrame.swift */; }; + 645B4C252BFCD3C600FD658A /* ScoreBoardView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 645B4C242BFCD3C600FD658A /* ScoreBoardView.swift */; }; 649ABF5B2BF60D78002E8894 /* MainMenuView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 649ABF5A2BF60D78002E8894 /* MainMenuView.swift */; }; 649ABF602BF60F2D002E8894 /* MainMenuButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 649ABF5F2BF60F2D002E8894 /* MainMenuButton.swift */; }; 649B59A42BF64574002BAE38 /* TitlePageFrame.swift in Sources */ = {isa = PBXBuildFile; fileRef = 649B59A32BF64574002BAE38 /* TitlePageFrame.swift */; }; @@ -73,6 +74,7 @@ 645834852BF5FE1400E18321 /* DouShouQi-App-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = "DouShouQi-App-Info.plist"; sourceTree = SOURCE_ROOT; }; 645834872BF5FEA000E18321 /* DSQ.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; path = DSQ.xcframework; sourceTree = ""; }; 645B4C1F2BFCCA0500FD658A /* PlayerResumeFrame.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlayerResumeFrame.swift; sourceTree = ""; }; + 645B4C242BFCD3C600FD658A /* ScoreBoardView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ScoreBoardView.swift; sourceTree = ""; }; 649ABF5A2BF60D78002E8894 /* MainMenuView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainMenuView.swift; sourceTree = ""; }; 649ABF5F2BF60F2D002E8894 /* MainMenuButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainMenuButton.swift; sourceTree = ""; }; 649B59A32BF64574002BAE38 /* TitlePageFrame.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TitlePageFrame.swift; sourceTree = ""; }; @@ -187,9 +189,18 @@ path = Player; sourceTree = ""; }; + 645B4C232BFCD39A00FD658A /* Player */ = { + isa = PBXGroup; + children = ( + 645B4C242BFCD3C600FD658A /* ScoreBoardView.swift */, + ); + path = Player; + sourceTree = ""; + }; 649ABF592BF60D13002E8894 /* Views */ = { isa = PBXGroup; children = ( + 645B4C232BFCD39A00FD658A /* Player */, 649ABF5A2BF60D78002E8894 /* MainMenuView.swift */, ); path = Views; @@ -378,6 +389,7 @@ 6458345E2BF5F92300E18321 /* ContentView.swift in Sources */, 649B59A92BF64C6A002BAE38 /* Colors.swift in Sources */, 649B59B42BF653E1002BAE38 /* ViewTitleTextStyle.swift in Sources */, + 645B4C252BFCD3C600FD658A /* ScoreBoardView.swift in Sources */, 649B59AE2BF64EAB002BAE38 /* AppImages.swift in Sources */, 649ABF602BF60F2D002E8894 /* MainMenuButton.swift in Sources */, 649B59B22BF65392002BAE38 /* TextStyles.swift in Sources */, diff --git a/DouShouQi_App/DouShouQi_App/Views/Player/ScoreBoardView.swift b/DouShouQi_App/DouShouQi_App/Views/Player/ScoreBoardView.swift new file mode 100644 index 0000000..4b9da01 --- /dev/null +++ b/DouShouQi_App/DouShouQi_App/Views/Player/ScoreBoardView.swift @@ -0,0 +1,53 @@ +// +// ScoreBoardView.swift +// DouShouQi_App +// +// Created by Rémi REGNAULT on 21/05/2024. +// + +import SwiftUI + +struct ScoreBoardView: View { + var body: some View { + VStack { + HStack { + TitlePageFrame(Text: "Score Board", ImageWidth: 200, ImageHeight: 200) + } + + 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) + + HStack { + Rectangle() + .frame(height: 2) + } + + 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() + } + } +} + +struct ScoreBoardView_Previews: PreviewProvider { + static var previews: some View { + ScoreBoardView() + } +} From 74f9d011e4540973eef353e05ce5ec714c19b7ea Mon Sep 17 00:00:00 2001 From: "remi.regnault" Date: Tue, 21 May 2024 17:50:16 +0200 Subject: [PATCH 3/7] :construction: adding GameResumeFrame --- .../DouShouQi_App.xcodeproj/project.pbxproj | 12 +++++ .../Components/Game/GameResumeFrame.swift | 51 +++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 DouShouQi_App/DouShouQi_App/Components/Game/GameResumeFrame.swift diff --git a/DouShouQi_App/DouShouQi_App.xcodeproj/project.pbxproj b/DouShouQi_App/DouShouQi_App.xcodeproj/project.pbxproj index 908f76b..b7a4e25 100644 --- a/DouShouQi_App/DouShouQi_App.xcodeproj/project.pbxproj +++ b/DouShouQi_App/DouShouQi_App.xcodeproj/project.pbxproj @@ -7,6 +7,7 @@ objects = { /* Begin PBXBuildFile section */ + 643AB6932BFCEFD00018DA73 /* GameResumeFrame.swift in Sources */ = {isa = PBXBuildFile; fileRef = 643AB6922BFCEFD00018DA73 /* GameResumeFrame.swift */; }; 6458345C2BF5F92300E18321 /* DouShouQi_AppApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6458345B2BF5F92300E18321 /* DouShouQi_AppApp.swift */; }; 6458345E2BF5F92300E18321 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6458345D2BF5F92300E18321 /* ContentView.swift */; }; 645834602BF5F92500E18321 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6458345F2BF5F92500E18321 /* Assets.xcassets */; }; @@ -61,6 +62,7 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ + 643AB6922BFCEFD00018DA73 /* GameResumeFrame.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GameResumeFrame.swift; sourceTree = ""; }; 645834582BF5F92300E18321 /* DouShouQi_App.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = DouShouQi_App.app; sourceTree = BUILT_PRODUCTS_DIR; }; 6458345B2BF5F92300E18321 /* DouShouQi_AppApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DouShouQi_AppApp.swift; sourceTree = ""; }; 6458345D2BF5F92300E18321 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; @@ -112,6 +114,14 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 643AB6912BFCEFB70018DA73 /* Game */ = { + isa = PBXGroup; + children = ( + 643AB6922BFCEFD00018DA73 /* GameResumeFrame.swift */, + ); + path = Game; + sourceTree = ""; + }; 6458344F2BF5F92300E18321 = { isa = PBXGroup; children = ( @@ -209,6 +219,7 @@ 649ABF5E2BF60ED5002E8894 /* Components */ = { isa = PBXGroup; children = ( + 643AB6912BFCEFB70018DA73 /* Game */, 645B4C1C2BFCC95000FD658A /* Player */, 649ABF5F2BF60F2D002E8894 /* MainMenuButton.swift */, 649B59A32BF64574002BAE38 /* TitlePageFrame.swift */, @@ -392,6 +403,7 @@ 645B4C252BFCD3C600FD658A /* ScoreBoardView.swift in Sources */, 649B59AE2BF64EAB002BAE38 /* AppImages.swift in Sources */, 649ABF602BF60F2D002E8894 /* MainMenuButton.swift in Sources */, + 643AB6932BFCEFD00018DA73 /* GameResumeFrame.swift in Sources */, 649B59B22BF65392002BAE38 /* TextStyles.swift in Sources */, 6458345C2BF5F92300E18321 /* DouShouQi_AppApp.swift in Sources */, 645B4C202BFCCA0500FD658A /* PlayerResumeFrame.swift in Sources */, diff --git a/DouShouQi_App/DouShouQi_App/Components/Game/GameResumeFrame.swift b/DouShouQi_App/DouShouQi_App/Components/Game/GameResumeFrame.swift new file mode 100644 index 0000000..d294e72 --- /dev/null +++ b/DouShouQi_App/DouShouQi_App/Components/Game/GameResumeFrame.swift @@ -0,0 +1,51 @@ +// +// GameResumeFrame.swift +// DouShouQi_App +// +// Created by Rémi REGNAULT on 21/05/2024. +// + +import SwiftUI + +struct GameResumeFrame: View { + + // Players Params + let Player1Name: String + let Player2Name: String + + // Game Params + let Status: String + + var body: some View { + ZStack { + HStack(alignment: .center) { + VStack(alignment: .leading) { + Text("\(Player1Name) vs \(Player2Name)") + .font(.headline) + + Text(Status) + .font(.subheadline) + .foregroundColor(.gray) + } + + Spacer() + + Text("Detail >") + .frame(width: 100) + .foregroundColor(.gray) + } + + .padding(10) + .overlay( + RoundedRectangle(cornerRadius: 3) + .stroke(.gray, lineWidth: 2) + ) + }.padding(10) + } +} + +struct GameResumeFrame_Previews: PreviewProvider { + static var previews: some View { + GameResumeFrame(Player1Name: "Rayhan", Player2Name: "Remi", Status: "Winner: Remi") + } +} From 819f707d6f38b0dd5849053ecfe5e0c4aeebe1bd Mon Sep 17 00:00:00 2001 From: "remi.regnault" Date: Tue, 21 May 2024 18:03:41 +0200 Subject: [PATCH 4/7] :construction: adding HistoricView --- .../DouShouQi_App.xcodeproj/project.pbxproj | 12 ++++++++ .../Views/Game/HistoricView.swift | 28 +++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 DouShouQi_App/DouShouQi_App/Views/Game/HistoricView.swift diff --git a/DouShouQi_App/DouShouQi_App.xcodeproj/project.pbxproj b/DouShouQi_App/DouShouQi_App.xcodeproj/project.pbxproj index b7a4e25..89a80b7 100644 --- a/DouShouQi_App/DouShouQi_App.xcodeproj/project.pbxproj +++ b/DouShouQi_App/DouShouQi_App.xcodeproj/project.pbxproj @@ -8,6 +8,7 @@ /* Begin PBXBuildFile section */ 643AB6932BFCEFD00018DA73 /* GameResumeFrame.swift in Sources */ = {isa = PBXBuildFile; fileRef = 643AB6922BFCEFD00018DA73 /* GameResumeFrame.swift */; }; + 643AB69B2BFCFB5C0018DA73 /* HistoricView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 643AB69A2BFCFB5C0018DA73 /* HistoricView.swift */; }; 6458345C2BF5F92300E18321 /* DouShouQi_AppApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6458345B2BF5F92300E18321 /* DouShouQi_AppApp.swift */; }; 6458345E2BF5F92300E18321 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6458345D2BF5F92300E18321 /* ContentView.swift */; }; 645834602BF5F92500E18321 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6458345F2BF5F92500E18321 /* Assets.xcassets */; }; @@ -63,6 +64,7 @@ /* Begin PBXFileReference section */ 643AB6922BFCEFD00018DA73 /* GameResumeFrame.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GameResumeFrame.swift; sourceTree = ""; }; + 643AB69A2BFCFB5C0018DA73 /* HistoricView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HistoricView.swift; sourceTree = ""; }; 645834582BF5F92300E18321 /* DouShouQi_App.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = DouShouQi_App.app; sourceTree = BUILT_PRODUCTS_DIR; }; 6458345B2BF5F92300E18321 /* DouShouQi_AppApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DouShouQi_AppApp.swift; sourceTree = ""; }; 6458345D2BF5F92300E18321 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; @@ -122,6 +124,14 @@ path = Game; sourceTree = ""; }; + 643AB6992BFCFB480018DA73 /* Game */ = { + isa = PBXGroup; + children = ( + 643AB69A2BFCFB5C0018DA73 /* HistoricView.swift */, + ); + path = Game; + sourceTree = ""; + }; 6458344F2BF5F92300E18321 = { isa = PBXGroup; children = ( @@ -210,6 +220,7 @@ 649ABF592BF60D13002E8894 /* Views */ = { isa = PBXGroup; children = ( + 643AB6992BFCFB480018DA73 /* Game */, 645B4C232BFCD39A00FD658A /* Player */, 649ABF5A2BF60D78002E8894 /* MainMenuView.swift */, ); @@ -397,6 +408,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 643AB69B2BFCFB5C0018DA73 /* HistoricView.swift in Sources */, 6458345E2BF5F92300E18321 /* ContentView.swift in Sources */, 649B59A92BF64C6A002BAE38 /* Colors.swift in Sources */, 649B59B42BF653E1002BAE38 /* ViewTitleTextStyle.swift in Sources */, diff --git a/DouShouQi_App/DouShouQi_App/Views/Game/HistoricView.swift b/DouShouQi_App/DouShouQi_App/Views/Game/HistoricView.swift new file mode 100644 index 0000000..e07110f --- /dev/null +++ b/DouShouQi_App/DouShouQi_App/Views/Game/HistoricView.swift @@ -0,0 +1,28 @@ +// +// HistoricView.swift +// DouShouQi_App +// +// Created by Rémi REGNAULT on 21/05/2024. +// + +import SwiftUI + +struct HistoricView: View { + var body: some View { + VStack { + TitlePageFrame(Text: "Historic", ImageWidth: 200, ImageHeight: 200) + + GameResumeFrame(Player1Name: "Remi", Player2Name: "Nathan", Status: "Winner: Nathan") + GameResumeFrame(Player1Name: "Rayhan", Player2Name: "Nathan", Status: "Winner: Nathan") + GameResumeFrame(Player1Name: "Rayhan", Player2Name: "Rémi", Status: "Draw") + + Spacer() + } + } +} + +struct HistoricView_Previews: PreviewProvider { + static var previews: some View { + HistoricView() + } +} From 0d8b08a61fc2911c0ca2f07fcdc2b4bbeb6a1761 Mon Sep 17 00:00:00 2001 From: "remi.regnault" Date: Tue, 21 May 2024 18:12:15 +0200 Subject: [PATCH 5/7] :construction: in file GameResumeFrame: decreased padding --- .../DouShouQi_App/Components/Game/GameResumeFrame.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DouShouQi_App/DouShouQi_App/Components/Game/GameResumeFrame.swift b/DouShouQi_App/DouShouQi_App/Components/Game/GameResumeFrame.swift index d294e72..dade4f8 100644 --- a/DouShouQi_App/DouShouQi_App/Components/Game/GameResumeFrame.swift +++ b/DouShouQi_App/DouShouQi_App/Components/Game/GameResumeFrame.swift @@ -40,7 +40,7 @@ struct GameResumeFrame: View { RoundedRectangle(cornerRadius: 3) .stroke(.gray, lineWidth: 2) ) - }.padding(10) + }.padding(2) } } From 69f6342045daf7fda808dc2f9444434e979a358f Mon Sep 17 00:00:00 2001 From: "remi.regnault" Date: Tue, 21 May 2024 18:16:36 +0200 Subject: [PATCH 6/7] :construction: increasing padding left-right in HistoricView --- .../DouShouQi_App/Views/Game/HistoricView.swift | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/DouShouQi_App/DouShouQi_App/Views/Game/HistoricView.swift b/DouShouQi_App/DouShouQi_App/Views/Game/HistoricView.swift index e07110f..ece39a7 100644 --- a/DouShouQi_App/DouShouQi_App/Views/Game/HistoricView.swift +++ b/DouShouQi_App/DouShouQi_App/Views/Game/HistoricView.swift @@ -12,11 +12,15 @@ struct HistoricView: View { VStack { TitlePageFrame(Text: "Historic", ImageWidth: 200, ImageHeight: 200) - GameResumeFrame(Player1Name: "Remi", Player2Name: "Nathan", Status: "Winner: Nathan") - GameResumeFrame(Player1Name: "Rayhan", Player2Name: "Nathan", Status: "Winner: Nathan") - GameResumeFrame(Player1Name: "Rayhan", Player2Name: "Rémi", Status: "Draw") + VStack { + GameResumeFrame(Player1Name: "Remi", Player2Name: "Nathan", Status: "Winner: Nathan") + GameResumeFrame(Player1Name: "Rayhan", Player2Name: "Nathan", Status: "Winner: Nathan") + GameResumeFrame(Player1Name: "Rayhan", Player2Name: "Rémi", Status: "Draw") + } + .padding(.horizontal, 10) Spacer() + } } } From 856e3f57fabadba7002933d4f4cdedcc77b2452a Mon Sep 17 00:00:00 2001 From: Remi Regnault Date: Wed, 22 May 2024 16:23:24 +0200 Subject: [PATCH 7/7] :construction: modifying padding on content in HistoricView --- .../Views/Player/ScoreBoardView.swift | 52 ++++++++++--------- 1 file changed, 28 insertions(+), 24 deletions(-) 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) } }