ParametersMenuView(Update) : parameters page

first acceptable version
pull/11/head
Johan LACHENAL 11 months ago
parent 1962e025bf
commit 0880717b7b

@ -35,7 +35,7 @@ struct DoushiQiPicker<EnumType: RawRepresentable & Identifiable & Hashable>: Vie
Text(title) Text(title)
.foregroundColor(.black) .foregroundColor(.black)
.padding() .padding()
Spacer() Spacer() // .frame(width : (20 - CGFloat(title.count)))
Text(selectedOption.rawValue.description) Text(selectedOption.rawValue.description)
.foregroundColor(.black) .foregroundColor(.black)
.padding() .padding()

@ -8,7 +8,7 @@
import SwiftUI import SwiftUI
enum AIT: String, CaseIterable, Identifiable, Hashable { enum AIT: String, CaseIterable, Identifiable, Hashable {
case RandomAction = "IA Test" case RandomAction = "IA Random"
case EasyTrainedAI = "IA Facile" case EasyTrainedAI = "IA Facile"
case MediumTrainedAI = "IA Intermédiaire" case MediumTrainedAI = "IA Intermédiaire"
@ -33,6 +33,10 @@ struct ParametersMenuView: View {
@State private var selectedRulesOption: Rules = .Regular @State private var selectedRulesOption: Rules = .Regular
var body: some View { var body: some View {
VStack(alignment: .leading) { VStack(alignment: .leading) {
HStack(alignment: .center) {
Text("Paramètres").bold().font(.title)
}.frame(maxWidth: .infinity)
Spacer().frame(maxHeight: 30)
ToggleView() ToggleView()
DoushiQiPicker(title: "Sélectionne une IA :", DoushiQiPicker(title: "Sélectionne une IA :",
selectedOption: $selectedAIOption, selectedOption: $selectedAIOption,

@ -13,7 +13,7 @@ struct ToggleView: View {
Divider().background(Color.gray).padding(.vertical, 1) Divider().background(Color.gray).padding(.vertical, 1)
Toggle("Dark Mode", isOn: $isDarkMode) Toggle("Dark Mode", isOn: $isDarkMode)
.toggleStyle(SwitchToggleStyle(tint: .blue)) .toggleStyle(SwitchToggleStyle(tint: .blue))
.padding(EdgeInsets(top: 0, leading: 32, bottom: 0, trailing: 32)) .padding(EdgeInsets(top: 0, leading: 48, bottom: 0, trailing: 48))
Divider().background(Color.gray).padding(.vertical, 1) Divider().background(Color.gray).padding(.vertical, 1)
} }
} }

Loading…
Cancel
Save