Mercurial > public > geoquiz
comparison GeoQuiz/GuessTheCapitalView.swift @ 7:d945e52b0704
implement dynamic map
author | Dennis C. M. <dennis@denniscm.com> |
---|---|
date | Tue, 04 Oct 2022 18:54:24 +0200 |
parents | 1946bbfde4af |
children | e09959b4e4a8 |
comparison
equal
deleted
inserted
replaced
6:1946bbfde4af | 7:d945e52b0704 |
---|---|
6 // | 6 // |
7 | 7 |
8 import SwiftUI | 8 import SwiftUI |
9 | 9 |
10 struct GuessTheCapitalView: View { | 10 struct GuessTheCapitalView: View { |
11 @Binding var gameName: GameName? | |
12 @StateObject var game = CountryGame() | 11 @StateObject var game = CountryGame() |
13 | 12 |
14 var body: some View { | 13 var body: some View { |
15 ZStack { | 14 ZStack { |
16 LinearGradient(gradient: .secondary, startPoint: .top, endPoint: .bottom) | 15 LinearGradient(gradient: .secondary, startPoint: .top, endPoint: .bottom) |
59 } | 58 } |
60 .padding() | 59 .padding() |
61 } | 60 } |
62 } | 61 } |
63 .navigationBarHidden(true) | 62 .navigationBarHidden(true) |
64 .modifier(GameAlertsModifier(game: game, gameName: $gameName)) | 63 .modifier(GameAlertsModifier(game: game)) |
65 .sheet(isPresented: $game.showingBuyLivesView) { | |
66 BuyLivesModalView() | |
67 } | |
68 | |
69 .sheet(isPresented: $game.showingGameStatsView) { | |
70 // GameStatsModalView(game: game) | |
71 } | |
72 } | 64 } |
73 } | 65 } |
74 | 66 |
75 struct GuessCapitalView_Previews: PreviewProvider { | 67 struct GuessCapitalView_Previews: PreviewProvider { |
76 static var previews: some View { | 68 static var previews: some View { |
77 NavigationView { | 69 NavigationView { |
78 GuessTheCapitalView(gameName: .constant(GameName.guessTheCapital)) | 70 GuessTheCapitalView() |
79 } | 71 } |
80 } | 72 } |
81 } | 73 } |