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.
76 lines
1.6 KiB
76 lines
1.6 KiB
//
|
|
// IngameView.swift
|
|
// App
|
|
//
|
|
// Created by etudiant2 on 21/05/2025.
|
|
//
|
|
|
|
import SwiftUI
|
|
|
|
struct IngameView: View {
|
|
var body: some View {
|
|
HStack {
|
|
PlayerView(is_local: true)
|
|
Spacer()
|
|
PlayerView(is_local: false)
|
|
}
|
|
|
|
Spacer()
|
|
|
|
Rectangle().aspectRatio(contentMode: .fit)
|
|
|
|
Spacer()
|
|
|
|
// Button("", systemImage: "globe") {
|
|
//
|
|
// }
|
|
|
|
let current = "???"
|
|
Text("inGame.currentRules \(current)")
|
|
}
|
|
}
|
|
|
|
private struct PlayerView: View {
|
|
let isLocal: Bool
|
|
|
|
var body: some View {
|
|
VStack {
|
|
HStack {
|
|
let textAlignment: HorizontalAlignment = if self.isLocal {
|
|
.leading
|
|
} else {
|
|
.trailing
|
|
}
|
|
|
|
if self.isLocal {
|
|
Circle().frame(width: 50, height: 50)
|
|
}
|
|
VStack(alignment: textAlignment) {
|
|
let name = "Name ???"
|
|
Text(name)
|
|
|
|
let type = "Type ???"
|
|
Text(type)
|
|
}
|
|
if !self.isLocal {
|
|
Circle().frame(width: 50, height: 50)
|
|
}
|
|
}
|
|
|
|
let time = "??:??:??"
|
|
Text(time)
|
|
|
|
let statusText = "Status Text: Your turn"
|
|
Text(statusText)
|
|
}
|
|
}
|
|
|
|
init(is_local isLocal: Bool) {
|
|
self.isLocal = isLocal
|
|
}
|
|
}
|
|
|
|
#Preview {
|
|
IngameView()
|
|
}
|