commit
623535e2b4
@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "GiftEarn.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 32 KiB |
@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "Gift.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 61 KiB |
@ -0,0 +1,32 @@
|
||||
//
|
||||
// ChoiceFinalAnswerCell.swift
|
||||
// AllIn
|
||||
//
|
||||
// Created by Lucas Delanier on 29/01/2024.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import SwiftUI
|
||||
import Model
|
||||
|
||||
struct ChoiceFinalAnswerCell: View {
|
||||
|
||||
var selected = false
|
||||
var answer: AnswerDetail
|
||||
var rawColor = AllInColors.blueAccentColor
|
||||
|
||||
var body: some View {
|
||||
ZStack{
|
||||
HStack{
|
||||
Spacer()
|
||||
Text(answer.response)
|
||||
.textStyle(weight: .bold, color: selected ? AllInColors.whiteColor :rawColor, size: 40).padding(.vertical, 10)
|
||||
Spacer()
|
||||
}
|
||||
HStack{
|
||||
Spacer()
|
||||
OddCapsule(backgroundColor: selected ? AllInColors.whiteColor : AllInColors.purpleAccentColor, foregroundColor: selected ? AllInColors.purpleAccentColor : AllInColors.whiteColor ,odd: answer.odds ).padding(.trailing,20).scaleEffect(0.9)
|
||||
}
|
||||
}.background(selected ? AllInColors.purpleAccentColor : AllInColors.whiteColor).cornerRadius(17)
|
||||
}
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
//
|
||||
// OddCapsule.swift
|
||||
// AllIn
|
||||
//
|
||||
// Created by Lucas Delanier on 03/02/2024.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import SwiftUI
|
||||
|
||||
struct OddCapsule: View {
|
||||
var backgroundColor: Color = AllInColors.purpleAccentColor
|
||||
var foregroundColor: Color = AllInColors.whiteColor
|
||||
var odd: Float = 0.0
|
||||
var body: some View {
|
||||
HStack(alignment: .center) {
|
||||
Text("x\(odd.description)")
|
||||
.fontWeight(.bold)
|
||||
.foregroundColor(foregroundColor)
|
||||
}
|
||||
.padding(.horizontal, 10)
|
||||
.padding(.vertical,5)
|
||||
.background(backgroundColor)
|
||||
.cornerRadius(9999)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
struct OddCapsule_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
OddCapsule()
|
||||
}
|
||||
}
|
Loading…
Reference in new issue