parent
1bdb6fd917
commit
e43e485154
|
@ -34,16 +34,16 @@ struct FortuneWheelModel {
|
|||
self.size = size
|
||||
self.onSpinEnd = onSpinEnd
|
||||
self.colors = colors ?? [
|
||||
Color(hex: "#F5D55A"),
|
||||
Color(hex: "#E4813B"),
|
||||
Color(hex: "#E6AAC1"),
|
||||
Color(hex: "#8FCEEA"),
|
||||
Color(hex: "#CD5880"),
|
||||
Color(hex: "#C2C85E"),
|
||||
Color(hex: "#000000"),
|
||||
Color(hex: "#888888"),
|
||||
Color(hex: "#FFFFFF"),
|
||||
Color(hex: "#000080"),
|
||||
Color(hex: "#D73535"),
|
||||
Color(hex: "#FF5151"),
|
||||
Color(hex: "#FF7C32"),
|
||||
Color(hex: "#FFAF13"),
|
||||
Color(hex: "#FFC658"),
|
||||
Color(hex: "#8BDA70"),
|
||||
Color(hex: "#06AB97"),
|
||||
Color(hex: "#12AAFF"),
|
||||
Color(hex: "#0052B3"),
|
||||
Color(hex: "#7444FF"),
|
||||
]
|
||||
self.pointerColor = pointerColor
|
||||
self.strokeWidth = strokeWidth
|
||||
|
|
|
@ -62,7 +62,7 @@ struct SpinWheelView: View {
|
|||
ForEach(0..<data.count, id: \.self) { index in
|
||||
SpinWheelCell(startAngle: startAngle(for: index), endAngle: endAngle(for: index))
|
||||
.fill(colors[index % colors.count])
|
||||
Text(labels[index]).font(.custom(Font.medium.rawValue, size: 13)).foregroundColor(Color.black)
|
||||
Text(labels[index]).font(.custom(Font.medium.rawValue, size: 13)).foregroundColor(Color.white)
|
||||
.offset(viewOffset(for: index, in: geo.size)).zIndex(1)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue