big u/i restructures - still ugly
This commit is contained in:
@@ -10,49 +10,57 @@ struct RollSummaryView: View {
|
||||
@State private var showFillView = false
|
||||
|
||||
var body: some View {
|
||||
HStack(spacing: 12) {
|
||||
Button(action: { showFillView.toggle() }) {
|
||||
VStack(spacing: 4) {
|
||||
VStack{
|
||||
HStack(spacing: 12) {
|
||||
VStack {
|
||||
Text("Dice Pool")
|
||||
.font(.caption)
|
||||
Text(String(current.total))
|
||||
.font(.system(size: 28, weight: .black))
|
||||
}
|
||||
.frame(maxWidth: .infinity)
|
||||
.padding(.vertical, 12)
|
||||
.background(Color.white)
|
||||
.clipShape(RoundedRectangle(cornerRadius: 10))
|
||||
.foregroundColor(.black)
|
||||
}
|
||||
.sheet(isPresented: $showFillView,
|
||||
onDismiss: { current.resetPool() }) {
|
||||
VStack {
|
||||
AddToPool()
|
||||
Button("Accept", action: { showFillView.toggle() })
|
||||
.padding(20)
|
||||
}
|
||||
}
|
||||
Button(action: current.incrementState) {
|
||||
VStack(spacing: 4) {
|
||||
Text(current.state.text())
|
||||
.font(.caption)
|
||||
Text(String(current.result))
|
||||
.font(.system(size: 28, weight: .black))
|
||||
if current.state == .armour && current.mortalWoundsTotal > 0 {
|
||||
Text("mortal: \(current.mortalWoundsTotal)")
|
||||
.font(.caption)
|
||||
Button(action: { showFillView.toggle() }) {
|
||||
VStack(spacing: 4) {
|
||||
Text(String(current.total))
|
||||
.font(.system(size: 28, weight: .black))
|
||||
}
|
||||
.frame(maxWidth: .infinity)
|
||||
.padding(.vertical, 12)
|
||||
.clipShape(Circle())
|
||||
.foregroundColor(.black)
|
||||
.glassEffect(.clear.tint(Color.blue.opacity(0.7)))
|
||||
}
|
||||
}
|
||||
.frame(maxWidth: .infinity)
|
||||
.padding(.vertical, 12)
|
||||
.background(Color.white)
|
||||
.clipShape(RoundedRectangle(cornerRadius: 10))
|
||||
.foregroundColor(.black)
|
||||
.sheet(isPresented: $showFillView,
|
||||
onDismiss: { current.resetPool() }) {
|
||||
VStack {
|
||||
AddToPool()
|
||||
Button("Accept", action: { showFillView.toggle() })
|
||||
.padding(20)
|
||||
}
|
||||
}
|
||||
VStack {
|
||||
Text(current.state == .armour ? "Model Damage" : current.state.text() + "s")
|
||||
.font(.caption)
|
||||
Button(action: current.incrementState) {
|
||||
VStack(spacing: 4) {
|
||||
Text(String(current.result))
|
||||
.font(.system(size: 28, weight: .black))
|
||||
if current.state == .armour && current.mortalWoundsTotal > 0 {
|
||||
Text("mortal: \(current.mortalWoundsTotal)")
|
||||
.font(.caption)
|
||||
}
|
||||
}
|
||||
.frame(maxWidth: .infinity)
|
||||
.padding(.vertical, 12)
|
||||
.clipShape(Circle())
|
||||
.foregroundColor(.black)
|
||||
.glassEffect(.clear.tint(Color.red.opacity(0.7)))
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
DiePoolView()
|
||||
}
|
||||
.padding()
|
||||
.background(Color.black)
|
||||
.clipShape(RoundedRectangle(cornerRadius: 14))
|
||||
.frame(maxWidth: .infinity)
|
||||
.background(Color.gray)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user