diff --git a/Assets/Vs_Red.png b/Assets/Vs_Red.png
new file mode 100644
index 0000000..bf6d094
Binary files /dev/null and b/Assets/Vs_Red.png differ
diff --git a/DouShouQi_App/DouShouQi_App/Assets/Images/Images.xcassets/SemiLion.imageset/doushouqi-lion 1.png b/Assets/doushouqi-semilion.png
similarity index 100%
rename from DouShouQi_App/DouShouQi_App/Assets/Images/Images.xcassets/SemiLion.imageset/doushouqi-lion 1.png
rename to Assets/doushouqi-semilion.png
diff --git a/Assets/doushouqi-semilion.svg b/Assets/doushouqi-semilion.svg
new file mode 100644
index 0000000..a1a7aa2
--- /dev/null
+++ b/Assets/doushouqi-semilion.svg
@@ -0,0 +1,25 @@
+
diff --git a/DouShouQi_App/Assets/title-background.png b/Assets/title-background.png
similarity index 100%
rename from DouShouQi_App/Assets/title-background.png
rename to Assets/title-background.png
diff --git a/DouShouQi_App/DouShouQi_App.xcodeproj/project.pbxproj b/DouShouQi_App/DouShouQi_App.xcodeproj/project.pbxproj
index ac7093c..3d0bdac 100644
--- a/DouShouQi_App/DouShouQi_App.xcodeproj/project.pbxproj
+++ b/DouShouQi_App/DouShouQi_App.xcodeproj/project.pbxproj
@@ -27,7 +27,6 @@
649B59A42BF64574002BAE38 /* TitlePageFrame.swift in Sources */ = {isa = PBXBuildFile; fileRef = 649B59A32BF64574002BAE38 /* TitlePageFrame.swift */; };
649B59A72BF64BA9002BAE38 /* Colors.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 649B59A62BF64BA9002BAE38 /* Colors.xcassets */; };
649B59A92BF64C6A002BAE38 /* Colors.swift in Sources */ = {isa = PBXBuildFile; fileRef = 649B59A82BF64C6A002BAE38 /* Colors.swift */; };
- 649B59AC2BF64E12002BAE38 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 649B59AB2BF64E12002BAE38 /* Images.xcassets */; };
649B59AE2BF64EAB002BAE38 /* AppImages.swift in Sources */ = {isa = PBXBuildFile; fileRef = 649B59AD2BF64EAB002BAE38 /* AppImages.swift */; };
649B59B22BF65392002BAE38 /* TextStyles.swift in Sources */ = {isa = PBXBuildFile; fileRef = 649B59B12BF65392002BAE38 /* TextStyles.swift */; };
649B59B42BF653E1002BAE38 /* ViewTitleTextStyle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 649B59B32BF653E1002BAE38 /* ViewTitleTextStyle.swift */; };
@@ -44,6 +43,7 @@
EC62C50D2C046D9E0048CD0B /* SplashScreenSound.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = EC62C50C2C046D9E0048CD0B /* SplashScreenSound.mp3 */; };
EC62C50F2C05D06A0048CD0B /* AddPlayerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC62C50E2C05D06A0048CD0B /* AddPlayerView.swift */; };
EC62C5172C0620C00048CD0B /* rap.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = EC62C5162C0620C00048CD0B /* rap.mp3 */; };
+ ECB636552C047992007CD5E2 /* Image.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = ECB636542C047992007CD5E2 /* Image.xcassets */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
@@ -88,7 +88,6 @@
649B59A32BF64574002BAE38 /* TitlePageFrame.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TitlePageFrame.swift; sourceTree = ""; };
649B59A62BF64BA9002BAE38 /* Colors.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Colors.xcassets; sourceTree = ""; };
649B59A82BF64C6A002BAE38 /* Colors.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Colors.swift; sourceTree = ""; };
- 649B59AB2BF64E12002BAE38 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; };
649B59AD2BF64EAB002BAE38 /* AppImages.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppImages.swift; sourceTree = ""; };
649B59B12BF65392002BAE38 /* TextStyles.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TextStyles.swift; sourceTree = ""; };
649B59B32BF653E1002BAE38 /* ViewTitleTextStyle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewTitleTextStyle.swift; sourceTree = ""; };
@@ -105,6 +104,7 @@
EC62C50C2C046D9E0048CD0B /* SplashScreenSound.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; path = SplashScreenSound.mp3; sourceTree = ""; };
EC62C50E2C05D06A0048CD0B /* AddPlayerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddPlayerView.swift; sourceTree = ""; };
EC62C5162C0620C00048CD0B /* rap.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; path = rap.mp3; sourceTree = ""; };
+ ECB636542C047992007CD5E2 /* Image.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Image.xcassets; sourceTree = ""; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -286,9 +286,9 @@
649B59AA2BF64DF1002BAE38 /* Images */ = {
isa = PBXGroup;
children = (
- 649B59AB2BF64E12002BAE38 /* Images.xcassets */,
649B59AD2BF64EAB002BAE38 /* AppImages.swift */,
64D992712C06281B002ACBC6 /* SystemIcons.swift */,
+ ECB636542C047992007CD5E2 /* Image.xcassets */,
);
path = Images;
sourceTree = "";
@@ -460,6 +460,7 @@
EC62C50D2C046D9E0048CD0B /* SplashScreenSound.mp3 in Resources */,
645834632BF5F92500E18321 /* Preview Assets.xcassets in Resources */,
645834602BF5F92500E18321 /* Assets.xcassets in Resources */,
+ ECB636552C047992007CD5E2 /* Image.xcassets in Resources */,
EC62C4FF2C0457AD0048CD0B /* TitleScreenMusic.mp3 in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
diff --git a/DouShouQi_App/DouShouQi_App/Assets/Images/Images.xcassets/SemiLion.imageset/Contents.json b/DouShouQi_App/DouShouQi_App/Assets.xcassets/title-background.imageset/Contents.json
similarity index 86%
rename from DouShouQi_App/DouShouQi_App/Assets/Images/Images.xcassets/SemiLion.imageset/Contents.json
rename to DouShouQi_App/DouShouQi_App/Assets.xcassets/title-background.imageset/Contents.json
index 29853d4..4576384 100644
--- a/DouShouQi_App/DouShouQi_App/Assets/Images/Images.xcassets/SemiLion.imageset/Contents.json
+++ b/DouShouQi_App/DouShouQi_App/Assets.xcassets/title-background.imageset/Contents.json
@@ -1,7 +1,7 @@
{
"images" : [
{
- "filename" : "doushouqi-lion 1.png",
+ "filename" : "title-background.png",
"idiom" : "universal",
"scale" : "1x"
},
diff --git a/DouShouQi_App/DouShouQi_App/Assets.xcassets/title-background.imageset/title-background.png b/DouShouQi_App/DouShouQi_App/Assets.xcassets/title-background.imageset/title-background.png
new file mode 100644
index 0000000..dcd3220
Binary files /dev/null and b/DouShouQi_App/DouShouQi_App/Assets.xcassets/title-background.imageset/title-background.png differ
diff --git a/DouShouQi_App/DouShouQi_App/Assets.xcassets/vs-custom.imageset/Contents.json b/DouShouQi_App/DouShouQi_App/Assets.xcassets/vs-custom.imageset/Contents.json
new file mode 100644
index 0000000..fc0328b
--- /dev/null
+++ b/DouShouQi_App/DouShouQi_App/Assets.xcassets/vs-custom.imageset/Contents.json
@@ -0,0 +1,21 @@
+{
+ "images" : [
+ {
+ "filename" : "Vs_Red.png",
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
diff --git a/DouShouQi_App/DouShouQi_App/Assets.xcassets/vs-custom.imageset/Vs_Red.png b/DouShouQi_App/DouShouQi_App/Assets.xcassets/vs-custom.imageset/Vs_Red.png
new file mode 100644
index 0000000..bf6d094
Binary files /dev/null and b/DouShouQi_App/DouShouQi_App/Assets.xcassets/vs-custom.imageset/Vs_Red.png differ
diff --git a/DouShouQi_App/DouShouQi_App/Assets/Images/AppImages.swift b/DouShouQi_App/DouShouQi_App/Assets/Images/AppImages.swift
index e133776..e5a384b 100644
--- a/DouShouQi_App/DouShouQi_App/Assets/Images/AppImages.swift
+++ b/DouShouQi_App/DouShouQi_App/Assets/Images/AppImages.swift
@@ -9,7 +9,7 @@ import Foundation
import SwiftUI
public struct AppImages {
- static let TitleImage = "TitlePageImage"
+ static let TitleImage = "Title"
static let SemiLion = "SemiLion"
static let SemiDog = "SemiDog"
static let SemiElephant = "SemiElephant"
diff --git a/DouShouQi_App/DouShouQi_App/Assets/Images/Images.xcassets/Contents.json b/DouShouQi_App/DouShouQi_App/Assets/Images/Image.xcassets/Contents.json
similarity index 100%
rename from DouShouQi_App/DouShouQi_App/Assets/Images/Images.xcassets/Contents.json
rename to DouShouQi_App/DouShouQi_App/Assets/Images/Image.xcassets/Contents.json
diff --git a/DouShouQi_App/DouShouQi_App/Assets/Images/Image.xcassets/SemiLion.imageset/Contents.json b/DouShouQi_App/DouShouQi_App/Assets/Images/Image.xcassets/SemiLion.imageset/Contents.json
new file mode 100644
index 0000000..077e986
--- /dev/null
+++ b/DouShouQi_App/DouShouQi_App/Assets/Images/Image.xcassets/SemiLion.imageset/Contents.json
@@ -0,0 +1,21 @@
+{
+ "images" : [
+ {
+ "filename" : "doushouqi-semilion.png",
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
diff --git a/DouShouQi_App/DouShouQi_App/Assets/Images/Image.xcassets/SemiLion.imageset/doushouqi-semilion.png b/DouShouQi_App/DouShouQi_App/Assets/Images/Image.xcassets/SemiLion.imageset/doushouqi-semilion.png
new file mode 100644
index 0000000..f306b56
Binary files /dev/null and b/DouShouQi_App/DouShouQi_App/Assets/Images/Image.xcassets/SemiLion.imageset/doushouqi-semilion.png differ
diff --git a/DouShouQi_App/DouShouQi_App/Assets/Images/Images.xcassets/TitlePageImage.imageset/Contents.json b/DouShouQi_App/DouShouQi_App/Assets/Images/Image.xcassets/Title.imageset/Contents.json
similarity index 74%
rename from DouShouQi_App/DouShouQi_App/Assets/Images/Images.xcassets/TitlePageImage.imageset/Contents.json
rename to DouShouQi_App/DouShouQi_App/Assets/Images/Image.xcassets/Title.imageset/Contents.json
index a8e9c51..ec5d305 100644
--- a/DouShouQi_App/DouShouQi_App/Assets/Images/Images.xcassets/TitlePageImage.imageset/Contents.json
+++ b/DouShouQi_App/DouShouQi_App/Assets/Images/Image.xcassets/Title.imageset/Contents.json
@@ -1,7 +1,7 @@
{
"images" : [
{
- "filename" : "-16-05-2024.svg",
+ "filename" : "title-background.svg",
"idiom" : "universal"
}
],
diff --git a/DouShouQi_App/DouShouQi_App/Assets/Images/Images.xcassets/TitlePageImage.imageset/-16-05-2024.svg b/DouShouQi_App/DouShouQi_App/Assets/Images/Image.xcassets/Title.imageset/title-background.svg
similarity index 100%
rename from DouShouQi_App/DouShouQi_App/Assets/Images/Images.xcassets/TitlePageImage.imageset/-16-05-2024.svg
rename to DouShouQi_App/DouShouQi_App/Assets/Images/Image.xcassets/Title.imageset/title-background.svg
diff --git a/DouShouQi_App/DouShouQi_App/Components/ButtonView.swift b/DouShouQi_App/DouShouQi_App/Components/ButtonView.swift
new file mode 100644
index 0000000..0a03795
--- /dev/null
+++ b/DouShouQi_App/DouShouQi_App/Components/ButtonView.swift
@@ -0,0 +1,26 @@
+import SwiftUI
+
+struct ButtonView: View {
+ var button1Title: String
+
+ var body: some View {
+ VStack {
+ Button(action: {
+ print("\(button1Title) pressé!")
+ }) {
+ Text(button1Title)
+ .frame(width: 200)
+ .padding()
+ .background(Color.red)
+ .foregroundColor(.white)
+ .cornerRadius(10)
+ }
+ }
+ }
+}
+
+struct ButtonsViewPreviews: PreviewProvider {
+ static var previews: some View {
+ ButtonView(button1Title: "Button")
+ }
+}
diff --git a/DouShouQi_App/DouShouQi_App/Components/MainButton.swift b/DouShouQi_App/DouShouQi_App/Components/MainButton.swift
new file mode 100644
index 0000000..bdb58f0
--- /dev/null
+++ b/DouShouQi_App/DouShouQi_App/Components/MainButton.swift
@@ -0,0 +1,30 @@
+//
+// MainButton.swift
+// DouShouQi_App
+//
+// Created by etudiant on 16/05/2024.
+//
+
+import SwiftUI
+
+struct MainButton: View {
+ var body: some View {
+ Button(action: {
+ // Code à exécuter lorsque l'utilisateur appuie sur le bouton
+ print("Bouton appuyé !")
+ }) {
+ // Label pour le bouton (par exemple, du texte ou une icône)
+ Text("Appuyez ici")
+ .padding() // Ajoute un peu d'espace autour du texte
+ .background(Color.blue) // Couleur de fond du bouton
+ .foregroundColor(.white) // Couleur du texte
+ .cornerRadius(10) // Coins arrondis
+ }
+ }
+}
+
+struct MainButton_Previews: PreviewProvider {
+ static var previews: some View {
+ MainButton()
+ }
+}
diff --git a/DouShouQi_App/DouShouQi_App/Components/SelectPlayerButtonView.swift b/DouShouQi_App/DouShouQi_App/Components/SelectPlayerButtonView.swift
new file mode 100644
index 0000000..615b94f
--- /dev/null
+++ b/DouShouQi_App/DouShouQi_App/Components/SelectPlayerButtonView.swift
@@ -0,0 +1,103 @@
+//
+// SelectPlayerButtonView.swift
+// DouShouQi_App
+//
+// Created by etudiant on 23/05/2024.
+//
+
+import SwiftUI
+
+struct CustomShapeLeftButton: Shape {
+ func path(in rect: CGRect) -> Path {
+ var path = Path()
+ path.move(to: CGPoint(x: rect.minX, y: rect.minY)) // coin supérieur gauche
+ path.addLine(to: CGPoint(x: rect.maxX - 60, y: rect.minY)) // un peu avant le coin supérieur droit
+ path.addLine(to: CGPoint(x: rect.maxX, y: rect.minY + 60)) // un peu en dessous du coin supérieur droit
+ path.addLine(to: CGPoint(x: rect.maxX, y: rect.maxY)) // coin inférieur droit
+ path.addLine(to: CGPoint(x: rect.minX, y: rect.maxY)) // coin inférieur gauche
+ path.closeSubpath()
+ return path
+ }
+}
+
+struct CustomShapeRightButton: Shape {
+ func path(in rect: CGRect) -> Path {
+ var path = Path()
+ path.move(to: CGPoint(x: rect.minX + 60, y: rect.minY)) // un peu à droite du coin supérieur gauche
+ path.addLine(to: CGPoint(x: rect.maxX, y: rect.minY)) // coin supérieur droit
+ path.addLine(to: CGPoint(x: rect.maxX, y: rect.maxY)) // coin inférieur droit
+ path.addLine(to: CGPoint(x: rect.minX, y: rect.maxY)) // coin inférieur gauche
+ path.addLine(to: CGPoint(x: rect.minX, y: rect.minY + 60)) // un peu en dessous du coin supérieur gauche
+ path.closeSubpath()
+ return path
+ }
+}
+
+
+struct SelectPlayerButtonView: View {
+ var player1:String = "IA"
+ var player2:String = "IA"
+ var body: some View {
+ ZStack{
+ Image("vs-custom")
+ .resizable()
+ .aspectRatio(contentMode: .fit)
+ .frame(width: 100, height: 100)
+ .offset(y: -60)
+ HStack{
+ VStack (alignment: .leading) {
+ Text(player1)
+ .font(.title)
+ .padding(3)
+ Button(action: {
+ print("Button j1 pressé!")
+ }) {
+ VStack {
+ Text("+")
+ .font(.largeTitle)
+ .bold()
+ Text("Add a player")
+ .font(.body)
+ .bold()
+ }
+ .frame(width: 150, height: 150)
+ .padding()
+ .border(/*@START_MENU_TOKEN@*/Color.black/*@END_MENU_TOKEN@*/, width: 4)
+ .foregroundColor(.black)
+ .foregroundColor(.white)
+ .cornerRadius(10)
+ .clipShape(CustomShapeLeftButton())
+ }
+ }
+ VStack (alignment: .trailing) {
+ Text(player2)
+ .font(.title)
+ .padding(3)
+
+ Button(action: {
+ print("Button j2 pressé!")
+ }) {
+ VStack {
+ Text("+")
+ .font(.largeTitle)
+ .bold()
+ Text("Add a player")
+ .font(.body)
+ .bold()
+ } .frame(width: 150, height: 150)
+ .padding()
+ .foregroundColor(.black)
+ .border(/*@START_MENU_TOKEN@*/Color.black/*@END_MENU_TOKEN@*/, width: 4)
+ .foregroundColor(.white)
+ .cornerRadius(10)
+ .clipShape(CustomShapeRightButton())
+ }
+ }
+ }
+ }
+ }
+}
+
+#Preview {
+ SelectPlayerButtonView()
+}
diff --git a/DouShouQi_App/DouShouQi_App/Components/TitlePageFrame.swift b/DouShouQi_App/DouShouQi_App/Components/TitlePageFrame.swift
index 5346fe0..f4b4194 100644
--- a/DouShouQi_App/DouShouQi_App/Components/TitlePageFrame.swift
+++ b/DouShouQi_App/DouShouQi_App/Components/TitlePageFrame.swift
@@ -23,7 +23,7 @@ struct TitlePageFrame: View {
.resizable()
.aspectRatio(contentMode: .fit)
.frame(width: ImageWidth, height: ImageHeight)
-
+
SwiftUI.Text(self.Text)
.textStyle(CustomTextStyles.Title)
diff --git a/DouShouQi_App/DouShouQi_App/ContentView.swift b/DouShouQi_App/DouShouQi_App/ContentView.swift
index 9923c70..a6027c0 100644
--- a/DouShouQi_App/DouShouQi_App/ContentView.swift
+++ b/DouShouQi_App/DouShouQi_App/ContentView.swift
@@ -6,8 +6,10 @@
//
import SwiftUI
+import DouShouQiModel
struct ContentView: View {
+
var body: some View {
VStack {
Image(systemName: "globe")
diff --git a/DouShouQi_App/DouShouQi_App/Views/SelectPlayerView.swift b/DouShouQi_App/DouShouQi_App/Views/SelectPlayerView.swift
new file mode 100644
index 0000000..28dc7c5
--- /dev/null
+++ b/DouShouQi_App/DouShouQi_App/Views/SelectPlayerView.swift
@@ -0,0 +1,45 @@
+//
+// SelectPlayerView.swift
+// DouShouQi_App
+//
+// Created by nathan on 23/05/2024.
+//
+
+import SwiftUI
+
+struct SelectPlayerView: View {
+ var body: some View {
+ VStack {
+ ZStack {
+ Image("title-background")
+ .resizable()
+ .aspectRatio(contentMode: .fit)
+ .frame(width: 250, height: 250)
+
+ Text("Select Your Player")
+ .font(.largeTitle)
+ .foregroundColor(.black)
+ .bold()
+ }
+
+ SelectPlayerButtonView()
+
+ Spacer()
+ HStack {
+ Spacer()
+ VStack(alignment: .trailing)
+ {
+ ButtonView(button1Title: "Start")
+ ButtonView(button1Title: "Setting")
+ }
+ }
+ Spacer()
+ }
+ }
+}
+
+struct SelectPlayerViewPreviews: PreviewProvider {
+ static var previews: some View {
+ SelectPlayerView()
+ }
+}
diff --git a/Vs_Red.png b/Vs_Red.png
new file mode 100644
index 0000000..bf6d094
Binary files /dev/null and b/Vs_Red.png differ