big u/i restructures - still ugly
This commit is contained in:
@@ -8,12 +8,14 @@ import SwiftUI
|
||||
struct DieView: View {
|
||||
let whichDie: Dice.DiceType
|
||||
@EnvironmentObject var current: Roll
|
||||
var colorSelected: Color = Color.green.opacity(0.75)
|
||||
var colorPrimary: Color = Color.yellow
|
||||
|
||||
var body: some View {
|
||||
let size = 22.0
|
||||
let displayColorHit = (whichDie.rawValue >= current.cutoff.rawValue) ? Color.red : Color.primary
|
||||
let displayColorArmor = (whichDie.rawValue <= current.cutoff.rawValue) ? Color.red : Color.primary
|
||||
let displayColorArmorText = (whichDie.rawValue < current.cutoff.rawValue) ? Color.red : Color.primary
|
||||
let size = 42.0
|
||||
let displayColorHit = (whichDie.rawValue >= current.cutoff.rawValue) ? colorSelected : colorPrimary
|
||||
let displayColorArmor = (whichDie.rawValue <= current.cutoff.rawValue) ? colorSelected : colorPrimary
|
||||
let displayColorArmorText = (whichDie.rawValue < current.cutoff.rawValue) ? colorSelected : colorPrimary
|
||||
|
||||
VStack(spacing: 2) {
|
||||
Text(String(current.dice.value(which: whichDie)))
|
||||
|
||||
Reference in New Issue
Block a user