comparison GeoQuiz/Helpers/GameToolbar.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
22 .font(.headline) 22 .font(.headline)
23 .foregroundColor(color) 23 .foregroundColor(color)
24 .padding(10) 24 .padding(10)
25 .background( 25 .background(
26 Circle() 26 Circle()
27 .foregroundColor(.white) 27 .foregroundStyle(.regularMaterial)
28 ) 28 )
29 } 29 }
30 } 30 }
31 .font(.headline) 31 .font(.headline)
32 .frame(maxWidth: .infinity, alignment: .leading) 32 .frame(maxWidth: .infinity, alignment: .leading)
33 33
34 Group { 34 Group {
35 Button { 35 Text("\(game.userScore)")
36 game.showingGameStatsView = true 36 .font(.title.bold())
37 } label: { 37 .foregroundColor(color)
38 Text("\(game.userScore)") 38 .padding()
39 .font(.title.bold()) 39 .background(
40 .foregroundColor(color) 40 Circle()
41 .padding() 41 .foregroundStyle(.regularMaterial)
42 .background( 42 )
43 Circle()
44 .foregroundColor(.white)
45 )
46 }
47 } 43 }
48 .font(.title2) 44 .font(.title2)
49 .scaleEffect(game.scoreScaleAmount) 45 .scaleEffect(game.scoreScaleAmount)
50 .frame(maxWidth: .infinity, alignment: .center) 46 .frame(maxWidth: .infinity, alignment: .center)
51 47
52 Group { 48 Group {
53 Button { 49 HStack {
54 game.showingBuyLivesView = true 50 Image(systemName: "heart.fill")
55 } label: { 51 Text("\(game.userLives)")
56 HStack {
57 Image(systemName: "heart.fill")
58 Text("\(game.userLives)")
59 }
60 .font(.headline)
61 .foregroundColor(color)
62 .padding(10)
63 .background(
64 Capsule()
65 .foregroundColor(.white)
66 )
67 .scaleEffect(game.livesScaleAmount)
68 } 52 }
53 .font(.headline)
54 .foregroundColor(color)
55 .padding(10)
56 .background(
57 Capsule()
58 .foregroundStyle(.regularMaterial)
59 )
60 .scaleEffect(game.livesScaleAmount)
69 } 61 }
70 .font(.headline) 62 .font(.headline)
71 .frame(maxWidth: .infinity, alignment: .trailing) 63 .frame(maxWidth: .infinity, alignment: .trailing)
72 } 64 }
73 } 65 }