better stats formatting

undo
saint 2024-05-31 14:23:36 -04:00
parent 1aae36dfbc
commit 8774723f43
2 changed files with 38 additions and 44 deletions

View File

@ -19,7 +19,9 @@ struct StatsPanel: View {
Array(repeatElement(GridItem(.flexible()), count: columnCount))
}
var body: some View {
LazyVGrid (columns:columns , spacing: 5) {
HStack(spacing: 5) {
VStack (spacing: 5) {
VStack {
Text("back Ribbon")
.foregroundColor(Color(UIColor(red: 0.76, green: 0.76, blue: 0.76, alpha: 1.00)))
@ -31,7 +33,7 @@ struct StatsPanel: View {
Text("next Ribbon")
.foregroundColor(Color(UIColor(red: 0.76, green: 0.76, blue: 0.76, alpha: 1.00)))
.font(Font.custom("AveriaSerifLibre-Regular", size: fontSize))
if (nextRibbon.count > 0) {
if nextRibbon.count > 0 {
RibbonDebug(ribbonDebug: RibbonDebugPrint(ribbon: nextRibbon[0]))
}
}
@ -43,23 +45,6 @@ struct StatsPanel: View {
RibbonDebug(ribbonDebug: RibbonDebugPrint(ribbon: selectedRibbon[0]))
}
ForEach(RibbonMap(ribbons: allRibbons), id: \.self) { ribbon in
Print("quack3: \(ribbon)")
RibbonDebug(ribbonDebug: ribbon)
}
//VStack(spacing: 10) {
// Text("All Ribbons")
// .foregroundColor(Color(UIColor(red: 0.76, green: 0.76, blue: 0.76, alpha: 1.00)))
// .font(Font.custom("AveriaSerifLibre-Regular", size: fontSize))
// ForEach(RibbonMap(ribbons: allRibbons), id: \.self) { ribbon in
// //Print("quack2: \(ribbon)")
// RibbonDebug(ribbonDebug: RibbonDebugPrint(ribbon: ribbon))
// }
//}
VStack {
Text("pc offset: \(paneConnector.currentOffset)")
.foregroundColor(Color(UIColor(red: 0.76, green: 0.76, blue: 0.76, alpha: 1.00)))
@ -72,6 +57,15 @@ struct StatsPanel: View {
.font(Font.custom("AveriaSerifLibre-Regular", size: fontSize))
}
}
VStack (spacing: 5) {
ForEach(RibbonMap(ribbons: allRibbons), id: \.self) { ribbon in
Print("quack3: \(ribbon)")
RibbonDebug(ribbonDebug: ribbon)
}
}
}
}
}
func RibbonMap(ribbons: [Ribbon]) -> [[String]] {

View File

@ -235,8 +235,8 @@ class PaneConnector: NSObject, ObservableObject {
var currentId = ""
var currentOffset = CGFloat()
var visibilityTracker: VisibilityTracker<String>?
var scrollId = ""
var scrollOffset = CGFloat()
@Published var scrollId = ""
@Published var scrollOffset = CGFloat()
var setScrollOffset: CGFloat?
}