comparison GeoQuiz/ContentView.swift @ 6:1946bbfde4af

reformat data structures
author Dennis C. M. <dennis@denniscm.com>
date Thu, 29 Sep 2022 12:00:17 +0200
parents f31a61462e7a
children d945e52b0704
comparison
equal deleted inserted replaced
5:f31a61462e7a 6:1946bbfde4af
36 GameButton( 36 GameButton(
37 gradient: .secondary, 37 gradient: .secondary,
38 level: "Level 2", symbol: "building.2.fill", name: "Guess the capital" 38 level: "Level 2", symbol: "building.2.fill", name: "Guess the capital"
39 ) 39 )
40 } 40 }
41 41
42 NavigationLink( 42 NavigationLink(
43 destination: Text("Guess the country"), 43 destination: GuessTheCountryView(gameName: $gameName),
44 tag: GameName.guessTheCountry, 44 tag: GameName.guessTheCountry,
45 selection: $gameName 45 selection: $gameName
46 ) { 46 ) {
47 GameButton( 47 GameButton(
48 gradient: .tertiary, 48 gradient: .tertiary,
49 level: "Level 3", symbol: "globe.americas.fill", name: "Guess the country" 49 level: "Level 3", symbol: "globe.americas.fill", name: "Guess the country"
50 ) 50 )
51 } 51 }
52 52 //
53 NavigationLink( 53 // NavigationLink(
54 destination: Text("Guess the population"), 54 // destination: Text("Guess the population"),
55 tag: GameName.guessThePopulation, 55 // tag: GameName.guessThePopulation,
56 selection: $gameName 56 // selection: $gameName
57 ) { 57 // ) {
58 GameButton( 58 // GameButton(
59 gradient: .quaternary, 59 // gradient: .quaternary,
60 level: "Level 4", symbol: "person.3.fill", name: "Guess the population" 60 // level: "Level 4", symbol: "person.3.fill", name: "Guess the population"
61 ) 61 // )
62 } 62 // }
63 } 63 }
64 .padding() 64 .padding()
65 } 65 }
66 .navigationTitle("Select a game 🎮") 66 .navigationTitle("Select a game 🎮")
67 .toolbar { 67 .toolbar {
87 87
88 .sheet(isPresented: $showingSettingsModalView) { 88 .sheet(isPresented: $showingSettingsModalView) {
89 SettingsModalView() 89 SettingsModalView()
90 } 90 }
91 } 91 }
92 .navigationViewStyle(StackNavigationViewStyle())
92 } 93 }
93 } 94 }
94 95
95 struct ContentView_Previews: PreviewProvider { 96 struct ContentView_Previews: PreviewProvider {
96 static var previews: some View { 97 static var previews: some View {