diff --git a/ArkitDoushiQi/ArkitDoushiQi/Preview Content/DoushiQiPicker.swift b/ArkitDoushiQi/ArkitDoushiQi/Preview Content/DoushiQiPicker.swift index c9dca02..67699af 100644 --- a/ArkitDoushiQi/ArkitDoushiQi/Preview Content/DoushiQiPicker.swift +++ b/ArkitDoushiQi/ArkitDoushiQi/Preview Content/DoushiQiPicker.swift @@ -19,28 +19,31 @@ struct DoushiQiPicker: Vie } var body: some View { - Menu { - Picker(title, selection: $selectedOption) { - ForEach(options) { option in - Text(option.rawValue.description) + VStack(spacing: 0) { + Divider().background(Color.gray) + Menu { + Picker(title, selection: $selectedOption) { + ForEach(options) { option in + Text(option.rawValue.description) + .padding() + } } + .labelsHidden() + .pickerStyle(InlinePickerStyle()) + } label: { + HStack { + Text(title) + .foregroundColor(.black) + .padding() + Spacer() + Text(selectedOption.rawValue.description) + .foregroundColor(.black) + .padding() + } + .frame(maxWidth: .infinity) + .padding(EdgeInsets(top: 0, leading: 32, bottom: 0, trailing: 32)) } - .labelsHidden() - .pickerStyle(InlinePickerStyle()) - } label: { - HStack { - Text(title) - .foregroundColor(.white) - .padding() - Spacer() - Text(selectedOption.rawValue.description) - .foregroundColor(.white) - .padding() - } - .frame(maxWidth: .infinity) - .padding(EdgeInsets(top: 10, leading: 32, bottom: 10, trailing: 32)) - .background(Color.black) - .clipShape(Capsule()) + Divider().background(Color.gray) } } } diff --git a/ArkitDoushiQi/ArkitDoushiQi/Preview Content/MainMenuButton.swift b/ArkitDoushiQi/ArkitDoushiQi/Preview Content/MainMenuButton.swift index 2fe9fee..ccdac76 100644 --- a/ArkitDoushiQi/ArkitDoushiQi/Preview Content/MainMenuButton.swift +++ b/ArkitDoushiQi/ArkitDoushiQi/Preview Content/MainMenuButton.swift @@ -17,7 +17,7 @@ struct MainMenuButton: View { } var body: some View { - NavigationLink(title){ + NavigationLink("parties enregistrées"){ // ici mettre la vue sur les parties enregistrées à la place du texte n'hésite pas à tester sur la preview la navigation ça marche, faire pareil pour les autres content } @@ -29,6 +29,7 @@ struct MainMenuButton: View { .background(.black) .buttonBorderShape(.roundedRectangle) .clipShape(Capsule()) + Spacer().frame(height: 50) } } diff --git a/ArkitDoushiQi/ArkitDoushiQi/Preview Content/ParametersMenuView.swift b/ArkitDoushiQi/ArkitDoushiQi/Preview Content/ParametersMenuView.swift index a68f01f..1aedd36 100644 --- a/ArkitDoushiQi/ArkitDoushiQi/Preview Content/ParametersMenuView.swift +++ b/ArkitDoushiQi/ArkitDoushiQi/Preview Content/ParametersMenuView.swift @@ -22,7 +22,7 @@ enum Language: String, CaseIterable, Identifiable, Hashable { } enum Rules: String, CaseIterable, Identifiable, Hashable { - case Easy = "Simple" + case Easy = "Simplifié" case Regular = "Normal" var id: String { self.rawValue } } @@ -32,7 +32,7 @@ struct ParametersMenuView: View { @State private var selectedLanguageOption: Language = .French @State private var selectedRulesOption: Rules = .Regular var body: some View { - VStack { + VStack(alignment: .leading) { ToggleView() DoushiQiPicker(title: "Sélectionne une IA :", selectedOption: $selectedAIOption, @@ -44,7 +44,7 @@ struct ParametersMenuView: View { selectedOption: $selectedRulesOption, options: Rules.allCases) - } + }.frame(maxHeight: .infinity, alignment: .top) } }