Merge branch 'dev_views' into dev_views_ViewTitle

pull/6/head
Rémi REGNAULT 11 months ago
commit 5d9007920e

@ -7,6 +7,8 @@
objects = {
/* 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 */; };
@ -16,6 +18,8 @@
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 */; };
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 */; };
@ -59,6 +63,8 @@
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
643AB6922BFCEFD00018DA73 /* GameResumeFrame.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GameResumeFrame.swift; sourceTree = "<group>"; };
643AB69A2BFCFB5C0018DA73 /* HistoricView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HistoricView.swift; sourceTree = "<group>"; };
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 = "<group>"; };
6458345D2BF5F92300E18321 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = "<group>"; };
@ -71,6 +77,8 @@
645834782BF5F92600E18321 /* DouShouQi_AppUITestsLaunchTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DouShouQi_AppUITestsLaunchTests.swift; sourceTree = "<group>"; };
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 = "<group>"; };
645B4C1F2BFCCA0500FD658A /* PlayerResumeFrame.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlayerResumeFrame.swift; sourceTree = "<group>"; };
645B4C242BFCD3C600FD658A /* ScoreBoardView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ScoreBoardView.swift; sourceTree = "<group>"; };
649ABF5A2BF60D78002E8894 /* MainMenuView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainMenuView.swift; sourceTree = "<group>"; };
649ABF5F2BF60F2D002E8894 /* MainMenuButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainMenuButton.swift; sourceTree = "<group>"; };
649B59A32BF64574002BAE38 /* TitlePageFrame.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TitlePageFrame.swift; sourceTree = "<group>"; };
@ -108,6 +116,22 @@
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
643AB6912BFCEFB70018DA73 /* Game */ = {
isa = PBXGroup;
children = (
643AB6922BFCEFD00018DA73 /* GameResumeFrame.swift */,
);
path = Game;
sourceTree = "<group>";
};
643AB6992BFCFB480018DA73 /* Game */ = {
isa = PBXGroup;
children = (
643AB69A2BFCFB5C0018DA73 /* HistoricView.swift */,
);
path = Game;
sourceTree = "<group>";
};
6458344F2BF5F92300E18321 = {
isa = PBXGroup;
children = (
@ -177,9 +201,27 @@
name = Frameworks;
sourceTree = "<group>";
};
645B4C1C2BFCC95000FD658A /* Player */ = {
isa = PBXGroup;
children = (
645B4C1F2BFCCA0500FD658A /* PlayerResumeFrame.swift */,
);
path = Player;
sourceTree = "<group>";
};
645B4C232BFCD39A00FD658A /* Player */ = {
isa = PBXGroup;
children = (
645B4C242BFCD3C600FD658A /* ScoreBoardView.swift */,
);
path = Player;
sourceTree = "<group>";
};
649ABF592BF60D13002E8894 /* Views */ = {
isa = PBXGroup;
children = (
643AB6992BFCFB480018DA73 /* Game */,
645B4C232BFCD39A00FD658A /* Player */,
649ABF5A2BF60D78002E8894 /* MainMenuView.swift */,
);
path = Views;
@ -188,6 +230,8 @@
649ABF5E2BF60ED5002E8894 /* Components */ = {
isa = PBXGroup;
children = (
643AB6912BFCEFB70018DA73 /* Game */,
645B4C1C2BFCC95000FD658A /* Player */,
649ABF5F2BF60F2D002E8894 /* MainMenuButton.swift */,
649B59A32BF64574002BAE38 /* TitlePageFrame.swift */,
);
@ -364,13 +408,17 @@
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 */,
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 */,
649ABF5B2BF60D78002E8894 /* MainMenuView.swift in Sources */,
649B59A42BF64574002BAE38 /* TitlePageFrame.swift in Sources */,
);

@ -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(2)
}
}
struct GameResumeFrame_Previews: PreviewProvider {
static var previews: some View {
GameResumeFrame(Player1Name: "Rayhan", Player2Name: "Remi", Status: "Winner: Remi")
}
}

@ -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)
}
}

@ -0,0 +1,32 @@
//
// 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)
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()
}
}
}
struct HistoricView_Previews: PreviewProvider {
static var previews: some View {
HistoricView()
}
}

@ -0,0 +1,57 @@
//
// ScoreBoardView.swift
// DouShouQi_App
//
// Created by Rémi REGNAULT on 21/05/2024.
//
import SwiftUI
import DouShouQiModel
struct ScoreBoardView: View {
var body: some View {
VStack {
HStack {
TitlePageFrame(Text: "Score Board", ImageWidth: 200, ImageHeight: 200)
}
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)
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()
}
}
.padding(10)
}
}
struct ScoreBoardView_Previews: PreviewProvider {
static var previews: some View {
ScoreBoardView()
}
}
Loading…
Cancel
Save